
from fabricate import *

programs = ['create', 'read', 'update', 'delete', 'filter', 'nearest']

def build():
	for program in programs:
		sources = [program, 'clustergis']
		compile(sources)
		link(sources, program)

def compile(sources):
	for source in sources:
		run('mpicc -Wall -O3 `geos-config --cflags` -c ' + source + '.c')

def link(sources, program='a.out'):
	objects = ' '.join(s + '.o' for s in sources)
	run('mpicc -o ' + program + ' -Wall -O3 `geos-config --cflags` ' + objects + ' `geos-config --ldflags` -lgeos_c')

def clean():
	autoclean()

main()


from fabricate import *

programs = ['create', 'read', 'update', 'delete', 'filter', 'nearest']

def build():
	for program in programs:
		sources = [program, '../src/clustergis']
		compile(sources)
		link(sources, program)

def compile(sources):
	for source in sources:
		run('mpicc -Wall -O3 -I../src/ `geos-config --cflags` -c ' + source + '.c -o ' + source + '.o')

def link(sources, program='a.out'):
	objects = ' '.join(s + '.o' for s in sources)
	run('mpicc -o ' + program + ' -Wall -O3 `geos-config --cflags` ' + objects + ' `geos-config --ldflags` -lgeos_c')

def clean():
	autoclean()

main()

Build script for examples now works
Build script for examples now works

  
  from fabricate import *
  
  programs = ['create', 'read', 'update', 'delete', 'filter', 'nearest']
  
  def build():
  	for program in programs:
- 		sources = [program, 'clustergis']
+ 		sources = [program, '../src/clustergis']
  		compile(sources)
  		link(sources, program)
  
  def compile(sources):
  	for source in sources:
- 		run('mpicc -Wall -O3 `geos-config --cflags` -c ' + source + '.c')
+ 		run('mpicc -Wall -O3 -I../src/ `geos-config --cflags` -c ' + source + '.c -o ' + source + '.o')
  
  def link(sources, program='a.out'):
  	objects = ' '.join(s + '.o' for s in sources)
  	run('mpicc -o ' + program + ' -Wall -O3 `geos-config --cflags` ' + objects + ' `geos-config --ldflags` -lgeos_c')
  
  def clean():
  	autoclean()
  
  main()
  
Build script for examples now works
## Code Before:

from fabricate import *

programs = ['create', 'read', 'update', 'delete', 'filter', 'nearest']

def build():
	for program in programs:
		sources = [program, 'clustergis']
		compile(sources)
		link(sources, program)

def compile(sources):
	for source in sources:
		run('mpicc -Wall -O3 `geos-config --cflags` -c ' + source + '.c')

def link(sources, program='a.out'):
	objects = ' '.join(s + '.o' for s in sources)
	run('mpicc -o ' + program + ' -Wall -O3 `geos-config --cflags` ' + objects + ' `geos-config --ldflags` -lgeos_c')

def clean():
	autoclean()

main()

## Instruction:
Build script for examples now works
## Code After:

from fabricate import *

programs = ['create', 'read', 'update', 'delete', 'filter', 'nearest']

def build():
	for program in programs:
		sources = [program, '../src/clustergis']
		compile(sources)
		link(sources, program)

def compile(sources):
	for source in sources:
		run('mpicc -Wall -O3 -I../src/ `geos-config --cflags` -c ' + source + '.c -o ' + source + '.o')

def link(sources, program='a.out'):
	objects = ' '.join(s + '.o' for s in sources)
	run('mpicc -o ' + program + ' -Wall -O3 `geos-config --cflags` ' + objects + ' `geos-config --ldflags` -lgeos_c')

def clean():
	autoclean()

main()
