# Makefil for cHawk.so
# written by Waseem Ahmad <wahmad@acm.org>

CXX = gcc
CXXFLAGS =  -g
LIB = cHawk.so
SRCS = cHawk.cpp SphierStruct.cpp Node.cpp Array.cpp LinkedList.cpp
HDRS = bicat_run_machine_RunMachine_cHawk.h SphierStruct.h Node.h
OBJS = cHawk.o SphierStruct.o Node.o Array.o LinkedList.o 
all : $(LIB)
$(LIB) : $(OBJS) 
	$(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB) cHawk.o SphierStruct.o Node.o -lc -lstdc++
$(OBJS): $(SRCS) $(HDRS)
	$(CXX) $(CXXFLAGS) -fPIC -Wno-deprecated -I ~/jdk/include -I ~/jdk/include/linux -c $(SRCS)
score : genescore.cpp
	g++ -o genescore genescore.cpp
clean :
	rm -fr *.o
	rm -fr *.so
