Fixed bug in BP (introduced in commit b8f96214...) and added regression test for...
[libdai.git] / Makefile
index 3851768..d76c56f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -89,6 +89,10 @@ ifdef WITH_CBP
   WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_CBP
   NAMES:=$(NAMES) bbp cbp bp_dual
 endif
+ifdef WITH_DECMAP
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_DECMAP
+  NAMES:=$(NAMES) decmap
+endif
 
 # Define standard libDAI header dependencies, source file names and object file names
 HEADERS=$(foreach name,graph dag bipgraph index var factor varset smallset prob daialg properties alldai enum exceptions util,$(INC)/$(name).h)
@@ -175,6 +179,9 @@ treeep$(OE) : $(SRC)/treeep.cpp $(INC)/treeep.h $(HEADERS) $(INC)/weightedgraph.
 emalg$(OE) : $(SRC)/emalg.cpp $(INC)/emalg.h $(INC)/evidence.h $(HEADERS)
        $(CC) -c $<
 
+decmap$(OE) : $(SRC)/decmap.cpp $(INC)/decmap.h $(HEADERS)
+       $(CC) -c $<
+
 
 # EXAMPLES
 ###########
@@ -190,7 +197,7 @@ else
 endif
 
 examples/example_imagesegmentation$(EE) : examples/example_imagesegmentation.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       -$(CC) $(CCO)$@ $< $(LIBS) -lpthread -lX11
+       -$(CC) $(CIMGINC) $(CCO)$@ $< $(LIBS) $(CIMGLIBS)
 
 
 # UNIT TESTS