Fixed some more BOOST_CHECK_CLOSE misuse
[libdai.git] / Makefile
index a5c6ce3..d380833 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,8 @@
 # This file is part of libDAI - http://www.libdai.org/
 #
-# libDAI is licensed under the terms of the GNU General Public License version
-# 2, or (at your option) any later version. libDAI is distributed without any
-# warranty. See the file COPYING for more details.
+# Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
 #
-# Copyright (C) 2006-2010  Joris Mooij  [joris dot mooij at libdai dot org]
-# Copyright (C) 2006-2007  Radboud University Nijmegen, The Netherlands
+# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
 
 
 # Load the platform independent build configuration file
@@ -16,10 +13,10 @@ include Makefile.conf
 
 # Set version and date
 DAI_VERSION="git HEAD"
-DAI_DATE="February 11, 2010 - or later"
+DAI_DATE="September 17, 2012 - or later"
 
 # Directories of libDAI sources
-# Location libDAI headers
+# Location of libDAI headers
 INC=include/dai
 # Location of libDAI source files
 SRC=src
@@ -34,104 +31,140 @@ else
 endif
 
 # Define build targets
-TARGETS=tests utils lib examples unittests testregression testem
-ifdef WITH_DOC
-  TARGETS:=$(TARGETS) doc
-endif
+TARGETS:=lib tests utils examples
 ifdef WITH_MATLAB
   TARGETS:=$(TARGETS) matlabs
-  # Specify the same C++ compiler and flags to mex
-  ifneq ($(OS),WINDOWS)
-    MEXFLAGS=CXX\#$(CC) CXXFLAGS\#'$(CCFLAGS)'
-  else
-    MEXFLAGS=CXX\#$(CC) CXXFLAGS\#"$(CCFLAGS)"
-  endif
-  ifdef NEW_MATLAB
-    MEXFLAGS:=$(MEXFLAGS) -largeArrayDims
-  else
-    MEXFLAGS:=$(MEXFLAGS) -DSMALLMEM
-  endif
+endif
+TARGETS:=$(TARGETS) unittests testregression testem
+ifdef WITH_DOC
+  TARGETS:=$(TARGETS) doc
 endif
 
 # Define conditional build targets
-OBJECTS:=exactinf$(OE) evidence$(OE) emalg$(OE)
+NAMES:=graph dag bipgraph varset daialg alldai clustergraph factor factorgraph properties regiongraph cobwebgraph util weightedgraph exceptions exactinf evidence emalg io
 ifdef WITH_BP
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_BP
-  OBJECTS:=$(OBJECTS) bp$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_BP
+  NAMES:=$(NAMES) bp
 endif
 ifdef WITH_FBP
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_FBP
-  OBJECTS:=$(OBJECTS) fbp$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_FBP
+  NAMES:=$(NAMES) fbp
 endif
 ifdef WITH_TRWBP
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_TRWBP
-  OBJECTS:=$(OBJECTS) trwbp$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_TRWBP
+  NAMES:=$(NAMES) trwbp
 endif
 ifdef WITH_MF
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_MF
-  OBJECTS:=$(OBJECTS) mf$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_MF
+  NAMES:=$(NAMES) mf
 endif
 ifdef WITH_HAK
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_HAK
-  OBJECTS:=$(OBJECTS) hak$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_HAK
+  NAMES:=$(NAMES) hak
 endif
 ifdef WITH_LC
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_LC
-  OBJECTS:=$(OBJECTS) lc$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_LC
+  NAMES:=$(NAMES) lc
 endif
 ifdef WITH_TREEEP
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_TREEEP
-  OBJECTS:=$(OBJECTS) treeep$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_TREEEP
+  NAMES:=$(NAMES) treeep
 endif
 ifdef WITH_JTREE
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_JTREE
-  OBJECTS:=$(OBJECTS) jtree$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_JTREE
+  NAMES:=$(NAMES) jtree
 endif
 ifdef WITH_MR
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_MR
-  OBJECTS:=$(OBJECTS) mr$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_MR
+  NAMES:=$(NAMES) mr
 endif
 ifdef WITH_GIBBS
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_GIBBS
-  OBJECTS:=$(OBJECTS) gibbs$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_GIBBS
+  NAMES:=$(NAMES) gibbs
 endif
 ifdef WITH_CBP
-  CCFLAGS:=$(CCFLAGS) -DDAI_WITH_CBP
-  OBJECTS:=$(OBJECTS) bbp$(OE) cbp$(OE) bp_dual$(OE)
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_CBP
+  NAMES:=$(NAMES) bbp cbp bp_dual
 endif
+ifdef WITH_DECMAP
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_DECMAP
+  NAMES:=$(NAMES) decmap
+endif
+ifdef WITH_GLC
+  WITHFLAGS:=$(WITHFLAGS) -DDAI_WITH_GLC
+  NAMES:=$(NAMES) glc 
+endif
+
 
-# Define standard libDAI header dependencies
-HEADERS=$(INC)/bipgraph.h $(INC)/graph.h $(INC)/index.h $(INC)/var.h $(INC)/factor.h $(INC)/varset.h $(INC)/smallset.h $(INC)/prob.h $(INC)/daialg.h $(INC)/properties.h $(INC)/alldai.h $(INC)/enum.h $(INC)/exceptions.h $(INC)/util.h
+# 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)
+SOURCES:=$(foreach name,$(NAMES),$(SRC)/$(name).cpp)
+OBJECTS:=$(foreach name,$(NAMES),$(name)$(OE))
 
-# Setup final command for C++ compiler and MEX
+# Setup final command for C++ compiler
 ifneq ($(OS),WINDOWS)
-  CC:=$(CC) $(CCINC) $(CCFLAGS) $(CCLIB)
+  CC:=$(CC) $(CCINC) $(CCFLAGS) $(WITHFLAGS) $(CCLIB)
 else
-  CC:=$(CC) $(CCINC) $(CCFLAGS)
+  CC:=$(CC) $(CCINC) $(CCFLAGS) $(WITHFLAGS)
   LIBS:=$(LIBS) $(CCLIB)
 endif
-MEX:=$(MEX) $(CCLIB) $(CCINC) $(MEXFLAGS)
+
+# Setup final command for MEX
+ifdef NEW_MATLAB
+  MEXFLAGS:=$(MEXFLAGS) -largeArrayDims
+else
+  MEXFLAGS:=$(MEXFLAGS) -DSMALLMEM
+endif
+MEX:=$(MEX) $(MEXINC) $(MEXFLAGS) $(WITHFLAGS) $(MEXLIBS) $(MEXLIB)
 
 
 # META TARGETS
 ###############
 
 all : $(TARGETS)
+       @echo
+       @echo libDAI built successfully!
 
-examples : examples/example$(EE) examples/example_bipgraph$(EE) examples/example_varset$(EE) examples/example_permute$(EE) examples/example_sprinkler$(EE) examples/example_sprinkler_gibbs$(EE) examples/example_sprinkler_em$(EE)
-
-matlabs : matlab/dai$(ME) matlab/dai_readfg$(ME) matlab/dai_writefg$(ME) matlab/dai_potstrength$(ME)
-
-unittests : tests/unit/var$(EE) tests/unit/smallset$(EE) tests/unit/varset$(EE) tests/unit/graph$(EE)
-       echo Running unit tests...
-       tests/unit/var
-       tests/unit/smallset
-       tests/unit/varset
-       tests/unit/graph
+EXAMPLES=$(foreach name,example example_bipgraph example_varset example_permute example_sprinkler example_sprinkler_em,examples/$(name)$(EE))
+ifdef WITH_GIBBS
+  EXAMPLES:=$(EXAMPLES) examples/example_sprinkler_gibbs$(EE)
+endif
+ifdef WITH_CIMG
+  EXAMPLES:=$(EXAMPLES) examples/example_imagesegmentation$(EE)
+endif
+examples : $(EXAMPLES)
+
+matlabs : matlab/dai$(ME) matlab/dai_readfg$(ME) matlab/dai_writefg$(ME) matlab/dai_potstrength$(ME) matlab/dai_jtree$(ME)
+
+unittests : tests/unit/var_test$(EE) tests/unit/smallset_test$(EE) tests/unit/varset_test$(EE) tests/unit/graph_test$(EE) tests/unit/dag_test$(EE) tests/unit/bipgraph_test$(EE) tests/unit/weightedgraph_test$(EE) tests/unit/enum_test$(EE) tests/unit/enum_test$(EE) tests/unit/util_test$(EE) tests/unit/exceptions_test$(EE) tests/unit/properties_test$(EE) tests/unit/index_test$(EE) tests/unit/prob_test$(EE) tests/unit/factor_test$(EE) tests/unit/factorgraph_test$(EE) tests/unit/clustergraph_test$(EE) tests/unit/regiongraph_test$(EE) tests/unit/daialg_test$(EE) tests/unit/alldai_test$(EE)
+       @echo 'Running unit tests...'
+       @echo
+       tests/unit/var_test$(EE)
+       tests/unit/smallset_test$(EE)
+       tests/unit/varset_test$(EE)
+       tests/unit/graph_test$(EE)
+       tests/unit/dag_test$(EE)
+       tests/unit/bipgraph_test$(EE)
+       tests/unit/weightedgraph_test$(EE)
+       tests/unit/enum_test$(EE)
+       tests/unit/util_test$(EE)
+       tests/unit/exceptions_test$(EE)
+       tests/unit/properties_test$(EE)
+       tests/unit/index_test$(EE)
+       tests/unit/prob_test$(EE)
+       tests/unit/factor_test$(EE)
+       tests/unit/factorgraph_test$(EE)
+       tests/unit/clustergraph_test$(EE)
+       tests/unit/regiongraph_test$(EE)
+       tests/unit/daialg_test$(EE)
+       tests/unit/alldai_test$(EE)
+       @echo
+       @echo 'All unit tests completed successfully!'
+       @echo
 
 tests : tests/testdai$(EE) tests/testem/testem$(EE) tests/testbbp$(EE) $(unittests)
 
-utils : utils/createfg$(EE) utils/fg2dot$(EE) utils/fginfo$(EE)
+utils : utils/createfg$(EE) utils/fg2dot$(EE) utils/fginfo$(EE) utils/uai2fg$(EE)
 
 lib: $(LIB)/libdai$(LE)
 
@@ -140,7 +173,7 @@ lib: $(LIB)/libdai$(LE)
 ##########
 
 %$(OE) : $(SRC)/%.cpp $(INC)/%.h $(HEADERS)
-       $(CC) -c $< -o $@
+       $(CC) -c $<
 
 bbp$(OE) : $(SRC)/bbp.cpp $(INC)/bbp.h $(INC)/bp_dual.h $(HEADERS)
        $(CC) -c $<
@@ -160,43 +193,39 @@ 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
-###########
-
-examples/example$(EE) : examples/example.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS)
-
-examples/example_bipgraph$(EE) : examples/example_bipgraph.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS)
+glc$(OE) : $(SRC)/glc.cpp $(INC)/glc.h $(HEADERS) $(INC)/cobwebgraph.h
+       $(CC) -c $<
 
-examples/example_varset$(EE) : examples/example_varset.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS)
 
-examples/example_permute$(EE) : examples/example_permute.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS)
+# EXAMPLES
+###########
 
-examples/example_sprinkler$(EE) : examples/example_sprinkler.cpp $(HEADERS) $(LIB)/libdai$(LE)
+examples/%$(EE) : examples/%.cpp $(HEADERS) $(LIB)/libdai$(LE)
        $(CC) $(CCO)$@ $< $(LIBS)
 
 examples/example_sprinkler_gibbs$(EE) : examples/example_sprinkler_gibbs.cpp $(HEADERS) $(LIB)/libdai$(LE)
        $(CC) $(CCO)$@ $< $(LIBS)
 
-examples/example_sprinkler_em$(EE) : examples/example_sprinkler_em.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS)
+examples/example_imagesegmentation$(EE) : examples/example_imagesegmentation.cpp $(HEADERS) $(LIB)/libdai$(LE)
+ifdef NEW_CIMG
+       $(CC) -DNEW_CIMG $(CIMGINC) $(CCO)$@ $< $(LIBS) $(CIMGLIBS)
+else
+       $(CC) $(CIMGINC) $(CCO)$@ $< $(LIBS) $(CIMGLIBS)
+endif
 
 
 # UNIT TESTS
 #############
 
-tests/unit/var$(EE) : tests/unit/var.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF)
-tests/unit/smallset$(EE) : tests/unit/smallset.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF)
-tests/unit/varset$(EE) : tests/unit/varset.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF)
-tests/unit/graph$(EE) : tests/unit/graph.cpp $(HEADERS) $(LIB)/libdai$(LE)
-       $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF)
+tests/unit/%$(EE) : tests/unit/%.cpp $(HEADERS) $(LIB)/libdai$(LE)
+ifneq ($(OS),WINDOWS)
+       $(CC) -DBOOST_TEST_DYN_LINK $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF)
+else
+       $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_UTF) /SUBSYSTEM:CONSOLE
+endif
 
 
 # TESTS
@@ -206,28 +235,31 @@ tests/testdai$(EE) : tests/testdai.cpp $(HEADERS) $(LIB)/libdai$(LE)
        $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
 tests/testem/testem$(EE) : tests/testem/testem.cpp $(HEADERS) $(LIB)/libdai$(LE)
        $(CC) $(CCO)$@ $< $(LIBS) $(BOOSTLIBS_PO)
-
 tests/testbbp$(EE) : tests/testbbp.cpp $(HEADERS) $(LIB)/libdai$(LE)
+ifdef WITH_CBP
        $(CC) $(CCO)$@ $< $(LIBS)
+else
+       @echo Skipping $@
+endif
 
 
 # MATLAB INTERFACE
 ###################
 
-matlab/dai$(ME) : $(SRC)/matlab/dai.cpp $(HEADERS) matlab$(OE) $(LIB)/libdai$(LE)
-       $(MEX) -o$@ $< matlab$(OE) $(LIB)/libdai$(LE)
+matlab/dai$(ME) : $(SRC)/matlab/dai.cpp $(HEADERS) $(SOURCES) $(SRC)/matlab/matlab.cpp
+       $(MEX) -output $@ $< $(SRC)/matlab/matlab.cpp $(SOURCES)
 
-matlab/dai_readfg$(ME) : $(SRC)/matlab/dai_readfg.cpp $(HEADERS) factorgraph$(OE) matlab$(OE) exceptions$(OE) bipgraph$(OE)
-       $(MEX) -o$@ $< factorgraph$(OE) matlab$(OE) exceptions$(OE) bipgraph$(OE)
+matlab/dai_readfg$(ME) : $(SRC)/matlab/dai_readfg.cpp $(HEADERS) $(SRC)/matlab/matlab.cpp $(SRC)/factorgraph.cpp $(SRC)/exceptions.cpp $(SRC)/bipgraph.cpp $(SRC)/graph.cpp $(SRC)/factor.cpp $(SRC)/util.cpp
+       $(MEX) -output $@ $< $(SRC)/matlab/matlab.cpp $(SRC)/factorgraph.cpp $(SRC)/exceptions.cpp $(SRC)/bipgraph.cpp $(SRC)/graph.cpp $(SRC)/factor.cpp $(SRC)/util.cpp
 
-matlab/dai_writefg$(ME) : $(SRC)/matlab/dai_writefg.cpp $(HEADERS) factorgraph$(OE) matlab$(OE) exceptions$(OE) bipgraph$(OE)
-       $(MEX) -o$@ $< factorgraph$(OE) matlab$(OE) exceptions$(OE) bipgraph$(OE)
+matlab/dai_writefg$(ME) : $(SRC)/matlab/dai_writefg.cpp $(HEADERS) $(SRC)/matlab/matlab.cpp $(SRC)/factorgraph.cpp $(SRC)/exceptions.cpp $(SRC)/bipgraph.cpp $(SRC)/graph.cpp $(SRC)/factor.cpp $(SRC)/util.cpp
+       $(MEX) -output $@ $< $(SRC)/matlab/matlab.cpp $(SRC)/factorgraph.cpp $(SRC)/exceptions.cpp $(SRC)/bipgraph.cpp $(SRC)/graph.cpp $(SRC)/factor.cpp $(SRC)/util.cpp
 
-matlab/dai_potstrength$(ME) : $(SRC)/matlab/dai_potstrength.cpp $(HEADERS) matlab$(OE) exceptions$(OE)
-       $(MEX) -o$@ $< matlab$(OE) exceptions$(OE)
+matlab/dai_potstrength$(ME) : $(SRC)/matlab/dai_potstrength.cpp $(HEADERS) $(SRC)/matlab/matlab.cpp $(SRC)/exceptions.cpp
+       $(MEX) -output $@ $< $(SRC)/matlab/matlab.cpp $(SRC)/exceptions.cpp
 
-matlab$(OE) : $(SRC)/matlab/matlab.cpp $(INC)/matlab/matlab.h $(HEADERS)
-       $(MEX) -c $<
+matlab/dai_jtree$(ME) : $(SRC)/matlab/dai_jtree.cpp $(HEADERS) $(SOURCES) $(SRC)/matlab/matlab.cpp
+       $(MEX) -output $@ $< $(SRC)/matlab/matlab.cpp $(SOURCES)
 
 
 # UTILS
@@ -242,12 +274,13 @@ utils/fg2dot$(EE) : utils/fg2dot.cpp $(HEADERS) $(LIB)/libdai$(LE)
 utils/fginfo$(EE) : utils/fginfo.cpp $(HEADERS) $(LIB)/libdai$(LE)
        $(CC) $(CCO)$@ $< $(LIBS)
 
+utils/uai2fg$(EE) : utils/uai2fg.cpp $(HEADERS) $(LIB)/libdai$(LE)
+       $(CC) $(CCO)$@ $< $(LIBS)
+
 
 # LIBRARY
 ##########
 
-OBJECTS:=bipgraph$(OE) graph$(OE) varset$(OE) daialg$(OE) alldai$(OE) clustergraph$(OE) factor$(OE) factorgraph$(OE) properties$(OE) regiongraph$(OE) util$(OE) weightedgraph$(OE) exceptions$(OE) $(OBJECTS) 
-
 ifneq ($(OS),WINDOWS)
 $(LIB)/libdai$(LE) : $(OBJECTS)
        -mkdir -p lib
@@ -285,7 +318,7 @@ endif
 doc : $(INC)/*.h $(SRC)/*.cpp examples/*.cpp doxygen.conf
        doxygen doxygen.conf
 
-README : doc scripts/makeREADME
+README : doc scripts/makeREADME Makefile
        DAI_VERSION=$(DAI_VERSION) DAI_DATE=$(DAI_DATE) scripts/makeREADME
 
 TAGS :
@@ -296,44 +329,46 @@ TAGS :
 # CLEAN
 ########
 
-ifneq ($(OS),WINDOWS)
 .PHONY : clean
+ifneq ($(OS),WINDOWS)
 clean :
-       -rm *$(OE)
+       -rm $(OBJECTS)
        -rm matlab/*$(ME)
-       -rm examples/example$(EE) examples/example_bipgraph$(EE) examples/example_varset$(EE) examples/example_permute$(EE) examples/example_sprinkler$(EE) examples/example_sprinkler_gibbs$(EE) examples/example_sprinkler_em$(EE)
+       -rm examples/example$(EE) examples/example_bipgraph$(EE) examples/example_varset$(EE) examples/example_permute$(EE) examples/example_sprinkler$(EE) examples/example_sprinkler_gibbs$(EE) examples/example_sprinkler_em$(EE) examples/example_imagesegmentation$(EE)
        -rm tests/testdai$(EE) tests/testem/testem$(EE) tests/testbbp$(EE)
-       -rm tests/unit/var$(EE) tests/unit/smallset$(EE) tests/unit/varset$(EE) tests/unit/graph$(EE)
-       -rm utils/fg2dot$(EE) utils/createfg$(EE) utils/fginfo$(EE)
+       -rm tests/unit/var_test$(EE) tests/unit/smallset_test$(EE) tests/unit/varset_test$(EE) tests/unit/graph_test$(EE) tests/unit/dag_test$(EE) tests/unit/bipgraph_test$(EE) tests/unit/weightedgraph_test$(EE) tests/unit/enum_test$(EE) tests/unit/util_test$(EE) tests/unit/exceptions_test$(EE) tests/unit/properties_test$(EE) tests/unit/index_test$(EE) tests/unit/prob_test$(EE) tests/unit/factor_test$(EE) tests/unit/factorgraph_test$(EE) tests/unit/clustergraph_test$(EE) tests/unit/regiongraph_test$(EE) tests/unit/daialg_test$(EE) tests/unit/alldai_test$(EE)
+       -rm factorgraph_test.fg alldai_test.aliases
+       -rm utils/fg2dot$(EE) utils/createfg$(EE) utils/fginfo$(EE) utils/uai2fg$(EE)
        -rm -R doc
        -rm -R lib
 else
-.PHONY : clean
 clean :
-       -del *$(OE)
+       -del *.obj
        -del *.ilk
        -del *.pdb
-       -del *$(EE)
        -del matlab\*$(ME)
        -del examples\*$(EE)
+       -del examples\*$(EE).manifest
        -del examples\*.ilk
        -del examples\*.pdb
-       -del tests\testdai$(EE)
-       -del tests\testbbp$(EE)
-       -del tests\testem\testem$(EE)
+       -del tests\*$(EE)
+       -del tests\*$(EE).manifest
        -del tests\*.pdb
        -del tests\*.ilk
+       -del tests\testem\*$(EE)
+       -del tests\testem\*$(EE).manifest
        -del tests\testem\*.pdb
        -del tests\testem\*.ilk
        -del utils\*$(EE)
+       -del utils\*$(EE).manifest
        -del utils\*.pdb
        -del utils\*.ilk
-       -del tests\unit\*.pdk
-       -del tests\unit\*.ilk
-       -del tests\unit\var$(EE)
-       -del tests\unit\smallset$(EE)
-       -del tests\unit\varset$(EE)
-       -del tests\unit\graph$(EE)
+       -del tests\unit\*_test$(EE)
+       -del tests\unit\*_test$(EE).manifest
+       -del tests\unit\*_test.pdb
+       -del tests\unit\*_test.ilk
+       -del factorgraph_test.fg
+       -del alldai_test.aliases
        -del $(LIB)\libdai$(LE)
        -rmdir lib
 endif