2012-05-23 14:56:01 +01:00
|
|
|
#
|
|
|
|
# default base directory for YAP installation
|
|
|
|
# (EROOT for architecture-dependent files)
|
|
|
|
#
|
|
|
|
GCC = @GCC@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
ROOTDIR = $(prefix)
|
|
|
|
EROOTDIR = @exec_prefix@
|
|
|
|
abs_top_builddir = @abs_top_builddir@
|
|
|
|
#
|
|
|
|
# where the binary should be
|
|
|
|
#
|
|
|
|
BINDIR = $(EROOTDIR)/bin
|
|
|
|
#
|
|
|
|
# where YAP should look for libraries
|
|
|
|
#
|
|
|
|
LIBDIR=@libdir@
|
|
|
|
YAPLIBDIR=@libdir@/Yap
|
|
|
|
#
|
|
|
|
#
|
|
|
|
CC=@CC@
|
|
|
|
CXX=@CXX@
|
|
|
|
|
|
|
|
# normal
|
2013-03-18 15:08:06 +00:00
|
|
|
CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../.. -I$(srcdir)/../../../include @CPPFLAGS@ -DNDEBUG
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
# debug
|
2013-03-18 15:08:06 +00:00
|
|
|
#CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../.. -I$(srcdir)/../../../include @CPPFLAGS@ -g -O0 -Wextra
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# You shouldn't need to change what follows.
|
|
|
|
#
|
|
|
|
INSTALL=@INSTALL@
|
|
|
|
INSTALL_DATA=@INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
|
|
SHELL=/bin/sh
|
|
|
|
RANLIB=@RANLIB@
|
|
|
|
srcdir=@srcdir@
|
|
|
|
SO=@SO@
|
|
|
|
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
|
|
|
|
CWD=$(PWD)
|
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
utestsdir=@srcdir@/unit_tests
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-18 14:42:54 +00:00
|
|
|
MAIN_HEADERS = \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/BayesBall.h \
|
2012-06-19 14:32:12 +01:00
|
|
|
$(srcdir)/BayesBallGraph.h \
|
2012-06-12 16:29:57 +01:00
|
|
|
$(srcdir)/BeliefProp.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ConstraintTree.h \
|
2012-06-12 16:29:57 +01:00
|
|
|
$(srcdir)/CountingBp.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ElimGraph.h \
|
|
|
|
$(srcdir)/Factor.h \
|
|
|
|
$(srcdir)/FactorGraph.h \
|
2013-03-04 15:47:47 +00:00
|
|
|
$(srcdir)/GenericFactor.h \
|
2013-02-16 16:42:08 +00:00
|
|
|
$(srcdir)/GroundSolver.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/Histogram.h \
|
|
|
|
$(srcdir)/Horus.h \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/Indexer.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/LiftedBp.h \
|
2012-12-17 18:39:42 +00:00
|
|
|
$(srcdir)/LiftedKc.h \
|
|
|
|
$(srcdir)/LiftedOperations.h \
|
|
|
|
$(srcdir)/LiftedSolver.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/LiftedUtils.h \
|
|
|
|
$(srcdir)/LiftedVe.h \
|
2012-12-17 18:39:42 +00:00
|
|
|
$(srcdir)/LiftedWCNF.h \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/Parfactor.h \
|
|
|
|
$(srcdir)/ParfactorList.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ProbFormula.h \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/TinySet.h \
|
|
|
|
$(srcdir)/Util.h \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/Var.h \
|
|
|
|
$(srcdir)/VarElim.h \
|
|
|
|
$(srcdir)/WeightedBp.h
|
2012-12-17 18:39:42 +00:00
|
|
|
|
2013-03-18 14:42:54 +00:00
|
|
|
UTESTS_HEADERS = \
|
|
|
|
$(utestsdir)/Common.h
|
|
|
|
|
|
|
|
HEADERS = \
|
|
|
|
$(MAIN_HEADERS) \
|
|
|
|
$(UTESTS_HEADERS)
|
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
MAIN_SOURCES = \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/BayesBall.cpp \
|
2012-06-19 14:32:12 +01:00
|
|
|
$(srcdir)/BayesBallGraph.cpp \
|
2012-06-12 16:29:57 +01:00
|
|
|
$(srcdir)/BeliefProp.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ConstraintTree.cpp \
|
2012-06-12 16:29:57 +01:00
|
|
|
$(srcdir)/CountingBp.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ElimGraph.cpp \
|
|
|
|
$(srcdir)/Factor.cpp \
|
|
|
|
$(srcdir)/FactorGraph.cpp \
|
2013-03-04 15:47:47 +00:00
|
|
|
$(srcdir)/GenericFactor.cpp \
|
2013-02-16 16:42:08 +00:00
|
|
|
$(srcdir)/GroundSolver.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/Histogram.cpp \
|
|
|
|
$(srcdir)/HorusCli.cpp \
|
|
|
|
$(srcdir)/HorusYap.cpp \
|
2013-02-16 16:42:08 +00:00
|
|
|
$(srcdir)/Indexer.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/LiftedBp.cpp \
|
2012-12-17 18:39:42 +00:00
|
|
|
$(srcdir)/LiftedKc.cpp \
|
|
|
|
$(srcdir)/LiftedOperations.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/LiftedUtils.cpp \
|
2012-06-12 16:29:57 +01:00
|
|
|
$(srcdir)/LiftedVe.cpp \
|
2012-12-17 18:39:42 +00:00
|
|
|
$(srcdir)/LiftedWCNF.cpp \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/Parfactor.cpp \
|
|
|
|
$(srcdir)/ParfactorList.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/ProbFormula.cpp \
|
2012-05-23 14:56:01 +01:00
|
|
|
$(srcdir)/Util.cpp \
|
2012-06-12 16:55:32 +01:00
|
|
|
$(srcdir)/Var.cpp \
|
|
|
|
$(srcdir)/VarElim.cpp \
|
2012-10-22 23:01:13 +01:00
|
|
|
$(srcdir)/WeightedBp.cpp
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
UTESTS_SOURCES = \
|
2013-03-18 14:42:54 +00:00
|
|
|
$(utestsdir)/BeliefPropTest.cpp \
|
|
|
|
$(utestsdir)/Common.cpp \
|
|
|
|
$(utestsdir)/CountingBpTest.cpp \
|
|
|
|
$(utestsdir)/FactorTest.cpp \
|
|
|
|
$(utestsdir)/VarElimTest.cpp \
|
2013-03-13 14:47:14 +00:00
|
|
|
$(utestsdir)/UnitTesting.cpp
|
|
|
|
|
|
|
|
SOURCES = \
|
|
|
|
$(MAIN_SOURCES) \
|
|
|
|
$(UTESTS_SOURCES)
|
|
|
|
|
|
|
|
OBJS = \
|
2012-05-23 14:56:01 +01:00
|
|
|
BayesBall.o \
|
2012-06-19 14:32:12 +01:00
|
|
|
BayesBallGraph.o \
|
2012-06-12 16:29:57 +01:00
|
|
|
BeliefProp.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
ConstraintTree.o \
|
2012-06-12 16:29:57 +01:00
|
|
|
CountingBp.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
ElimGraph.o \
|
|
|
|
Factor.o \
|
|
|
|
FactorGraph.o \
|
2013-03-04 15:47:47 +00:00
|
|
|
GenericFactor.o \
|
2013-02-16 16:42:08 +00:00
|
|
|
GroundSolver.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
Histogram.o \
|
2013-02-16 16:42:08 +00:00
|
|
|
Indexer.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
LiftedBp.o \
|
2012-12-17 18:39:42 +00:00
|
|
|
LiftedKc.o \
|
|
|
|
LiftedOperations.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
LiftedUtils.o \
|
2012-06-12 16:29:57 +01:00
|
|
|
LiftedVe.o \
|
2012-12-17 18:39:42 +00:00
|
|
|
LiftedWCNF.o \
|
2012-05-23 14:56:01 +01:00
|
|
|
ProbFormula.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
Parfactor.o \
|
2012-05-23 14:56:01 +01:00
|
|
|
ParfactorList.o \
|
|
|
|
Util.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
Var.o \
|
|
|
|
VarElim.o \
|
|
|
|
WeightedBp.o
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
LIB_OBJS = \
|
|
|
|
$(OBJS) \
|
|
|
|
HorusYap.o
|
|
|
|
|
2012-05-23 14:56:01 +01:00
|
|
|
HCLI_OBJS = \
|
|
|
|
BayesBall.o \
|
2012-06-19 14:32:12 +01:00
|
|
|
BayesBallGraph.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
BeliefProp.o \
|
|
|
|
CountingBp.o \
|
2012-05-23 14:56:01 +01:00
|
|
|
ElimGraph.o \
|
|
|
|
Factor.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
FactorGraph.o \
|
2013-03-04 15:47:47 +00:00
|
|
|
GenericFactor.o \
|
2012-11-14 21:55:51 +00:00
|
|
|
GroundSolver.o \
|
2013-02-16 16:42:08 +00:00
|
|
|
HorusCli.o \
|
|
|
|
Indexer.o \
|
2012-05-23 14:56:01 +01:00
|
|
|
Util.o \
|
2012-06-12 16:55:32 +01:00
|
|
|
Var.o \
|
|
|
|
VarElim.o \
|
|
|
|
WeightedBp.o
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
UTESTS_OBJS = \
|
|
|
|
$(OBJS) \
|
2013-03-18 14:42:54 +00:00
|
|
|
$(utestsdir)/BeliefPropTest.o \
|
|
|
|
$(utestsdir)/Common.o \
|
|
|
|
$(utestsdir)/CountingBpTest.o \
|
|
|
|
$(utestsdir)/FactorTest.o \
|
|
|
|
$(utestsdir)/VarElimTest.o \
|
2013-03-13 14:47:14 +00:00
|
|
|
$(utestsdir)/UnitTesting.o
|
|
|
|
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2014-02-11 13:56:40 +00:00
|
|
|
SOBJS = horus.@SO@
|
2014-09-16 19:15:56 +01:00
|
|
|
HCLI = hcli@EXEC_SUFFIX@
|
2013-03-13 14:47:14 +00:00
|
|
|
UTESTING = $(srcdir)/run_tests
|
|
|
|
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2014-02-11 13:56:40 +00:00
|
|
|
all: $(SOBJS) $(HCLI)
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
|
2013-04-11 23:16:51 +01:00
|
|
|
# Don't require $(UTESTING) by default as we
|
|
|
|
# don't want a hard dependency on CppUnit
|
2014-02-11 13:56:40 +00:00
|
|
|
with_tests: $(SOBJS) $(HCLI) $(UTESTING)
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
|
2014-02-11 13:56:40 +00:00
|
|
|
@DO_SECOND_LD@$(SOBJS): $(LIB_OBJS)
|
2013-11-10 11:22:54 +00:00
|
|
|
@DO_SECOND_LD@ @SHLIB_CXX_LD@ $(LDFLAGS) -o $@ $(LIB_OBJS) @EXTRA_LIBS_FOR_SWIDLLS@
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
|
2013-03-12 21:11:43 +00:00
|
|
|
$(HCLI): $(HCLI_OBJS)
|
|
|
|
$(CXX) -o $@ $(HCLI_OBJS)
|
|
|
|
|
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
$(UTESTING): $(UTESTS_OBJS)
|
|
|
|
$(CXX) -o $@ $(UTESTS_OBJS) -lcppunit
|
|
|
|
|
|
|
|
|
2013-03-12 21:11:43 +00:00
|
|
|
# default rule
|
|
|
|
%.o : $(srcdir)/%.cpp
|
|
|
|
$(CXX) -o $@ -c $(CXXFLAGS) $<
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
|
2014-02-13 02:02:51 +00:00
|
|
|
install: all install-examples
|
2014-02-11 13:56:40 +00:00
|
|
|
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
|
2014-10-02 23:22:19 +01:00
|
|
|
$(INSTALL_PROGRAM) $(HCLI) $(DESTDIR)$(BINDIR)
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2014-02-13 01:58:48 +00:00
|
|
|
install-examples:
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
clean:
|
2014-02-11 13:56:40 +00:00
|
|
|
rm -f $(SOBJS) $(HCLI) $(UTESTING) *.o *~ $(utestsdir)/*.o $(utestsdir)/*~
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2014-02-11 13:56:40 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile
|
2012-05-23 14:56:01 +01:00
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
remove_dots:
|
|
|
|
rm -f *.dot *.png *.svg
|
2012-05-23 14:56:01 +01:00
|
|
|
|
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
depend: $(SOURCES) $(HEADERS)
|
2012-05-23 14:56:01 +01:00
|
|
|
-@if test "$(GCC)" = yes; then\
|
2013-03-13 14:47:14 +00:00
|
|
|
for F in $(SOURCES); do \
|
|
|
|
D=`dirname $$F`; \
|
|
|
|
B=`basename $$F .cpp`; \
|
|
|
|
$(CXX) $(CXXFLAGS) -MM -MG -MT "$$D/$$B.o" -I$(srcdir)/../../../../H -I$(srcdir)/../../../../include $$F >> Makefile; \
|
|
|
|
done; \
|
2012-05-23 14:56:01 +01:00
|
|
|
else\
|
2013-03-13 14:47:14 +00:00
|
|
|
makedepend -- $(CXXFLAGS) -- -I$(srcdir)/../../../../H -I$(srcdir)/../../../../include $(SOURCES); \
|
2012-05-23 14:56:01 +01:00
|
|
|
fi
|
|
|
|
|
2013-03-13 14:47:14 +00:00
|
|
|
|
|
|
|
.PHONY: default all install clean remove_dots depend
|
|
|
|
|
|
|
|
|
2012-05-23 14:56:01 +01:00
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|
|
|