Adding the c wrapper for CSolver
[satune.git] / src / Test / Makefile
index 2c24d58663f479045afef075712bf3fe6177c434..f7c2929e7c4d79d2a5907ad628fdf0f8b5f89909 100644 (file)
@@ -1,22 +1,26 @@
 BASE := ..
 
 OBJECTS := $(patsubst %.cc, ../bin/%, $(wildcard *.cc))
+COBJECTS := $(patsubst %.c, ../bin/%, $(wildcard *.c))
 
 include $(BASE)/common.mk
 
 DEPS := $(join $(addsuffix ., $(dir $(OBJECTS))), $(addsuffix .d, $(notdir $(OBJECTS))))
 
-CPPFLAGS += -I$(BASE) -I$(BASE)/AST -I$(BASE)/Collections -I$(BASE)/Backend
+CPPFLAGS += -I$(BASE) -I$(BASE)/AST -I$(BASE)/Collections -I$(BASE)/Backend -I$(BASE)/Tuner
 
-all: $(OBJECTS) ../bin/run.sh
+all: $(OBJECTS) $(COBJECTS) ../bin/run.sh
 
 -include $(DEPS)
 
 ../bin/%: %.cc
+       $(CXX) -MMD -MF $(@D)/.$(@F).d -o ../bin/$@ $< $(CPPFLAGS) -L$(BASE)/bin/ -l_cons_comp
+
+../bin/%: %.c
        $(CC) -MMD -MF $(@D)/.$(@F).d -o ../bin/$@ $< $(CPPFLAGS) -L$(BASE)/bin/ -l_cons_comp
 
 ../bin/run.sh: run.sh
        cp run.sh ../bin/run.sh
 
 clean::
-       rm -f $(OBJECTS) $(DEPS) ../bin/run.sh
+       rm -f $(OBJECTS) $(COBJECTS) $(DEPS) ../bin/run.sh