# $cs310/hw4/makefile
#
# makefile for Map performance testing

COURSEDIR=/courses/cs310/public_html
INC=$(COURSEDIR)/include
LIB=$(COURSEDIR)/lib
SRC=$(COURSEDIR)/src
ARMDIR=/home/eb/arm

CC=gcc
CFLAGS = -g -Wall -Wstrict-prototypes -Wmissing-prototypes \
		-Wno-uninitialized -Wshadow -pedantic  \
		-D__USE_FIXED_PROTOTYPES__ -I$(INC) -I$(ARMDIR)
LDLIBS = -lm

HASH=hash1

# ---------- THE MAP TESTS -----------
all: timemapMyHash timemapClassHash timemapList

timemapMyHash: $(LIB)/timemap.o HashMap.o $(LIB)/$(HASH).o
	$(CC) $(CFLAGS) -o timemapMyHash \
	$(LIB)/timemap.o HashMap.o $(LIB)/$(HASH).o \
	$(ARMDIR)/arm.o $(LDLIBS)

timemapClassHash: $(LIB)/timemap.o $(LIB)/HashMap.o $(LIB)/$(HASH).o
	$(CC) $(CFLAGS) -o timemapClassHash \
	$(LIB)/timemap.o $(LIB)/HashMap.o $(LIB)/$(HASH).o \
	$(ARMDIR)/arm.o $(LDLIBS)


timemapList: $(LIB)/timemap.o ListMap.o
	$(CC) $(CFLAGS) -o timemapList \
	$(LIB)/timemap.o ListMap.o \
	$(ARMDIR)/arm.o $(LDLIBS)


# --------- THE HashMap OBJECT --------
HashMap.o: $(INC)/map_api.h  $(INC)/hash.h HashMap.c

ListMap.o: $(INC)/map_api.h  ListMap.c



# ------- OTHER ---------
clean:
	rm -f core *.o timemapMyHash timemapClassHash timemapList
