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)/BayesNet.h \
|
2012-04-05 18:38:56 +01:00
|
|
|
$(srcdir)/BayesBall.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 \
|
2012-04-05 23:00:48 +01:00
|
|
|
$(srcdir)/BpSolver.h \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/CbpSolver.h \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/FoveSolver.h \
|
2012-04-05 23:00:48 +01:00
|
|
|
$(srcdir)/Var.h \
|
2012-03-22 11:33:24 +00:00
|
|
|
$(srcdir)/Indexer.h \
|
|
|
|
$(srcdir)/Parfactor.h \
|
|
|
|
$(srcdir)/ProbFormula.h \
|
|
|
|
$(srcdir)/Histogram.h \
|
|
|
|
$(srcdir)/ParfactorList.h \
|
|
|
|
$(srcdir)/LiftedUtils.h \
|
|
|
|
$(srcdir)/TinySet.h \
|
|
|
|
$(srcdir)/Util.h \
|
2012-04-05 20:08:54 +01:00
|
|
|
$(srcdir)/Horus.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 \
|
2012-04-05 18:38:56 +01:00
|
|
|
$(srcdir)/BayesBall.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 \
|
2012-04-05 23:00:48 +01:00
|
|
|
$(srcdir)/Var.cpp \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(srcdir)/Solver.cpp \
|
|
|
|
$(srcdir)/VarElimSolver.cpp \
|
2012-04-05 23:00:48 +01:00
|
|
|
$(srcdir)/BpSolver.cpp \
|
2011-12-10 23:12:10 +00:00
|
|
|
$(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 \
|
2012-04-05 20:08:54 +01:00
|
|
|
$(srcdir)/HorusCli.cpp
|
2011-02-23 15:31:56 +00:00
|
|
|
|
|
|
|
OBJS = \
|
2011-05-17 12:00:33 +01:00
|
|
|
BayesNet.o \
|
2012-04-05 18:38:56 +01:00
|
|
|
BayesBall.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 \
|
2012-04-05 23:00:48 +01:00
|
|
|
Var.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
Solver.o \
|
|
|
|
VarElimSolver.o \
|
2012-04-05 23:00:48 +01:00
|
|
|
BpSolver.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
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 \
|
2012-04-05 18:38:56 +01:00
|
|
|
BayesBall.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 \
|
2012-04-05 23:00:48 +01:00
|
|
|
Var.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
Solver.o \
|
|
|
|
VarElimSolver.o \
|
2012-04-05 23:00:48 +01:00
|
|
|
BpSolver.o \
|
2011-12-10 23:12:10 +00:00
|
|
|
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
|
|
|
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-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:
|
2012-04-05 20:08:54 +01:00
|
|
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK hcli
|
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.
|
|
|
|
|