#G5FLAGS=-mcpu=970 -mtune=970 -mpowerpc64 -mpowerpc-gpopt -falign-loops=16 -falign-functions=16 -falign-labels=16 -falign-jumps=16 -ffast-math -funroll-loops -finline -mno-update -mno-multiple -fstrict-aliasing -fsched-interblock
FLAGS=-Wall -O3 $(G5FLAGS) -DAVOIDMALLOC -DNOCASE

default:with-tree with-hash

with-tree:main.o tree.o
	gcc $(FLAGS) -o  with-tree main.o tree.o

with-hash:main.o hash.o
	gcc $(FLAGS) -o with-hash main.o hash.o

main.o:main.c db.h
	gcc $(FLAGS) -c main.c

hash.o:hash.c db.h
	gcc $(FLAGS) $(HASHFLAGS) -c hash.c

tree.o:tree.c db.h
	gcc $(FLAGS) -c tree.c

clean:
	rm -f with-tree
	rm -f with-hash
	rm -f *.o
