# Makefile for search
#

COMP = g++
INCLUDES = -I/usr/include

# The following line should be modified appropriately
ANNBASE = /u/wass/dimacs/challenge/ann/ann_0.2




SFILES = algorithm.o \
        client.o \
        search.o


# where are the libraries for <netinet/in.h> and <netdb.h>
LIBS = -lm -lsocket -lnsl
#LIBS = -lm


CFLAGS = -c $(DEFINE) -o $@
#CFLAGS = -c -g $(DEFINE) -o $@


search: $(SFILES)
	$(COMP) -o search $(SFILES) $(ANNBASE)/lib/libANN.a $(LIBS)


# ---- alphabetized list of modules ----
algorithm.o: algorithm.c algorithm.h oracle.h
	$(COMP) -I$(ANNBASE)/include $(CFLAGS) algorithm.c

client.o: client.c client.h  oracle.h messages.h
	$(COMP) $(CFLAGS) client.c

search.o: search.c algorithm.h client.h oracle.h
	$(COMP) $(CFLAGS) search.c

