###################################################################
#
# You should be able to just fill in the vars here for any project.
# You will need dirs "obj" and "debugobj" each containing
# Makefiles containing only the following:
#
# VPATH = ..
#
# all : ${OBJ}
#
###################################################################

COMMONOBJ = SATinstance.o  stopwatch.o BinSolver.o BuildSolvers.o 

FEATOBJ = features.o $(COMMONOBJ)

PORTOBJ = ArgoSmartkNN.o $(COMMONOBJ)

EXECNAME = ArgoSmartkNN

INCLUDE =

LIB = -lm -lz 

RELEASEFLAGS = -static -Wno-deprecated -O5 -DNEBUG 

DEBUGFLAGS = -static -Wall -DDEBUG -g

SOLVERLIB =  

release:
	cd obj; make all "OBJ = ${PORTOBJ}" "CPPFLAGS = -DRANDOM_SATZILLA ${RELEASEFLAGS} ${INCLUDE}";
	make allfeat "VPATH = obj" "OBJ = $(PORTOBJ)" "FLAGS = -o $(EXECNAME) ${RELEASEFLAGS}"

allfeat : $(OBJ)
	g++ $^ ${FLAGS} $(LIB)

features:
	cd obj; make all "OBJ = ${FEATOBJ}" "CPPFLAGS = -DFEATURES ${RELEASEFLAGS} ${INCLUDE}";
	make allfeat "VPATH = obj" "OBJ = $(FEATOBJ)" "FLAGS = -o features ${RELEASEFLAGS}"


.PHONY: clean depend again

clean:
	rm -f obj/*.o *.o features ArgoSmartkNN

depend:
	makedepend -Y -fobj/Makefile *.cc *.cpp >& /dev/null
	makedepend -Y -fdebugobj/Makefile *.cc *.cpp >& /dev/null

again:
	make clean; make depend; make
