Adding the c wrapper for CSolver
[satune.git] / src / Test / Makefile
index be27d60f132d810e23426861b5f5bf3f2b2a423b..f7c2929e7c4d79d2a5907ad628fdf0f8b5f89909 100644 (file)
@@ -1,17 +1,21 @@
 BASE := ..
 
-OBJECTS := $(patsubst %.c, ../bin/%, $(wildcard *.c))
+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
 
@@ -19,4 +23,4 @@ all: $(OBJECTS) ../bin/run.sh
        cp run.sh ../bin/run.sh
 
 clean::
-       rm -f $(OBJECTS) $(DEPS) ../bin/run.sh
+       rm -f $(OBJECTS) $(COBJECTS) $(DEPS) ../bin/run.sh