2011-02-23 15:31:56 +00: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@
|
2011-05-17 12:00:33 +01:00
|
|
|
|
|
|
|
# normal
|
2012-03-22 11:33:24 +00:00
|
|
|
#CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../../.. -I$(srcdir)/../../../../include @CPPFLAGS@ -DNDEBUG
|
2011-05-17 12:00:33 +01:00
|
|
|
|
|
|
|
# debug
|
2012-03-22 11:33:24 +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
|
2011-05-17 12:00:33 +01:00
|
|
|
|
|
|
|
|
2011-02-23 15:31:56 +00: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)
|
|
|
|
|
|
|
|
|
|
|
|
HEADERS = \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/GraphicalModel.h \
|
|
|
|
$(srcdir)/BayesNet.h \
|
|
|
|
$(srcdir)/BayesNode.h \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/ElimGraph.h \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/FactorGraph.h \
|
|
|
|
$(srcdir)/Factor.h \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/CFactorGraph.h \
|
|
|
|
$(srcdir)/ConstraintTree.h \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/Solver.h \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/VarElimSolver.h \
|
|
|
|
$(srcdir)/BnBpSolver.h \
|
|
|
|
$(srcdir)/FgBpSolver.h \
|
|
|
|
$(srcdir)/CbpSolver.h \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/FoveSolver.h \
|
|
|
|
$(srcdir)/VarNode.h \
|
|
|
|
$(srcdir)/Distribution.h \
|
|
|
|
$(srcdir)/Indexer.h \
|
|
|
|
$(srcdir)/Parfactor.h \
|
|
|
|
$(srcdir)/ProbFormula.h \
|
|
|
|
$(srcdir)/Histogram.h \
|
|
|
|
$(srcdir)/ParfactorList.h \
|
|
|
|
$(srcdir)/LiftedUtils.h \
|
|
|
|
$(srcdir)/TinySet.h \
|
|
|
|
$(srcdir)/Util.h \
|
|
|
|
$(srcdir)/Horus.h \
|
2011-02-23 15:31:56 +00:00
|
|
|
$(srcdir)/xmlParser/xmlParser.h
|
2012-03-22 11:33:24 +00:00
|
|
|
|
2011-02-23 15:31:56 +00:00
|
|
|
CPP_SOURCES = \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/BayesNet.cpp \
|
|
|
|
$(srcdir)/BayesNode.cpp \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/ElimGraph.cpp \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/FactorGraph.cpp \
|
|
|
|
$(srcdir)/Factor.cpp \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/CFactorGraph.cpp \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/ConstraintTree.cpp \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/VarNode.cpp \
|
|
|
|
$(srcdir)/Solver.cpp \
|
|
|
|
$(srcdir)/VarElimSolver.cpp \
|
|
|
|
$(srcdir)/BnBpSolver.cpp \
|
|
|
|
$(srcdir)/FgBpSolver.cpp \
|
|
|
|
$(srcdir)/CbpSolver.cpp \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/FoveSolver.cpp \
|
|
|
|
$(srcdir)/Parfactor.cpp \
|
|
|
|
$(srcdir)/ProbFormula.cpp \
|
|
|
|
$(srcdir)/Histogram.cpp \
|
|
|
|
$(srcdir)/ParfactorList.cpp \
|
|
|
|
$(srcdir)/LiftedUtils.cpp \
|
2011-07-22 21:33:30 +01:00
|
|
|
$(srcdir)/Util.cpp \
|
2011-05-17 12:00:33 +01:00
|
|
|
$(srcdir)/HorusYap.cpp \
|
|
|
|
$(srcdir)/HorusCli.cpp \
|
2011-02-23 15:31:56 +00:00
|
|
|
$(srcdir)/xmlParser/xmlParser.cpp
|
|
|
|
|
|
|
|
OBJS = \
|
2011-05-17 12:00:33 +01:00
|
|
|
BayesNet.o \
|
|
|
|
BayesNode.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
ElimGraph.o \
|
2011-05-17 12:00:33 +01:00
|
|
|
FactorGraph.o \
|
|
|
|
Factor.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
CFactorGraph.o \
|
2012-03-22 11:33:24 +00:00
|
|
|
ConstraintTree.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
VarNode.o \
|
|
|
|
Solver.o \
|
|
|
|
VarElimSolver.o \
|
|
|
|
BnBpSolver.o \
|
|
|
|
FgBpSolver.o \
|
|
|
|
CbpSolver.o \
|
2012-03-22 11:33:24 +00:00
|
|
|
FoveSolver.o \
|
|
|
|
Parfactor.o \
|
|
|
|
ProbFormula.o \
|
|
|
|
Histogram.o \
|
|
|
|
ParfactorList.o \
|
|
|
|
LiftedUtils.o \
|
2011-07-22 21:33:30 +01:00
|
|
|
Util.o \
|
|
|
|
HorusYap.o
|
|
|
|
|
|
|
|
HCLI_OBJS = \
|
|
|
|
BayesNet.o \
|
|
|
|
BayesNode.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
ElimGraph.o \
|
2011-07-22 21:33:30 +01:00
|
|
|
FactorGraph.o \
|
|
|
|
Factor.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
CFactorGraph.o \
|
2012-03-22 11:33:24 +00:00
|
|
|
ConstraintTree.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
VarNode.o \
|
|
|
|
Solver.o \
|
|
|
|
VarElimSolver.o \
|
|
|
|
BnBpSolver.o \
|
|
|
|
FgBpSolver.o \
|
|
|
|
CbpSolver.o \
|
2012-03-22 11:33:24 +00:00
|
|
|
FoveSolver.o \
|
|
|
|
Parfactor.o \
|
|
|
|
ProbFormula.o \
|
|
|
|
Histogram.o \
|
|
|
|
ParfactorList.o \
|
|
|
|
LiftedUtils.o \
|
2011-07-22 21:33:30 +01:00
|
|
|
Util.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
xmlParser/xmlParser.o \
|
|
|
|
HorusCli.o
|
2011-02-23 15:31:56 +00:00
|
|
|
|
|
|
|
SOBJS=horus.@SO@
|
|
|
|
|
|
|
|
|
2011-07-22 21:33:30 +01:00
|
|
|
all: $(SOBJS) hcli
|
2011-02-23 15:31:56 +00:00
|
|
|
|
|
|
|
# default rule
|
2011-05-17 12:00:33 +01:00
|
|
|
%.o : $(srcdir)/%.cpp
|
2011-03-01 09:18:19 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS) $< -o $@
|
|
|
|
|
2011-05-17 12:00:33 +01:00
|
|
|
|
2011-12-12 15:29:51 +00:00
|
|
|
xmlParser/xmlParser.o : $(srcdir)/xmlParser/xmlParser.cpp
|
2011-02-23 15:31:56 +00:00
|
|
|
$(CXX) -c $(CXXFLAGS) $< -o $@
|
|
|
|
|
2011-05-17 12:00:33 +01:00
|
|
|
|
2011-02-23 15:31:56 +00:00
|
|
|
@DO_SECOND_LD@horus.@SO@: $(OBJS)
|
2011-03-09 00:02:21 +00:00
|
|
|
@DO_SECOND_LD@ @SHLIB_CXX_LD@ -o horus.@SO@ $(OBJS) @EXTRA_LIBS_FOR_SWIDLLS@
|
2011-02-23 15:31:56 +00:00
|
|
|
|
2011-05-17 12:00:33 +01:00
|
|
|
|
2011-07-22 21:33:30 +01:00
|
|
|
hcli: $(HCLI_OBJS)
|
2011-05-17 12:00:33 +01:00
|
|
|
$(CXX) -o hcli $(HCLI_OBJS)
|
2011-02-23 15:31:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
install: all
|
|
|
|
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR) $(YAPLIBDIR)
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2011-05-17 12:00:33 +01:00
|
|
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK hcli xmlParser/*.o
|
2011-02-23 15:31:56 +00:00
|
|
|
|
|
|
|
|
2012-03-22 11:33:24 +00:00
|
|
|
erase_dots:
|
|
|
|
rm -f *.dot *.png
|
|
|
|
|
|
|
|
|
2011-02-23 15:31:56 +00:00
|
|
|
depend: $(HEADERS) $(CPP_SOURCES)
|
|
|
|
-@if test "$(GCC)" = yes; then\
|
2011-05-17 12:00:33 +01:00
|
|
|
$(CC) -std=c++0x -MM -MG $(CFLAGS) -I$(srcdir) -I$(srcdir)/../../../../include -I$(srcdir)/../../../../H $(CPP_SOURCES) >> Makefile;\
|
2011-02-23 15:31:56 +00:00
|
|
|
else\
|
|
|
|
makedepend -f - -- $(CFLAGS) -I$(srcdir)/../../../../H -I$(srcdir)/../../../../include -- $(CPP_SOURCES) |\
|
|
|
|
sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\
|
|
|
|
fi
|
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|
|
|