|
# -*-Makefile-*- |
|
# |
|
# Main authors: |
|
# Christian Schulte <schulte@gecode.org> |
|
# Guido Tack <tack@gecode.org> |
|
# |
|
# Copyright: |
|
# Christian Schulte, 2005 |
|
# Guido Tack, 2005 |
|
# |
|
# Last modified: |
|
# $Date: 2012-03-21 16:25:08 +1100 (Wed, 21 Mar 2012) $ by $Author: tack $ |
|
# $Revision: 12605 $ |
|
# |
|
# This file is part of Gecode, the generic constraint |
|
# development environment: |
|
# http://www.gecode.org |
|
# |
|
# Permission is hereby granted, free of charge, to any person obtaining |
|
# a copy of this software and associated documentation files (the |
|
# "Software"), to deal in the Software without restriction, including |
|
# without limitation the rights to use, copy, modify, merge, publish, |
|
# distribute, sublicense, and/or sell copies of the Software, and to |
|
# permit persons to whom the Software is furnished to do so, subject to |
|
# the following conditions: |
|
# |
|
# The above copyright notice and this permission notice shall be |
|
# included in all copies or substantial portions of the Software. |
|
# |
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
# |
|
|
|
# |
|
# General Settings |
|
# |
|
|
|
export prefix = |
|
export exec_prefix = ${prefix} |
|
export bindir = ${exec_prefix}/bin |
|
export libdir = ${exec_prefix}/lib |
|
export sharedlibdir = ${exec_prefix}/lib |
|
export includedir = ${prefix}/include |
|
export srcdir = . |
|
export datarootdir = ${prefix}/share |
|
export datadir = ${datarootdir} |
|
export docdir= ${datarootdir}/doc/gecode |
|
export top_srcdir = . |
|
export top_builddir = . |
|
|
|
# Install to different root directory |
|
DESTDIR= |
|
|
|
export subdirs = |
|
|
|
export VERSION = 3.7.3 |
|
|
|
export CXX = g++ |
|
export CC = gcc |
|
export MOC = |
|
ifeq "$(top_srcdir)" "$(top_builddir)" |
|
CPPFLAGS=-I$(top_srcdir) |
|
else |
|
CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) |
|
endif |
|
export CPPFLAGS |
|
export CXXFLAGS = $(CPPFLAGS) -mthreads -ffast-math -fno-strict-aliasing -O3 -ggdb -pipe -Wall -Wextra -DNDEBUG $(CXXUSR) |
|
export CFLAGS = $(CPPFLAGS) -mthreads -ffast-math -fno-strict-aliasing -O3 -ggdb -pipe -Wall -Wextra -DNDEBUG $(CUSR) |
|
export EXAMPLES_EXTRA_CXXFLAGS = |
|
|
|
export QT_CPPFLAGS = |
|
export LINKQT = |
|
|
|
ifeq "no" "yes" |
|
export LINKSTATICQT |
|
else |
|
export LINKSTATICQT = $(LINKQT) |
|
endif |
|
|
|
export BOOST_CPPFLAGS = |
|
export BOOST_LINK = |
|
|
|
export GLDFLAGS = |
|
export DLLFLAGS = -shared |
|
export DLLPATH = -L. |
|
|
|
export RANLIB = ranlib |
|
export TAR = tar |
|
|
|
# |
|
# Use suffixes to get consistent treatment of dots |
|
# |
|
export OBJSUFFIX = .o |
|
export SBJSUFFIX = .s |
|
export DLLSUFFIX = .dll |
|
export MANIFESTSUFFIX = .dll.manifest |
|
export RCSUFFIX = .dll.rc |
|
export RESSUFFIX = .dll.res |
|
export LIBSUFFIX = .dll |
|
export PDBSUFFIX = .pdb |
|
export EXPSUFFIX = .exp |
|
export STATICLIBSUFFIX = .a |
|
export EXESUFFIX = .exe |
|
|
|
export LIBPREFIX = libgecode |
|
export LINKPREFIX = -lgecode |
|
export LINKSUFFIX = |
|
|
|
export SOLINKSUFFIX = |
|
export SOSUFFIX = |
|
|
|
# |
|
# Programs |
|
# |
|
export RMF = rm -rf |
|
export MV = mv |
|
export MANIFEST = @true -nologo |
|
export FIXMANIFEST = perl $(top_srcdir)/misc/fixmanifest.perl $(DLLSUFFIX) |
|
export RESCOMP = @true -n -i$(top_srcdir) |
|
export RCGEN = perl $(top_srcdir)/misc/genrc.perl $(DLLSUFFIX) $(top_srcdir) |
|
|
|
ifeq "no" "yes" |
|
export CREATELINK = ln -fs |
|
else |
|
export CREATELINK = @true |
|
endif |
|
|
|
ifeq "no" "yes" |
|
%.res: %.rc |
|
$(RESCOMP) -fo $@ $< |
|
.PRECIOUS: %.res %.rc |
|
endif |
|
|
|
# |
|
# SUPPORT COMPONENTS |
|
# |
|
SUPPORTSRC0 = \ |
|
exception heap thread/thread thread/windows thread/pthreads |
|
SUPPORTHDR0 = \ |
|
block-allocator cast dynamic-array \ |
|
dynamic-stack exception heap \ |
|
macros random sort static-stack \ |
|
marked-pointer int-type auto-link \ |
|
thread thread/thread thread/windows thread/pthreads thread/none timer \ |
|
dynamic-queue bitset-base bitset |
|
|
|
SUPPORTSRC1 = $(SUPPORTSRC0:%=gecode/support/%.cpp) |
|
SUPPORTHDR = gecode/support.hh \ |
|
$(SUPPORTHDR0:%=gecode/support/%.hpp) |
|
SUPPORTOBJ = $(SUPPORTSRC1:%.cpp=%$(OBJSUFFIX)) |
|
SUPPORTSRC = $(SUPPORTSRC1) |
|
|
|
export SUPPORTDLL = $(LIBPREFIX)support$(DLLSUFFIX) |
|
export SUPPORTLIB = $(LIBPREFIX)support$(LIBSUFFIX) |
|
ifeq "no" "yes" |
|
export SUPPORTSONAME = \ |
|
$(LIBPREFIX)support$(SOSUFFIX) |
|
else |
|
export SUPPORTSONAME = |
|
endif |
|
export SUPPORTSTATICLIB = $(LIBPREFIX)support$(STATICLIBSUFFIX) |
|
export LINKSUPPORT = \ |
|
$(LINKPREFIX)support$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export SUPPORTRC = $(LIBPREFIX)support$(RCSUFFIX) |
|
export SUPPORTRES = $(LIBPREFIX)support$(RESSUFFIX) |
|
else |
|
export SUPPORTRES = |
|
export SUPPORTRC = |
|
endif |
|
|
|
SUPPORTBUILDDIRS = support support/thread |
|
|
|
|
|
# |
|
# KERNEL COMPONENTS |
|
# |
|
|
|
VARIMPHDR = \ |
|
gecode/kernel/var-type.hpp \ |
|
gecode/kernel/var-imp.hpp |
|
|
|
VARIMP = $(VARIMPHDR) |
|
|
|
KERNELSRC0 = \ |
|
archive core memory-manager branch region |
|
|
|
KERNELHDR0 = \ |
|
archive array shared-array core exception \ |
|
macros memory-config memory-manager region modevent range-list \ |
|
propagator advisor view var \ |
|
branch brancher brancher-view brancher-tiebreak \ |
|
brancher-val allocators global-prop-info |
|
|
|
KERNELSRC = $(KERNELSRC0:%=gecode/kernel/%.cpp) |
|
KERNELHDR = \ |
|
gecode/kernel.hh gecode/kernel/wait.hh \ |
|
$(KERNELHDR0:%=gecode/kernel/%.hpp) |
|
KERNELOBJ = $(KERNELSRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
export KERNELDLL = $(LIBPREFIX)kernel$(DLLSUFFIX) |
|
export KERNELLIB = $(LIBPREFIX)kernel$(LIBSUFFIX) |
|
ifeq "no" "yes" |
|
export KERNELSONAME = \ |
|
$(LIBPREFIX)kernel$(SOSUFFIX) |
|
else |
|
export KERNELSONAME = |
|
endif |
|
export KERNELSTATICLIB = $(LIBPREFIX)kernel$(STATICLIBSUFFIX) |
|
export LINKKERNEL = $(LINKPREFIX)kernel$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export KERNELRC = $(LIBPREFIX)kernel$(RCSUFFIX) |
|
export KERNELRES = $(LIBPREFIX)kernel$(RESSUFFIX) |
|
else |
|
export KERNELRES = |
|
export KERNELRC = |
|
endif |
|
|
|
KERNELBUILDDIRS = kernel |
|
|
|
EXTRA_HEADERS = gecode/support/config.hpp |
|
|
|
# |
|
# SEARCH COMPONENTS |
|
# |
|
|
|
SEARCHSRC0 = \ |
|
stop options \ |
|
parallel/engine \ |
|
dfs parallel/dfs \ |
|
bab parallel/bab \ |
|
restart parallel/restart |
|
SEARCHHDR0 = \ |
|
statistics.hpp stop.hpp options.hpp \ |
|
support.hh worker.hh \ |
|
sequential/path.hh sequential/dfs.hh sequential/bab.hh \ |
|
sequential/restart.hh \ |
|
parallel/path.hh parallel/engine.hh \ |
|
parallel/dfs.hh parallel/bab.hh \ |
|
parallel/restart.hh \ |
|
dfs.hpp bab.hpp restart.hpp |
|
|
|
SEARCHSRC = $(SEARCHSRC0:%=gecode/search/%.cpp) |
|
SEARCHHDR = gecode/search.hh $(SEARCHHDR0:%=gecode/search/%) |
|
SEARCHOBJ = $(SEARCHSRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
ifeq "yes" "yes" |
|
export SEARCHDLL = $(LIBPREFIX)search$(DLLSUFFIX) |
|
export SEARCHSTATICLIB = $(LIBPREFIX)search$(STATICLIBSUFFIX) |
|
export SEARCHLIB = $(LIBPREFIX)search$(LIBSUFFIX) |
|
export LINKSEARCH = $(LINKPREFIX)search$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export SEARCHSONAME = \ |
|
$(LIBPREFIX)search$(SOSUFFIX) |
|
else |
|
export SEARCHSONAME = |
|
ifeq "no" "yes" |
|
export SEARCHRC = $(LIBPREFIX)search$(RCSUFFIX) |
|
export SEARCHRES = $(LIBPREFIX)search$(RESSUFFIX) |
|
else |
|
export SEARCHRES = |
|
export SEARCHRC = |
|
endif |
|
endif |
|
else |
|
export SEARCHDLL = |
|
export SEARCHSTATICLIB = |
|
export SEARCHLIB = |
|
export LINKSEARCH = |
|
export SEARCHRES = |
|
export SEARCHRC = |
|
endif |
|
SEARCHBUILDDIRS = search search/sequential search/parallel |
|
|
|
# |
|
# INTEGER COMPONENTS |
|
# |
|
|
|
INTSRC0 = \ |
|
int-set.cpp var-imp/int.cpp var-imp/bool.cpp var/int.cpp \ |
|
var/bool.cpp array.cpp bool.cpp bool/eqv.cpp \ |
|
extensional/dfa.cpp extensional/tuple-set.cpp extensional.cpp \ |
|
dom.cpp rel.cpp precede.cpp element.cpp count.cpp \ |
|
arithmetic.cpp exec.cpp \ |
|
exec/when.cpp element/pair.cpp \ |
|
linear/int-post.cpp linear-int.cpp \ |
|
linear/bool-post.cpp linear-bool.cpp \ |
|
branch.cpp distinct.cpp sorted.cpp gcc.cpp \ |
|
channel.cpp channel/link-single.cpp channel/link-multi.cpp \ |
|
unshare.cpp sequence.cpp \ |
|
bin-packing.cpp bin-packing/propagate.cpp \ |
|
unary.cpp cumulative.cpp cumulatives.cpp \ |
|
circuit.cpp no-overlap.cpp nvalues.cpp \ |
|
member.cpp |
|
|
|
INTHDR0 = \ |
|
limits.hpp support-values.hh support-values.hpp \ |
|
exec.hh exec/when.hpp \ |
|
arithmetic/abs.hpp arithmetic/max.hpp arithmetic/mult.hpp \ |
|
arithmetic/sqr.hpp arithmetic/sqrt.hpp arithmetic/divmod.hpp \ |
|
bool/or.hpp bool/eq.hpp bool/lq.hpp bool/eqv.hpp bool/base.hpp \ |
|
bool/clause.hpp \ |
|
precede.hh precede/single.hpp \ |
|
branch/post-val-int.hpp branch/post-val-bool.hpp \ |
|
branch/select-val.hpp \ |
|
branch/select-values.hpp branch/select-view.hpp \ |
|
count.hh count/rel.hpp \ |
|
count/int-base.hpp count/int-eq.hpp \ |
|
count/int-gq.hpp count/int-lq.hpp \ |
|
count/view-base.hpp count/view-eq.hpp \ |
|
count/view-gq.hpp count/view-lq.hpp \ |
|
view-val-graph.hh view-val-graph/graph.hpp \ |
|
view-val-graph/bi-link.hpp view-val-graph/comb-ptr-flag.hpp \ |
|
view-val-graph/edge.hpp view-val-graph/node.hpp \ |
|
view-val-graph/iter-prune-val.hpp \ |
|
distinct/graph.hpp distinct/dom-ctrl.hpp \ |
|
distinct/bnd.hpp distinct/dom.hpp \ |
|
distinct/val.hpp distinct/ter-dom.hpp \ |
|
dom/range.hpp dom/spec.hpp \ |
|
element/int.hpp element/view.hpp element/pair.hpp \ |
|
gcc/bnd.hpp gcc/dom.hpp gcc/bnd-sup.hpp gcc/dom-sup.hpp \ |
|
gcc/val.hpp gcc/view.hpp gcc/post.hpp \ |
|
linear/post.hpp \ |
|
linear/int-noview.hpp linear/int-bin.hpp linear/int-ter.hpp \ |
|
linear/int-nary.hpp linear/int-dom.hpp \ |
|
linear/bool-int.hpp linear/bool-view.hpp linear/bool-scale.hpp \ |
|
extensional/dfa.hpp extensional/layered-graph.hpp \ |
|
extensional/tuple-set.hpp extensional/base.hpp \ |
|
extensional/basic.hpp extensional/incremental.hpp \ |
|
rel/eq.hpp rel/lex.hpp rel/lq-le.hpp rel/nq.hpp \ |
|
sorted/matching.hpp sorted/narrowing.hpp \ |
|
sorted/order.hpp sorted/propagate.hpp sorted/sortsup.hpp \ |
|
int-set-1.hpp int-set-2.hpp var-imp/delta.hpp var/print.hpp var/bool.hpp \ |
|
var-imp/int.hpp var-imp/bool.hpp var/int.hpp \ |
|
view/bool.hpp view/cached.hpp view/constint.hpp view/zero.hpp view/int.hpp \ |
|
view/minus.hpp view/print.hpp view/neg-bool.hpp view/bool-test.hpp \ |
|
view/offset.hpp view/rel-test.hpp view/scale.hpp view/iter.hpp \ |
|
arithmetic.hh array.hpp array-traits.hpp bool.hh branch.hh \ |
|
distinct.hh dom.hh \ |
|
element.hh exception.hpp gcc.hh linear.hh \ |
|
propagator.hpp extensional.hh rel.hh \ |
|
sorted.hh var-imp.hpp view.hpp \ |
|
channel.hh channel/dom.hpp channel/val.hpp \ |
|
channel/base.hpp channel/link-single.hpp channel/link-multi.hpp \ |
|
sequence.hh sequence/int.hpp sequence/view.hpp \ |
|
sequence/set-op.hpp sequence/violations.hpp \ |
|
bin-packing.hh bin-packing/propagate.hpp \ |
|
task.hh task/fwd-to-bwd.hpp task/array.hpp task/sort.hpp \ |
|
task/iter.hpp task/tree.hpp task/purge.hpp task/prop.hpp \ |
|
task/man-to-opt.hpp \ |
|
unary.hh unary/task.hpp unary/task-view.hpp \ |
|
unary/tree.hpp unary/overload.hpp unary/detectable.hpp \ |
|
unary/not-first-not-last.hpp \ |
|
unary/edge-finding.hpp unary/subsumption.hpp \ |
|
unary/man-prop.hpp unary/opt-prop.hpp \ |
|
cumulative.hh cumulative/man-prop.hpp cumulative/opt-prop.hpp \ |
|
cumulative/task-view.hpp cumulative/overload.hpp \ |
|
cumulative/basic.hpp cumulative/task.hpp cumulative/edge-finding.hpp \ |
|
cumulative/tree.hpp \ |
|
cumulatives.hh cumulatives/val.hpp \ |
|
circuit.hh circuit/base.hpp circuit/val.hpp circuit/dom.hpp \ |
|
no-overlap.hh no-overlap/dim.hpp no-overlap/box.hpp \ |
|
no-overlap/base.hpp no-overlap/man.hpp no-overlap/opt.hpp \ |
|
nvalues.hh nvalues/range-event.hpp \ |
|
nvalues/sym-bit-matrix.hpp nvalues/graph.hpp \ |
|
nvalues/bool-base.hpp nvalues/bool-eq.hpp \ |
|
nvalues/bool-lq.hpp nvalues/bool-gq.hpp \ |
|
nvalues/int-base.hpp nvalues/int-eq.hpp \ |
|
nvalues/int-lq.hpp nvalues/int-gq.hpp \ |
|
val-set.hh val-set.hpp \ |
|
member.hh member/prop.hpp member/re-prop.hpp |
|
|
|
INTSRC = $(INTSRC0:%=gecode/int/%) \ |
|
gecode/int/branch/post-view-int.cpp \ |
|
gecode/int/branch/post-view-bool.cpp |
|
INTHDR = gecode/int.hh $(INTHDR0:%=gecode/int/%) |
|
INTOBJ = $(INTSRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
ifeq "yes" "yes" |
|
export INTDLL = $(LIBPREFIX)int$(DLLSUFFIX) |
|
export INTSTATICLIB = $(LIBPREFIX)int$(STATICLIBSUFFIX) |
|
export INTLIB = $(LIBPREFIX)int$(LIBSUFFIX) |
|
export LINKINT = $(LINKPREFIX)int$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export INTSONAME = \ |
|
$(LIBPREFIX)int$(SOSUFFIX) |
|
else |
|
export INTSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export INTRC = $(LIBPREFIX)int$(RCSUFFIX) |
|
export INTRES = $(LIBPREFIX)int$(RESSUFFIX) |
|
else |
|
export INTRES = |
|
export INTRC = |
|
endif |
|
else |
|
export INTDLL = |
|
export INTSTATICLIB = |
|
export INTLIB = |
|
export LINKINT = |
|
export INTRES = |
|
export INTRC = |
|
endif |
|
INTBUILDDIRS = \ |
|
int int/var int/var-imp int/view int/extensional \ |
|
int/channel int/linear int/bool int/branch int/exec \ |
|
int/element int/sequence int/bin-packing \ |
|
int/unary int/cumulative int/cumulatives int/task |
|
|
|
# |
|
# SET COMPONENTS |
|
# |
|
|
|
SETSRC0 = \ |
|
branch.cpp cardinality.cpp convex.cpp convex/conv.cpp convex/hull.cpp \ |
|
dom.cpp rel.cpp \ |
|
rel-op.cpp rel-op-ternary.cpp rel-op-singleton.cpp \ |
|
rel-op/post-compl.cpp rel-op/post-nocompl.cpp \ |
|
rel-op/post-compl-cvv.cpp rel-op/post-nocompl-cvv.cpp \ |
|
rel-op/post-compl-vvc.cpp rel-op/post-nocompl-vvc.cpp \ |
|
rel-op/post-compl-cvc.cpp rel-op/post-nocompl-cvc.cpp \ |
|
rel-op-const-vvc.cpp rel-op-const-vcv.cpp rel-op-const-vcc.cpp \ |
|
rel-op-const-cvc.cpp rel-op-const-cvv.cpp \ |
|
int.cpp \ |
|
element.cpp sequence.cpp \ |
|
distinct.cpp distinct/atmostOne.cpp \ |
|
precede.cpp \ |
|
sequence/seq.cpp sequence/seq-u.cpp array.cpp var-imp/set.cpp \ |
|
var-imp/integerset.cpp var/set.cpp \ |
|
exec.cpp |
|
SETHDR0 = \ |
|
limits.hpp \ |
|
view.hpp exception.hpp int.hh element.hh var-imp.hpp \ |
|
int/card.hpp \ |
|
int/match.hpp int/channel-int.hpp int/minmax.hpp int/weights.hpp \ |
|
int/channel-bool.hpp \ |
|
element/inter.hpp element/union.hpp \ |
|
element/unionConst.hpp \ |
|
element/disjoint.hpp array.hpp array-traits.hpp \ |
|
var-imp/set.hpp var-imp/integerset.hpp \ |
|
var-imp/delta.hpp var-imp/iter.hpp \ |
|
var/set.hpp var/print.hpp \ |
|
view/complement.hpp view/const.hpp view/set.hpp view/singleton.hpp \ |
|
view/cached.hpp view/print.hpp \ |
|
rel/subset.hpp rel/re-subset.hpp rel/eq.hpp rel/nq.hpp rel/re-eq.hpp \ |
|
rel/lq.hpp rel/re-lq.hpp \ |
|
rel/common.hpp rel/nosubset.hpp sequence.hh \ |
|
rel-op/union.hpp rel-op/partition.hpp rel-op/subofunion.hpp \ |
|
rel-op/inter.hpp rel-op/superofinter.hpp \ |
|
rel-op/post.hpp rel-op/common.hpp rel.hh \ |
|
distinct.hh distinct/atmostOne.hpp \ |
|
sequence/seq.hpp sequence/seq-u.hpp \ |
|
sequence/common.hpp convex/conv.hpp convex/hull.hpp convex.hh \ |
|
precede.hh precede/single.hpp \ |
|
rel-op.hh \ |
|
branch.hh branch/select-val.hpp branch/select-view.hpp \ |
|
branch/post-val.hpp |
|
|
|
SETSRC = $(SETSRC0:%=gecode/set/%) \ |
|
gecode/set/branch/post-view.cpp |
|
SETHDR = gecode/set.hh $(SETHDR0:%=gecode/set/%) |
|
SETOBJ = $(SETSRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
ifeq "yes" "yes" |
|
export SETDLL = $(LIBPREFIX)set$(DLLSUFFIX) |
|
export SETSTATICLIB = $(LIBPREFIX)set$(STATICLIBSUFFIX) |
|
export SETLIB = $(LIBPREFIX)set$(LIBSUFFIX) |
|
export LINKSET = $(LINKPREFIX)set$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export SETSONAME = \ |
|
$(LIBPREFIX)set$(SOSUFFIX) |
|
else |
|
export SETSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export SETRC = $(LIBPREFIX)set$(RCSUFFIX) |
|
export SETRES = $(LIBPREFIX)set$(RESSUFFIX) |
|
else |
|
export SETRES = |
|
export SETRC = |
|
endif |
|
else |
|
export SETDLL = |
|
export SETSTATICLIB = |
|
export SETLIB = |
|
export LINKSET = |
|
export SETRES = |
|
export SETRC = |
|
endif |
|
SETBUILDDIRS = \ |
|
set set/convex set/distinct set/int set/rel set/rel-op \ |
|
set/element set/sequence set/var set/var-imp set/view \ |
|
set/branch |
|
|
|
|
|
# |
|
# MINIMODEL COMPONENTS |
|
# |
|
|
|
MMSRC0 = \ |
|
lin-expr.cpp lin-rel.cpp bool-expr.cpp \ |
|
set-expr.cpp set-rel.cpp \ |
|
reg.cpp arithmetic.cpp |
|
MMHDR0 = \ |
|
lin-expr.hpp lin-rel.hpp exception.hpp matrix.hpp \ |
|
bool-expr.hpp set-expr.hpp set-rel.hpp \ |
|
optimize.hpp reg.hpp |
|
|
|
MMSRC = $(MMSRC0:%=gecode/minimodel/%) |
|
MMHDR = gecode/minimodel.hh $(MMHDR0:%=gecode/minimodel/%) |
|
MMOBJ = $(MMSRC:%.cpp=%$(OBJSUFFIX)) |
|
MMSBJ = $(MMSRC:%.cpp=%$(SBJSUFFIX)) |
|
|
|
ifeq "yes" "yes" |
|
export MMDLL = $(LIBPREFIX)minimodel$(DLLSUFFIX) |
|
export MMSTATICLIB = $(LIBPREFIX)minimodel$(STATICLIBSUFFIX) |
|
export MMLIB = $(LIBPREFIX)minimodel$(LIBSUFFIX) |
|
export LINKMM = $(LINKPREFIX)minimodel$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export MMSONAME = \ |
|
$(LIBPREFIX)minimodel$(SOSUFFIX) |
|
else |
|
export MMSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export MMRC = $(LIBPREFIX)minimodel$(RCSUFFIX) |
|
export MMRES = $(LIBPREFIX)minimodel$(RESSUFFIX) |
|
else |
|
export MMRES = |
|
export MMRC = |
|
endif |
|
else |
|
export MMDLL = |
|
export MMSTATICLIB = |
|
export MMLIB = |
|
export LINKMM = |
|
export MMRES = |
|
export MMRC = |
|
endif |
|
MMBUILDDIRS = minimodel |
|
|
|
# |
|
# DRIVER COMPONENTS |
|
# |
|
|
|
DRIVERSRC0 = options.cpp script.cpp |
|
DRIVERHDR0 = options.hpp script.hpp |
|
|
|
DRIVERSRC = $(DRIVERSRC0:%=gecode/driver/%) |
|
DRIVERHDR = gecode/driver.hh $(DRIVERHDR0:%=gecode/driver/%) |
|
DRIVEROBJ = $(DRIVERSRC:%.cpp=%$(OBJSUFFIX)) |
|
DRIVERSBJ = $(DRIVERSRC:%.cpp=%$(SBJSUFFIX)) |
|
|
|
ifeq "yes" "yes" |
|
export DRIVERDLL = $(LIBPREFIX)driver$(DLLSUFFIX) |
|
export DRIVERSTATICLIB = $(LIBPREFIX)driver$(STATICLIBSUFFIX) |
|
export DRIVERLIB = $(LIBPREFIX)driver$(LIBSUFFIX) |
|
export LINKDRIVER = $(LINKPREFIX)driver$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export DRIVERSONAME = \ |
|
$(LIBPREFIX)driver$(SOSUFFIX) |
|
else |
|
export DRIVERSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export DRIVERRC = $(LIBPREFIX)driver$(RCSUFFIX) |
|
export DRIVERRES = $(LIBPREFIX)driver$(RESSUFFIX) |
|
else |
|
export DRIVERRES = |
|
export DRIVERRC = |
|
endif |
|
else |
|
export DRIVERDLL = |
|
export DRIVERSTATICLIB = |
|
export DRIVERLIB = |
|
export LINKDRIVER = |
|
export DRIVERRES = |
|
export DRIVERRC = |
|
endif |
|
DRIVERBUILDDIRS = driver |
|
|
|
# |
|
# ITERATOR HEADERS |
|
# |
|
ITERHDR0 = \ |
|
ranges-add ranges-append ranges-array ranges-cache \ |
|
ranges-compl ranges-diff ranges-empty \ |
|
ranges-inter ranges-minmax ranges-minus \ |
|
ranges-offset ranges-operations ranges-rangelist \ |
|
ranges-scale ranges-singleton ranges-singleton-append \ |
|
ranges-size ranges-union ranges-values \ |
|
ranges-negative ranges-positive ranges-map \ |
|
ranges-list \ |
|
values-array values-minus values-offset values-ranges \ |
|
values-positive values-negative \ |
|
values-singleton values-unique values-inter \ |
|
values-union values-map values-bitset values-list |
|
ITERHDR = gecode/iter.hh \ |
|
$(ITERHDR0:%=gecode/iter/%.hpp) |
|
|
|
|
|
# |
|
# GIST |
|
# |
|
|
|
GISTHDR0 = \ |
|
drawingcursor.hh drawingcursor.hpp \ |
|
gist.hpp gecodelogo.hh node.hh node.hpp \ |
|
nodecursor.hh nodecursor.hpp nodevisitor.hh \ |
|
nodevisitor.hpp layoutcursor.hh layoutcursor.hpp \ |
|
spacenode.hh spacenode.hpp qtgist.hh \ |
|
textoutput.hh treecanvas.hh zoomToFitIcon.hpp \ |
|
visualnode.hh visualnode.hpp nodestats.hh \ |
|
nodewidget.hh mainwindow.hh preferences.hh \ |
|
stopbrancher.hh |
|
|
|
GISTSRC0 = \ |
|
drawingcursor.cpp gist.cpp gecodelogo.cpp node.cpp \ |
|
spacenode.cpp \ |
|
textoutput.cpp treecanvas.cpp qtgist.cpp visualnode.cpp nodestats.cpp \ |
|
nodewidget.cpp mainwindow.cpp preferences.cpp stopbrancher.cpp |
|
|
|
GISTMOCSRC0 = \ |
|
moc_treecanvas.cpp moc_qtgist.cpp moc_mainwindow.cpp moc_textoutput.cpp\ |
|
moc_preferences.cpp moc_nodestats.cpp |
|
|
|
GISTSRC = $(GISTSRC0:%=gecode/gist/%) |
|
GISTMOCSRC = $(GISTMOCSRC0:%=gecode/gist/%) |
|
GISTHDR = $(GISTHDR0:%=gecode/gist/%) gecode/gist.hh |
|
|
|
GISTOBJ = $(GISTSRC:%.cpp=%$(OBJSUFFIX)) $(GISTMOCSRC:%.cpp=%$(OBJSUFFIX)) |
|
GISTSBJ = $(GISTSRC:%.cpp=%$(SBJSUFFIX)) $(GISTMOCSRC:%.cpp=%$(SBJSUFFIX)) |
|
|
|
GISTBUILDDIRS = gist |
|
|
|
ifeq "" "yes" |
|
export GISTDLL = $(LIBPREFIX)gist$(DLLSUFFIX) |
|
export GISTSTATICLIB = $(LIBPREFIX)gist$(STATICLIBSUFFIX) |
|
export GISTLIB = $(LIBPREFIX)gist$(LIBSUFFIX) |
|
export LINKGIST = $(LINKPREFIX)gist$(LINKSUFFIX) |
|
ifeq "no" "yes" |
|
export GISTSONAME = \ |
|
$(LIBPREFIX)gist$(SOSUFFIX) |
|
else |
|
export GISTSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export GISTRC = $(LIBPREFIX)gist$(RCSUFFIX) |
|
export GISTRES = $(LIBPREFIX)gist$(RESSUFFIX) |
|
else |
|
export GISTRES = |
|
export GISTRC = |
|
endif |
|
else |
|
export GISTDLL = |
|
export GISTSTATICLIB = |
|
export GISTLIB = |
|
export LINKGIST = |
|
export GISTSONAME = |
|
export GISTRES = |
|
export GISTRC = |
|
endif |
|
|
|
# |
|
# FLATZINC |
|
# |
|
|
|
FLATZINCSRC0 = flatzinc.cpp registry.cpp |
|
FLATZINC_GENSRC0 = parser.tab.cpp lexer.yy.cpp |
|
FLATZINCHDR0 = ast.hh conexpr.hh option.hh parser.hh \ |
|
plugin.hh registry.hh symboltable.hh varspec.hh |
|
|
|
FLATZINCSRC = $(FLATZINCSRC0:%=gecode/flatzinc/%) |
|
FLATZINC_GENSRC = $(FLATZINC_GENSRC0:%=gecode/flatzinc/%) |
|
FLATZINCHDR = $(FLATZINCHDR0:%=gecode/flatzinc/%) gecode/flatzinc.hh |
|
|
|
FLATZINCOBJ = \ |
|
$(FLATZINCSRC:%.cpp=%$(OBJSUFFIX)) \ |
|
$(FLATZINC_GENSRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
FLATZINCEXESRC0 = fz.cpp |
|
FLATZINCEXESRC = $(FLATZINCEXESRC0:%=tools/flatzinc/%) |
|
FLATZINCEXEOBJ = $(FLATZINCEXESRC:%.cpp=%$(OBJSUFFIX)) |
|
|
|
FLATZINCALLSRC = $(FLATZINCSRC) $(FLATZINCEXESRC) |
|
|
|
FLATZINCBUILDDIRS = gecode/flatzinc tools/flatzinc |
|
|
|
ifeq "yes" "yes" |
|
export FLATZINCDLL = $(LIBPREFIX)flatzinc$(DLLSUFFIX) |
|
export FLATZINCSTATICLIB = $(LIBPREFIX)flatzinc$(STATICLIBSUFFIX) |
|
export FLATZINCLIB = $(LIBPREFIX)flatzinc$(LIBSUFFIX) |
|
export LINKFLATZINC = $(LINKPREFIX)flatzinc$(LINKSUFFIX) |
|
export FLATZINCMZNLIB = gecode/flatzinc/mznlib |
|
FLATZINCEXE = tools/flatzinc/fz$(EXESUFFIX) |
|
ifeq "no" "yes" |
|
export FLATZINCSONAME = $(LIBPREFIX)flatzinc$(SOSUFFIX) |
|
else |
|
export FLATZINCSONAME = |
|
endif |
|
ifeq "no" "yes" |
|
export FLATZINCRC = $(LIBPREFIX)flatzinc$(RCSUFFIX) |
|
export FLATZINCRES = $(LIBPREFIX)flatzinc$(RESSUFFIX) |
|
else |
|
export FLATZINCRES = |
|
export FLATZINCRC = |
|
endif |
|
else |
|
export FLATZINCDLL = |
|
export FLATZINCSTATICLIB = |
|
export FLATZINCLIB = |
|
export LINKFLATZINC = |
|
export FLATZINCSONAME = |
|
export FLATZINCMZNLIB = |
|
export FLATZINCRES = |
|
export FLATZINCRC = |
|
FLATZINCEXE = |
|
endif |
|
|
|
# |
|
# EXAMPLES |
|
# |
|
|
|
|
|
INTEXAMPLEHDR0 = \ |
|
scowl |
|
INTEXAMPLESRC0 = \ |
|
alpha bacp bibd donald efpa eq20 golomb-ruler \ |
|
graph-color grocery ind-set magic-sequence magic-square \ |
|
money ortho-latin partition photo queens sudoku kakuro \ |
|
nonogram pentominoes crowded-chess black-hole \ |
|
minesweeper domino steel-mill sports-league \ |
|
all-interval langford-number warehouses radiotherapy \ |
|
word-square crossword open-shop car-sequencing sat \ |
|
bin-packing knights tsp perfect-square schurs-lemma \ |
|
dominating-queens |
|
|
|
INTEXAMPLEHDR = $(INTEXAMPLEHDR0:%=examples/%.hpp) |
|
INTEXAMPLESRC = $(INTEXAMPLESRC0:%=examples/%.cpp) |
|
ifeq "yes" "yes" |
|
INTEXAMPLEEXE = $(INTEXAMPLESRC:%.cpp=%$(EXESUFFIX)) |
|
else |
|
INTEXAMPLEEXE = |
|
endif |
|
|
|
SETEXAMPLESRC0 = \ |
|
crew golf hamming steiner queen-armies |
|
SETEXAMPLESRC = $(SETEXAMPLESRC0:%=examples/%.cpp) |
|
ifeq "yes" "yes" |
|
SETEXAMPLEEXE = $(SETEXAMPLESRC:%.cpp=%$(EXESUFFIX)) |
|
else |
|
SETEXAMPLEEXE = |
|
endif |
|
|
|
EXAMPLEBUILDDIRS = examples |
|
|
|
EXAMPLEEXE = \ |
|
$(INTEXAMPLEEXE) $(SETEXAMPLEEXE) |
|
|
|
|
|
|
|
# |
|
# COLLECTING ALL |
|
# |
|
|
|
ALLSRC = \ |
|
$(SUPPORTSRC) $(KERNELSRC) $(SEARCHSRC) \ |
|
$(INTSRC) $(SETSRC) $(MMSRC) $(DRIVERSRC) \ |
|
$(INTEXAMPLESRC) $(SETEXAMPLESRC) \ |
|
$(GISTSRC) $(FLATZINCALLSRC) |
|
ALLHDR = \ |
|
$(SUPPORTHDR) $(KERNELHDR) $(SEARCHHDR) \ |
|
$(INTHDR) $(SETHDR) $(MMHDR) \ |
|
$(DRIVERHDR) $(ITERHDR) $(GISTHDR) $(FLATZINCHDR) \ |
|
$(INTEXAMPLEHDR) |
|
ALLOBJ0 = $(ALLSRC:%.cpp=%$(OBJSUFFIX)) \ |
|
$(GISTMOCSRC:%.cpp=%$(OBJSUFFIX)) \ |
|
$(FLATZINC_GENSRC:%.cpp=%$(OBJSUFFIX)) |
|
ALLOBJ = $(ALLOBJ0:%.c=%$(OBJSUFFIX)) |
|
|
|
ALLSBJ0 = $(ALLSRC:%.cpp=%$(SBJSUFFIX)) |
|
ALLSBJ = $(ALLSBJ0:%.c=%$(SBJSUFFIX)) |
|
|
|
ifeq "no" "yes" |
|
DLLTARGETS= \ |
|
$(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) $(INTDLL) $(SETDLL) \ |
|
$(MMDLL) $(DRIVERDLL) $(GISTDLL) $(FLATZINCDLL) |
|
export ALLLIB = \ |
|
$(SUPPORTLIB) $(KERNELLIB) $(SEARCHLIB) $(INTLIB) $(SETLIB) \ |
|
$(MMLIB) $(DRIVERLIB) $(GISTLIB) $(FLATZINCLIB) |
|
else |
|
DLLTARGETS= |
|
ifeq "" "yes" |
|
export ALLLIB = gecode.framework/Versions/32/gecode |
|
else |
|
export ALLLIB = \ |
|
$(SUPPORTSTATICLIB) $(KERNELSTATICLIB) $(SEARCHSTATICLIB) \ |
|
$(INTSTATICLIB) $(SETSTATICLIB) $(MMSTATICLIB) \ |
|
$(DRIVERSTATICLIB) $(GISTSTATICLIB) $(FLATZINCSTATICLIB) |
|
endif |
|
endif |
|
|
|
ifeq "yes" "yes" |
|
STATICTARGETS = \ |
|
$(SUPPORTSTATICLIB) $(KERNELSTATICLIB) $(SEARCHSTATICLIB) \ |
|
$(INTSTATICLIB) $(SETSTATICLIB) $(MMSTATICLIB) \ |
|
$(DRIVERSTATICLIB) $(GISTSTATICLIB) $(FLATZINCSTATICLIB) |
|
else |
|
STATICTARGETS= |
|
endif |
|
|
|
export LIBTARGETS = $(DLLTARGETS) $(STATICTARGETS) |
|
|
|
ifeq "no" "yes" |
|
export LIBLINKTARGETS = \ |
|
$(DLLTARGETS:%$(DLLSUFFIX)=%$(SOSUFFIX)) \ |
|
$(DLLTARGETS:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
else |
|
export LIBLINKTARGETS = |
|
endif |
|
|
|
PDBS = $(ALLLIB:%$(LIBSUFFIX)=%$(PDBSUFFIX)) |
|
|
|
ifeq "no" "yes" |
|
LIBLIBTARGETS = $(ALLLIB) |
|
PDBTARGETS = $(PDBS) |
|
else |
|
LIBLIBTARGETS = |
|
PDBTARGETS = |
|
endif |
|
|
|
EXETARGETS = $(FLATZINCEXE) tools/flatzinc/mzn-gecode.bat |
|
|
|
# |
|
# Testing |
|
# |
|
|
|
INTTESTSRC00 = \ |
|
channel arithmetic basic bool count dom distinct element extensional \ |
|
rel linear gcc sorted unshare exec sequence \ |
|
mm-arithmetic mm-bool mm-lin mm-count mm-rel \ |
|
bin-packing unary cumulative cumulatives circuit \ |
|
no-overlap precede nvalues member |
|
INTTESTSRC0 = test/int.cpp $(INTTESTSRC00:%=test/int/%.cpp) |
|
INTTESTOBJ = $(INTTESTSRC0:%.cpp=%$(OBJSUFFIX)) |
|
|
|
SETTESTSRC00 = \ |
|
construct dom rel rel-op rel-op-const convex sequence int element \ |
|
precede distinct exec mm-set |
|
SETTESTSRC0 = test/set.cpp $(SETTESTSRC00:%=test/set/%.cpp) |
|
|
|
ifeq "yes" "yes" |
|
SETTESTOBJ = $(SETTESTSRC0:%.cpp=%$(OBJSUFFIX)) |
|
else |
|
SETTESTOBJ= |
|
endif |
|
|
|
BRANCHTESTSRC0 = \ |
|
test/branch.cpp test/branch/int.cpp test/branch/bool.cpp \ |
|
test/branch/set.cpp \ |
|
test/assign.cpp test/assign/int.cpp test/assign/bool.cpp \ |
|
test/assign/set.cpp |
|
|
|
SEARCHTESTSRC0 = \ |
|
test/search.cpp |
|
|
|
ARRAYTESTSRC0 = \ |
|
test/array.cpp |
|
|
|
TESTSRC0 = test/test.cpp test/afc.cpp |
|
|
|
TESTSRC = \ |
|
$(TESTSRC0) $(INTTESTSRC0) $(SETTESTSRC0) \ |
|
$(BRANCHTESTSRC0) $(SEARCHTESTSRC0) \ |
|
$(ARRAYTESTSRC0) |
|
|
|
TESTHDR0 = \ |
|
test.hh test.hpp int.hh int.hpp set.hh set.hpp \ |
|
branch.hh assign.hh |
|
TESTHDR = $(TESTHDR0:%=test/%) |
|
TESTOBJ = $(INTTESTOBJ) $(SETTESTOBJ) \ |
|
$(BRANCHTESTSRC0:%.cpp=%$(OBJSUFFIX)) \ |
|
$(SEARCHTESTSRC0:%.cpp=%$(OBJSUFFIX)) \ |
|
$(ARRAYTESTSRC0:%.cpp=%$(OBJSUFFIX)) \ |
|
$(TESTSRC0:%.cpp=%$(OBJSUFFIX)) |
|
TESTSBJ = $(TESTOBJ:%$(OBJSUFFIX)=%$(SBJSUFFIX)) |
|
TESTEXE = test/test$(EXESUFFIX) |
|
TESTBUILDDIRS = test test/int test/set test/branch test/assign |
|
|
|
BUILDDIRS = \ |
|
tools \ |
|
$(SUPPORTBUILDDIRS:%=gecode/%) \ |
|
$(KERNELBUILDDIRS:%=gecode/%) $(SEARCHBUILDDIRS:%=gecode/%) \ |
|
$(INTBUILDDIRS:%=gecode/%) $(SETBUILDDIRS:%=gecode/%) \ |
|
$(MMBUILDDIRS:%=gecode/%) \ |
|
$(DRIVERBUILDDIRS:%=gecode/%) \ |
|
$(GISTBUILDDIRS:%=gecode/%) \ |
|
$(FLATZINCBUILDDIRS) \ |
|
$(EXAMPLEBUILDDIRS) $(TESTBUILDDIRS) |
|
|
|
ifeq "no" "yes" |
|
all: compilelib |
|
@$(MAKE) compileexamples |
|
@$(MAKE) makecompletedmessage |
|
else |
|
all: compilelib |
|
@$(MAKE) makecompletedmessage |
|
endif |
|
compilelib: mkcompiledirs |
|
@$(MAKE) $(VARIMP) $(LIBTARGETS) |
|
@$(MAKE) compilesubdirs |
|
@$(MAKE) framework |
|
@$(MAKE) flatzinc |
|
|
|
compileexamples: $(EXAMPLEEXE) |
|
|
|
test: mkcompiledirs |
|
@$(MAKE) $(VARIMP) $(TESTEXE) |
|
|
|
# A basic integrity test |
|
check: test |
|
$(TESTEXE) -iter 2 -test Branch::Int::Dense::3 \ |
|
-test Int::Linear::Int::Int::Eq::Bnd::12::4 \ |
|
-test Int::Distinct::Random \ |
|
-test Int::Arithmetic::Mult::XYZ::Bnd::C \ |
|
-test Int::Arithmetic::Mult::XYZ::Dom::A \ |
|
-test Search::BAB::Sol::BalGr::Binary::Binary::Binary::1::1 |
|
|
|
ifeq "." "." |
|
mkcompiledirs: |
|
else |
|
mkcompiledirs: |
|
for_builddirs="$(BUILDDIRS)"; for f in $$for_builddirs; do \ |
|
(test -z "$(top_builddir)"/$$f || mkdir -p "$(top_builddir)"/$$f); \ |
|
done |
|
endif |
|
|
|
makecompletedmessage: |
|
@echo |
|
@echo Compilation of Gecode finished successfully. To use Gecode, either add |
|
@echo $(PWD) |
|
@echo to your search path for libraries, or install Gecode using |
|
@echo make install |
|
@echo |
|
|
|
# ugly hack by Gr�goire Dooms to call a target on a contribs after evaluating all the variables in this Makefile. |
|
# used as make contribs:cpgraph:doc or make contribs:cpgraph:Makefile.in |
|
.PHONY: contribs\:% |
|
contribs\:%: |
|
$(MAKE) -C $(shell echo $@ | sed 's/\(contribs:[^:]*\):.*/\1/;s+:+/+') $(shell echo $@ | sed 's/contribs:[^:]*:\(.*\)/\1/;s+:+/+') |
|
|
|
# less ugly hack by Guido Tack to call a target |
|
# Just give ICD (in-contrib-dir) and ICT (in-contrib-target) as arguments |
|
# to make incontrib |
|
ICT= |
|
ICD= |
|
.PHONY: incontrib |
|
incontrib: |
|
$(MAKE) -C contribs/$(ICD) $(ICT) |
|
|
|
compilesubdirs: |
|
@for_subdirs="$(subdirs)"; for i in $$for_subdirs; do \ |
|
if test -f $$i/Makefile; then \ |
|
echo "Making in directory $$i"; \ |
|
$(MAKE) -C $$i; \ |
|
fi; \ |
|
done |
|
|
|
# |
|
# Generated variable implementations |
|
# |
|
|
|
VIS = $(top_srcdir)/gecode/int/var-imp/int.vis $(top_srcdir)/gecode/int/var-imp/bool.vis $(top_srcdir)/gecode/set/var-imp/set.vis |
|
VISDEP = $(VIS) \ |
|
$(top_srcdir)/misc/genvarimp.perl Makefile |
|
|
|
gecode/kernel/var-type.hpp: $(VISDEP) |
|
perl $(top_srcdir)/misc/genvarimp.perl -typehpp $(VIS) > $@ |
|
gecode/kernel/var-imp.hpp: $(VISDEP) |
|
perl $(top_srcdir)/misc/genvarimp.perl -header $(VIS) > $@ |
|
|
|
# |
|
# Generated branchers |
|
# |
|
GENBRANCHSRC = \ |
|
$(top_srcdir)/gecode/int/branch/post-view-int.cpp \ |
|
$(top_srcdir)/gecode/int/branch/post-view-bool.cpp \ |
|
$(top_srcdir)/gecode/set/branch/post-view.cpp |
|
|
|
$(top_srcdir)/gecode/int/branch/post-view-int.cpp: \ |
|
$(top_srcdir)/gecode/int/branch/post-view-int.bs \ |
|
$(top_srcdir)/misc/genbranch.perl |
|
perl $(top_srcdir)/misc/genbranch.perl $< > $@ |
|
$(top_srcdir)/gecode/int/branch/post-view-bool.cpp: \ |
|
$(top_srcdir)/gecode/int/branch/post-view-bool.bs \ |
|
$(top_srcdir)/misc/genbranch.perl |
|
perl $(top_srcdir)/misc/genbranch.perl $< > $@ |
|
$(top_srcdir)/gecode/set/branch/post-view.cpp: \ |
|
$(top_srcdir)/gecode/set/branch/post-view.bs \ |
|
$(top_srcdir)/misc/genbranch.perl |
|
perl $(top_srcdir)/misc/genbranch.perl $< > $@ |
|
|
|
|
|
# |
|
# Object targets |
|
# |
|
|
|
gecode/support/%$(OBJSUFFIX): $(top_srcdir)/gecode/support/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SUPPORT \ |
|
-c -o $@ $< |
|
gecode/support/%$(SBJSUFFIX): $(top_srcdir)/gecode/support/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SUPPORT \ |
|
-S -o $@ $< |
|
gecode/support/%$(OBJSUFFIX): $(top_srcdir)/gecode/support/%.c |
|
$(CC) $(CFLAGS) -DGECODE_BUILD_SUPPORT \ |
|
-c -o $@ $< |
|
gecode/support/%$(SBJSUFFIX): $(top_srcdir)/gecode/support/%.c |
|
$(CC) $(CFLAGS) -DGECODE_BUILD_SUPPORT \ |
|
-S -o $@ $< |
|
|
|
gecode/kernel/%$(OBJSUFFIX): $(top_srcdir)/gecode/kernel/%.cpp |
|
$(CXX) $(CXXFLAGS) $(BOOST_CPPFLAGS) -DGECODE_BUILD_KERNEL \ |
|
-c -o $@ $< |
|
gecode/kernel/%$(SBJSUFFIX): $(top_srcdir)/gecode/kernel/%.cpp |
|
$(CXX) $(CXXFLAGS) $(BOOST_CPPFLAGS) -DGECODE_BUILD_KERNEL \ |
|
-S -o $@ $< |
|
|
|
gecode/search/%$(OBJSUFFIX): $(top_srcdir)/gecode/search/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SEARCH \ |
|
-c -o $@ $< |
|
gecode/search/%$(SBJSUFFIX): $(top_srcdir)/gecode/search/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SEARCH \ |
|
-S -o $@ $< |
|
|
|
gecode/int/%$(OBJSUFFIX): $(top_srcdir)/gecode/int/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_INT \ |
|
-c -o $@ $< |
|
gecode/int/%$(SBJSUFFIX): $(top_srcdir)/gecode/int/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_INT \ |
|
-S -o $@ $< |
|
|
|
gecode/set/%$(OBJSUFFIX): $(top_srcdir)/gecode/set/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SET \ |
|
-c -o $@ $< |
|
gecode/set/%$(SBJSUFFIX): $(top_srcdir)/gecode/set/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_SET \ |
|
-S -o $@ $< |
|
|
|
gecode/minimodel/%$(OBJSUFFIX): $(top_srcdir)/gecode/minimodel/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_MINIMODEL \ |
|
-c -o $@ $< |
|
gecode/minimodel/%$(SBJSUFFIX): $(top_srcdir)/gecode/minimodel/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_MINIMODEL \ |
|
-S -o $@ $< |
|
|
|
gecode/driver/%$(OBJSUFFIX): $(top_srcdir)/gecode/driver/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_DRIVER \ |
|
-c -o $@ $< |
|
gecode/driver/%$(SBJSUFFIX): $(top_srcdir)/gecode/driver/%.cpp |
|
$(CXX) $(CXXFLAGS) -DGECODE_BUILD_DRIVER \ |
|
-S -o $@ $< |
|
|
|
|
|
examples/%$(OBJSUFFIX): $(top_srcdir)/examples/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) $(BOOST_CPPFLAGS) $(QT_CPPFLAGS) \ |
|
-c -o $@ $< |
|
examples/%$(SBJSUFFIX): $(top_srcdir)/examples/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) $(BOOST_CPPFLAGS) $(QT_CPPFLAGS) \ |
|
-S -o $@ $< |
|
|
|
|
|
test/%$(OBJSUFFIX): $(top_srcdir)/test/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) \ |
|
-c -o $@ $< |
|
test/%$(SBJSUFFIX): $(top_srcdir)/test/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) \ |
|
-S -o $@ $< |
|
|
|
tools/%$(OBJSUFFIX): $(top_srcdir)/tools/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) \ |
|
-c -o $@ $< |
|
tools/%$(SBJSUFFIX): $(top_srcdir)/tools/%.cpp |
|
$(CXX) $(CXXFLAGS) $(EXAMPLES_EXTRA_CXXFLAGS) \ |
|
-S -o $@ $< |
|
|
|
$(GISTSRC:%.cpp=%$(OBJSUFFIX)): gecode/gist/%$(OBJSUFFIX): $(top_srcdir)/gecode/gist/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_GIST \ |
|
-c -o $@ $< |
|
|
|
$(GISTSRC:%.cpp=%$(SBJSUFFIX)): gecode/gist/%$(SBJSUFFIX): $(top_srcdir)/gecode/gist/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_GIST \ |
|
-S -o $@ $< |
|
|
|
$(GISTMOCSRC:%.cpp=%$(OBJSUFFIX)): gecode/gist/moc_%$(OBJSUFFIX): gecode/gist/moc_%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_GIST \ |
|
-c -o $@ $< |
|
|
|
$(GISTMOCSRC:%.cpp=%$(SBJSUFFIX)): gecode/gist/moc_%$(SBJSUFFIX): gecode/gist/moc_%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_GIST \ |
|
-S -o $@ $< |
|
|
|
.PRECIOUS: gecode/gist/moc_%.cpp |
|
gecode/gist/moc_%.cpp: $(top_srcdir)/gecode/gist/%.hh |
|
$(MOC) $(CPPFLAGS) -pgecode/gist $< -o $@ |
|
|
|
.PRECIOUS: gecode/flatzinc/%.cpp gecode/flatzinc/%.hh |
|
ifeq "yes" "yes" |
|
gecode/flatzinc/lexer.yy.cpp: \ |
|
$(top_srcdir)/gecode/flatzinc/lexer.lxx \ |
|
$(top_srcdir)/gecode/flatzinc/parser.tab.hh |
|
flex -ogecode/flatzinc/lexer.yy.cpp \ |
|
$(top_srcdir)/gecode/flatzinc/lexer.lxx |
|
|
|
gecode/flatzinc/parser.tab.hh gecode/flatzinc/parser.tab.cpp: \ |
|
$(top_srcdir)/gecode/flatzinc/parser.yxx |
|
bison -t -o gecode/flatzinc/parser.tab.cpp -d $< |
|
mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh |
|
else |
|
ifneq "$(top_srcdir)" "." |
|
gecode/flatzinc/lexer.yy.cpp: $(top_srcdir)/gecode/flatzinc/lexer.yy.cpp |
|
cp $(@:%=$(top_srcdir)/%) $@ |
|
gecode/flatzinc/parser.tab.hh: $(top_srcdir)/gecode/flatzinc/parser.tab.hh |
|
cp $(@:%=$(top_srcdir)/%) $@ |
|
gecode/flatzinc/parser.tab.cpp: $(top_srcdir)/gecode/flatzinc/parser.tab.cpp |
|
cp $(@:%=$(top_srcdir)/%) $@ |
|
endif |
|
endif |
|
|
|
$(FLATZINCSRC:%.cpp=%$(OBJSUFFIX)): gecode/flatzinc/%$(OBJSUFFIX): $(top_srcdir)/gecode/flatzinc/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_FLATZINC \ |
|
-c -o $@ $< |
|
|
|
$(FLATZINCSRC:%.cpp=%$(SBJSUFFIX)): gecode/flatzinc/%$(SBJSUFFIX): $(top_srcdir)/gecode/flatzinc/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_FLATZINC \ |
|
-S -o $@ $< |
|
|
|
$(FLATZINC_GENSRC:%.cpp=%$(OBJSUFFIX)): gecode/flatzinc/%$(OBJSUFFIX): gecode/flatzinc/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_FLATZINC \ |
|
-c -o $@ $< |
|
|
|
$(FLATZINC_GENSRC:%.cpp=%$(SBJSUFFIX)): gecode/flatzinc/%$(SBJSUFFIX): gecode/flatzinc/%.cpp |
|
$(CXX) $(CXXFLAGS) $(QT_CPPFLAGS) \ |
|
-DGECODE_BUILD_FLATZINC \ |
|
-S -o $@ $< |
|
|
|
# |
|
# DLL Targets |
|
# |
|
|
|
ifeq "$(DLLSUFFIX)" "$(LIBSUFFIX)" |
|
|
|
ifeq "" "yes" |
|
export LINKALL = -F. -framework gecode |
|
else |
|
export LINKALL = \ |
|
$(LINKFLATZINC) $(LINKDRIVER) $(LINKGIST) \ |
|
$(LINKSEARCH) $(LINKMM) $(LINKSET) $(LINKINT) \ |
|
$(LINKKERNEL) $(LINKSUPPORT) |
|
endif |
|
|
|
$(SUPPORTDLL): $(SUPPORTOBJ) |
|
$(CXX) $(DLLFLAGS) $(SUPPORTOBJ) $(SUPPORTSONAME) \ |
|
-o $(SUPPORTDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(KERNELDLL): $(KERNELOBJ) $(SUPPORTDLL) |
|
$(CXX) $(DLLFLAGS) $(KERNELOBJ) $(KERNELSONAME) \ |
|
-L. $(LINKSUPPORT) \ |
|
-o $(KERNELDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(SEARCHDLL): $(SEARCHOBJ) $(SUPPORTDLL) $(KERNELDLL) |
|
$(CXX) $(DLLFLAGS) $(SEARCHOBJ) $(SEARCHSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) \ |
|
-o $(SEARCHDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(INTDLL): $(INTOBJ) $(SUPPORTDLL) $(KERNELDLL) |
|
$(CXX) $(DLLFLAGS) $(INTOBJ) $(INTSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) \ |
|
-o $(INTDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(SETDLL): $(SETOBJ) $(SUPPORTDLL) $(KERNELDLL) $(INTDLL) |
|
$(CXX) $(DLLFLAGS) $(SETOBJ) $(SETSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) $(LINKINT) \ |
|
-o $(SETDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(MMDLL): $(MMOBJ) $(SUPPORTDLL) $(KERNELDLL) $(INTDLL) $(SETDLL) |
|
$(CXX) $(DLLFLAGS) $(MMOBJ) $(MMSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) $(LINKINT) $(LINKSET) \ |
|
-o $(MMDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(DRIVERDLL): $(DRIVEROBJ) $(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) $(INTDLL) $(MMDLL) $(GISTDLL) |
|
$(CXX) $(DLLFLAGS) $(DRIVEROBJ) $(DRIVERSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) $(LINKSEARCH) $(LINKINT) $(LINKMM) $(LINKGIST) \ |
|
-o $(DRIVERDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(GISTDLL): $(GISTOBJ) $(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) $(INTDLL) |
|
$(CXX) $(DLLFLAGS) $(GISTOBJ) $(GISTSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) $(LINKSEARCH) $(LINKINT) $(LINKQT) \ |
|
-o $(GISTDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(FLATZINCDLL): $(FLATZINCOBJ) $(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) \ |
|
$(INTDLL) $(SETDLL) $(GISTDLL) $(MMDLL) $(DRIVERDLL) |
|
$(CXX) $(DLLFLAGS) $(FLATZINCOBJ) $(FLATZINCSONAME) \ |
|
-L. $(LINKSUPPORT) $(LINKKERNEL) $(LINKSEARCH) $(LINKINT) \ |
|
$(LINKSET) $(LINKMM) $(LINKGIST) $(LINKDRIVER) $(LINKQT) \ |
|
-o $(FLATZINCDLL) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) |
|
$(CREATELINK) $@ $(@:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
else |
|
export LINKALL = |
|
|
|
ifeq "no" "yes" |
|
$(SUPPORTRC): |
|
$(RCGEN) $(SUPPORTDLL) $(SUPPORTHDR) $(SUPPORTSRC) > $@ |
|
endif |
|
$(SUPPORTDLL) $(SUPPORTLIB): $(SUPPORTOBJ) $(SUPPORTRES) |
|
$(CXX) $(DLLFLAGS) $(SUPPORTOBJ) $(SUPPORTRES) \ |
|
-o $(SUPPORTDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(SUPPORTDLL).manifest |
|
$(MANIFEST) -manifest $(SUPPORTDLL).manifest \ |
|
-outputresource:$(SUPPORTDLL)\;2 |
|
ifeq "no" "yes" |
|
$(KERNELRC): |
|
$(RCGEN) $(KERNELDLL) $(KERNELHDR) $(VARIMPHDR) $(KERNELSRC) > $@ |
|
endif |
|
$(KERNELDLL) $(KERNELLIB): $(KERNELOBJ) $(KERNELRES) $(SUPPORTDLL) |
|
$(CXX) $(DLLFLAGS) $(KERNELOBJ) $(KERNELRES) \ |
|
-L. -o $(KERNELDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(KERNELDLL).manifest |
|
$(MANIFEST) -manifest $(KERNELDLL).manifest \ |
|
-outputresource:$(KERNELDLL)\;2 |
|
ifeq "no" "yes" |
|
$(SEARCHRC): |
|
$(RCGEN) $(SEARCHDLL) $(SEARCHHDR) $(SEARCHSRC) > $@ |
|
endif |
|
$(SEARCHDLL) $(SEARCHLIB): $(SEARCHOBJ) $(SEARCHRES) $(SUPPORTDLL) $(KERNELDLL) |
|
$(CXX) $(DLLFLAGS) $(SEARCHOBJ) $(SEARCHRES) \ |
|
-L. -o $(SEARCHDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(SEARCHDLL).manifest |
|
$(MANIFEST) -manifest $(SEARCHDLL).manifest \ |
|
-outputresource:$(SEARCHDLL)\;2 |
|
ifeq "no" "yes" |
|
$(INTRC): |
|
$(RCGEN) $(INTDLL) $(INTHDR) $(INTSRC) > $@ |
|
endif |
|
$(INTDLL) $(INTLIB): $(INTOBJ) $(INTRES) $(SUPPORTDLL) $(KERNELDLL) |
|
$(CXX) $(DLLFLAGS) $(INTOBJ) $(INTRES) \ |
|
-L. -o $(INTDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(INTDLL).manifest |
|
$(MANIFEST) -manifest $(INTDLL).manifest \ |
|
-outputresource:$(INTDLL)\;2 |
|
ifeq "no" "yes" |
|
$(SETRC): |
|
$(RCGEN) $(SETDLL) $(SETHDR) $(SETSRC) > $@ |
|
endif |
|
$(SETDLL) $(SETLIB): $(SETOBJ) $(SETRES) $(SUPPORTDLL) $(KERNELDLL) $(INTDLL) |
|
$(CXX) $(DLLFLAGS) $(SETOBJ) $(SETRES) \ |
|
-L. -o $(SETDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(SETDLL).manifest |
|
$(MANIFEST) -manifest $(SETDLL).manifest \ |
|
-outputresource:$(SETDLL)\;2 |
|
ifeq "no" "yes" |
|
$(MMRC): |
|
$(RCGEN) $(MMDLL) $(MMHDR) $(MMSRC) > $@ |
|
endif |
|
$(MMDLL) $(MMLIB): $(MMOBJ) $(MMRES) \ |
|
$(SUPPORTDLL) $(KERNELDLL) $(INTDLL) $(SETDLL) |
|
$(CXX) $(DLLFLAGS) $(MMOBJ) $(MMRES) \ |
|
-L. -o $(MMDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(MMDLL).manifest |
|
$(MANIFEST) -manifest $(MMDLL).manifest \ |
|
-outputresource:$(MMDLL)\;2 |
|
ifeq "no" "yes" |
|
$(DRIVERRC): |
|
$(RCGEN) $(DRIVERDLL) $(DRIVERHDR) $(DRIVERSRC) > $@ |
|
endif |
|
$(DRIVERDLL) $(DRIVERLIB): $(DRIVEROBJ) $(DRIVERRES) \ |
|
$(SUPPORTDLL) $(KERNELDLL) \ |
|
$(SEARCHDLL) $(INTDLL) $(MMDLL) $(GISTDLL) |
|
$(CXX) $(DLLFLAGS) $(DRIVEROBJ) $(DRIVERRES) \ |
|
-L. -o $(DRIVERDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(DRIVERDLL).manifest |
|
$(MANIFEST) -manifest $(DRIVERDLL).manifest \ |
|
-outputresource:$(DRIVERDLL)\;2 |
|
ifeq "no" "yes" |
|
$(GISTRC): |
|
$(RCGEN) $(GISTDLL) $(GISTHDR) $(GISTSRC) > $@ |
|
endif |
|
$(GISTDLL) $(GISTLIB): $(GISTOBJ) $(GISTRES) \ |
|
$(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) $(INTDLL) |
|
$(CXX) $(DLLFLAGS) $(GISTOBJ) $(GISTRES) \ |
|
-L. $(LINKQT) -o $(GISTDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(GISTDLL).manifest |
|
$(MANIFEST) -manifest $(GISTDLL).manifest \ |
|
-outputresource:$(GISTDLL)\;2 |
|
ifeq "no" "yes" |
|
$(FLATZINCRC): |
|
$(RCGEN) $(FLATZINCDLL) $(FLATZINCHDR) $(FLATZINCSRC) > $@ |
|
endif |
|
$(FLATZINCDLL) $(FLATZINCLIB): $(FLATZINCOBJ) $(FLATZINCRES) \ |
|
$(SUPPORTDLL) $(KERNELDLL) $(SEARCHDLL) $(INTDLL) \ |
|
$(SETDLL) $(GISTDLL) $(MMDLL) $(DRIVERDLL) |
|
$(CXX) $(DLLFLAGS) $(FLATZINCOBJ) $(FLATZINCRES) \ |
|
-L. $(LINKQT) -o $(FLATZINCDLL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $(FLATZINCDLL).manifest |
|
$(MANIFEST) -manifest $(FLATZINCDLL).manifest \ |
|
-outputresource:$(FLATZINCDLL)\;2 |
|
endif |
|
|
|
# |
|
# Static libraries |
|
# |
|
|
|
$(SUPPORTSTATICLIB): $(SUPPORTOBJ) |
|
$(AR) $(ARFLAGS) $@ $(SUPPORTOBJ) |
|
$(RANLIB) $@ |
|
$(KERNELSTATICLIB): $(KERNELOBJ) |
|
$(AR) $(ARFLAGS) $@ $(KERNELOBJ) |
|
$(RANLIB) $@ |
|
$(SEARCHSTATICLIB): $(SEARCHOBJ) |
|
$(AR) $(ARFLAGS) $@ $(SEARCHOBJ) |
|
$(RANLIB) $@ |
|
$(INTSTATICLIB): $(INTOBJ) |
|
$(AR) $(ARFLAGS) $@ $(INTOBJ) |
|
$(RANLIB) $@ |
|
$(SETSTATICLIB): $(SETOBJ) |
|
$(AR) $(ARFLAGS) $@ $(SETOBJ) |
|
$(RANLIB) $@ |
|
$(MMSTATICLIB): $(MMOBJ) |
|
$(AR) $(ARFLAGS) $@ $(MMOBJ) |
|
$(RANLIB) $@ |
|
$(DRIVERSTATICLIB): $(DRIVEROBJ) |
|
$(AR) $(ARFLAGS) $@ $(DRIVEROBJ) |
|
$(RANLIB) $@ |
|
$(GISTSTATICLIB): $(GISTOBJ) |
|
$(AR) $(ARFLAGS) $@ $(GISTOBJ) |
|
$(RANLIB) $@ |
|
$(FLATZINCSTATICLIB): $(FLATZINCOBJ) |
|
$(AR) $(ARFLAGS) $@ $(FLATZINCOBJ) |
|
$(RANLIB) $@ |
|
|
|
# |
|
# Mac OS X Framework |
|
# |
|
|
|
.PHONY: framework |
|
ifeq "" "yes" |
|
framework: gecode.framework/Versions/32/gecode |
|
|
|
gecode.framework/Versions/32/gecode: $(STATICTARGETS) |
|
$(RMF) gecode.framework |
|
mkdir -p gecode.framework/Versions/32 |
|
$(CXX) -all_load -compatibility_version 32.0 \ |
|
-current_version 32.0 \ |
|
$(DLLFLAGS) $(LINKQT) \ |
|
-o gecode.framework/Versions/32/gecode $^ |
|
$(MAKE) doinstallheaders \ |
|
prefix=gecode.framework/Versions/32 DESTDIR= |
|
mv gecode.framework/Versions/32/include/gecode/* \ |
|
gecode.framework/Versions/32/include/ |
|
rmdir gecode.framework/Versions/32/include/gecode |
|
cd gecode.framework/Versions && ln -s 32 Current |
|
ln -s Versions/Current/include \ |
|
gecode.framework/Headers |
|
ln -s Versions/Current/gecode \ |
|
gecode.framework/gecode |
|
else |
|
framework: |
|
endif |
|
|
|
# |
|
# EXE Targets |
|
# |
|
|
|
.PRECIOUS: examples/%$(OBJSUFFIX) |
|
ifeq "no" "yes" |
|
.PRECIOUS: examples/%$(EXESUFFIX).rc examples/%$(EXESUFFIX).res |
|
examples/%$(EXESUFFIX).rc: |
|
$(RCGEN) $(@:%.rc=%) $< > $@ |
|
examples/%$(EXESUFFIX): examples/%$(OBJSUFFIX) examples/%$(EXESUFFIX).res \ |
|
$(ALLLIB) |
|
$(CXX) -o $@ $< $@.res \ |
|
$(DLLPATH) $(CXXFLAGS) \ |
|
$(LINKALL) $(LINKQT) $(GLDFLAGS) |
|
$(FIXMANIFEST) $@.manifest |
|
$(MANIFEST) -manifest $@.manifest -outputresource:$@\;1 |
|
else |
|
examples/%$(EXESUFFIX): examples/%$(OBJSUFFIX) $(ALLLIB) |
|
$(CXX) -o $@ $< $(DLLPATH) $(CXXFLAGS) \ |
|
$(LINKALL) $(LINKQT) $(GLDFLAGS) |
|
$(FIXMANIFEST) $@.manifest |
|
$(MANIFEST) -manifest $@.manifest -outputresource:$@\;1 |
|
endif |
|
|
|
ifeq "no" "yes" |
|
TESTRES = $(TESTEXE).res |
|
$(TESTEXE).rc: |
|
$(RCGEN) $(TESTEXE) $(TESTSRC) $(TESTHDR) > $@ |
|
else |
|
TESTRES = |
|
endif |
|
$(TESTEXE): $(TESTOBJ) $(TESTRES) $(ALLLIB) |
|
$(CXX) -o $@ $(TESTOBJ) $(TESTRES) $(DLLPATH) $(CXXFLAGS) \ |
|
$(LINKALL) $(GLDFLAGS) |
|
$(FIXMANIFEST) $@.manifest $(DLLSUFFIX) |
|
$(MANIFEST) -manifest $@.manifest -outputresource:$@\;1 |
|
|
|
.PHONY: flatzinc |
|
ifeq "yes" "yes" |
|
flatzinc: $(FLATZINCEXE) |
|
else |
|
flatzinc: |
|
endif |
|
|
|
ifeq "no" "yes" |
|
FLATZINCEXERES = $(FLATZINCEXE).res |
|
$(FLATZINCEXE).rc: |
|
$(RCGEN) $(FLATZINCEXE) $(FLATZINCEXESRC) > $@ |
|
else |
|
FLATZINCEXERES = |
|
endif |
|
$(FLATZINCEXE): $(FLATZINCEXEOBJ) $(FLATZINCEXERES) $(ALLLIB) |
|
$(CXX) -o $@ $(FLATZINCEXEOBJ) $(FLATZINCEXERES) \ |
|
$(DLLPATH) $(CXXFLAGS) \ |
|
$(LINKALL) $(LINKSTATICQT) $(GLDFLAGS) |
|
$(FIXMANIFEST) $@.manifest |
|
$(MANIFEST) -manifest $@.manifest -outputresource:$@\;1 |
|
|
|
|
|
# |
|
# Autoconf |
|
# |
|
|
|
$(top_srcdir)/configure: $(top_srcdir)/configure.ac |
|
(cd $(top_srcdir) && autoconf) |
|
config.status: $(top_srcdir)/configure |
|
./config.status --recheck |
|
Makefile: $(top_srcdir)/Makefile.in config.status |
|
./config.status --file $@:$< |
|
doxygen.hh: $(top_srcdir)/doxygen/doxygen.hh.in config.status |
|
./config.status --file $@:$< |
|
doxygen.conf: $(top_srcdir)/doxygen/doxygen.conf.in config.status |
|
./config.status --file $@:$< |
|
|
|
# |
|
# Source distribution |
|
# |
|
|
|
DIST_FILES= \ |
|
configure.ac configure Makefile.in gecode.m4 \ |
|
changelog.in LICENSE \ |
|
doxygen/doxygen.conf.in doxygen/doxygen.hh.in \ |
|
install-sh \ |
|
misc/gecode.pc.in \ |
|
misc/gecode-search.pc.in misc/gecode-minimodel.pc.in \ |
|
misc/gecode-gist.pc.in misc/gecode-driver.pc.in \ |
|
gecode/support/config.hpp.in \ |
|
variables.vsl \ |
|
gecode/int/var-imp/int.vis \ |
|
gecode/int/var-imp/bool.vis \ |
|
gecode/set/var-imp/set.vis \ |
|
gecode/int/branch/post-view-int.bs \ |
|
gecode/int/branch/post-view-bool.bs \ |
|
gecode/set/branch/post-view.bs \ |
|
examples/support.hh \ |
|
examples/support/example.hpp \ |
|
examples/support/options.hpp \ |
|
misc/doxygen/back.png misc/doxygen/gecode-logo-100.png \ |
|
misc/doxygen/stylesheet.css misc/doxygen/footer.html \ |
|
misc/doxygen/header.html misc/genlicense.perl \ |
|
misc/genstatistics.perl misc/getrevision.perl \ |
|
misc/genchangelog.perl misc/genvarimp.perl \ |
|
misc/gentxtchangelog.perl misc/makedepend.perl \ |
|
misc/genbranch.perl |
|
|
|
distdir: |
|
rm -rf gecode-$(VERSION) && \ |
|
mkdir -p gecode-$(VERSION) && \ |
|
(cd $(top_srcdir) && tar cf - $(ALLHDR) $(ALLSRC)) | \ |
|
(cd gecode-$(VERSION) && tar xf -) && \ |
|
(cd $(top_srcdir) && tar cf - $(TESTSRC) $(TESTHDR) $(DIST_FILES)) | \ |
|
(cd gecode-$(VERSION) && tar xf -) |
|
|
|
dist: distdir |
|
tar chof - gecode-$(VERSION) | gzip -c >gecode-$(VERSION).tar.gz |
|
rm -rf gecode-$(VERSION) |
|
|
|
# |
|
# Documentation |
|
# |
|
|
|
export ENABLEDOCCHM = no |
|
export ENABLEDOCDOCSET = no |
|
ENABLEDOCSEARCH = no |
|
|
|
.PHONY: doc |
|
|
|
DOCSRC_NOTGENERATED = \ |
|
misc/doxygen/back.png misc/doxygen/footer.html \ |
|
misc/doxygen/gecode-logo-100.png \ |
|
misc/doxygen/stylesheet.css \ |
|
misc/genlicense.perl misc/genstatistics.perl misc/getrevision.perl \ |
|
misc/genchangelog.perl |
|
DOCSRC = $(DOCSRC_NOTGENERATED:%=$(top_srcdir)/%) \ |
|
doxygen.conf.use header.html \ |
|
doxygen.hh license.hh stat.hh changelog.hh |
|
|
|
changelog.hh: $(top_srcdir)/changelog.in |
|
perl $(top_srcdir)/misc/genchangelog.perl < $^ > changelog.hh |
|
|
|
ChangeLog: $(top_srcdir)/changelog.in |
|
perl $(top_srcdir)/misc/gentxtchangelog.perl < $^ > ChangeLog |
|
|
|
license.hh: $(ALLHDR:%=$(top_srcdir)/%) $(ALLSRC:%=$(top_srcdir)/%) \ |
|
$(VARIMPHDR) |
|
perl $(top_srcdir)/misc/genlicense.perl $^ > license.hh |
|
|
|
stat.hh: $(ALLHDR:%=$(top_srcdir)/%) $(ALLSRC:%=$(top_srcdir)/%) \ |
|
$(TESTHDR:%=$(top_srcdir)/%) $(TESTSRC:%=$(top_srcdir)/%) \ |
|
$(VARIMPHDR) |
|
perl $(top_srcdir)/misc/genstatistics.perl $^ > stat.hh |
|
|
|
|
|
ifeq "no" "yes" |
|
|
|
DOCTARGET=GecodeReference.chm |
|
|
|
header.html: $(top_srcdir)/misc/doxygen/header.html doxygen.conf |
|
grep -v '<form.*form>' < $< > $@ |
|
doxygen.conf.use: doxygen.conf |
|
(echo "GENERATE_HTMLHELP = YES"; \ |
|
echo "SEARCHENGINE = NO";\ |
|
echo "HAVE_DOT = NO") | \ |
|
cat $< - > $@ |
|
|
|
doc: $(ALLHDR:%=$(top_srcdir)/%) $(VARIMPHDR) \ |
|
$(ALLSRC:%=$(top_srcdir)/%) $(DOCSRC) |
|
mkdir -p doc/html |
|
cp -f $(top_srcdir)/misc/doxygen/back.png \ |
|
$(top_srcdir)/misc/doxygen/gecode-logo-100.png doc/html |
|
doxygen doxygen.conf.use |
|
mv doc/html/GecodeReference.chm GecodeReference.chm |
|
|
|
else |
|
ifeq "no" "yes" |
|
|
|
DOCTARGET=org.gecode.3.7.3.docset |
|
|
|
header.html: $(top_srcdir)/misc/doxygen/header.html doxygen.conf |
|
grep -v '<form.*form>' < $< > $@ |
|
doxygen.conf.use: doxygen.conf |
|
(echo "SEARCHENGINE = NO";\ |
|
echo "HAVE_DOT = NO";\ |
|
echo "GENERATE_DOCSET = YES";\ |
|
echo "DOCSET_BUNDLE_ID = org.gecode.3.7.3";\ |
|
echo "DOCSET_FEEDNAME = Gecode") | \ |
|
cat $< - > $@ |
|
|
|
doc: $(ALLHDR:%=$(top_srcdir)/%) $(VARIMPHDR) $(ALLSRC:%=$(top_srcdir)/%) \ |
|
$(DOCSRC) |
|
mkdir -p doc/html |
|
cp -f $(top_srcdir)/misc/doxygen/back.png \ |
|
$(top_srcdir)/misc/doxygen/gecode-logo-100.png doc/html |
|
doxygen doxygen.conf.use |
|
cd doc/html && make |
|
mv doc/html/$(DOCTARGET) . |
|
|
|
else |
|
DOCTARGET=doc/html |
|
|
|
ifeq "no" "yes" |
|
|
|
header.html: $(top_srcdir)/misc/doxygen/header.html doxygen.conf |
|
cat < $< > $@ |
|
doxygen.conf.use: doxygen.conf |
|
(echo "GENERATE_HTMLHELP = NO"; \ |
|
echo "SEARCHENGINE = YES"; \ |
|
echo "SERVER_BASED_SEARCH = YES"; \ |
|
echo "HAVE_DOT = NO") | \ |
|
cat $< - > $@ |
|
else |
|
|
|
header.html: $(top_srcdir)/misc/doxygen/header.html doxygen.conf |
|
grep -v '<form.*form>' < $< > $@ |
|
doxygen.conf.use: doxygen.conf |
|
(echo "GENERATE_HTMLHELP = NO"; \ |
|
echo "SEARCHENGINE = NO"; \ |
|
echo "HAVE_DOT = NO") | \ |
|
cat $< - > $@ |
|
|
|
endif |
|
|
|
doc: $(ALLHDR:%=$(top_srcdir)/%) $(VARIMPHDR) $(ALLSRC:%=$(top_srcdir)/%) \ |
|
$(DOCSRC) |
|
mkdir -p doc/html |
|
cp -f $(top_srcdir)/misc/doxygen/back.png \ |
|
$(top_srcdir)/misc/doxygen/gecode-logo-100.png doc/html |
|
doxygen doxygen.conf.use |
|
|
|
ifeq "no" "yes" |
|
# Work around a doxygen bug (a missing div screws up the layout) |
|
mv doc/html/search.php doc/html/search2.php |
|
sed -e 's|<div class="qindex">|<div><div class="qindex">|' \ |
|
doc/html/search2.php > doc/html/search.php |
|
rm doc/html/search2.php |
|
endif |
|
|
|
endif |
|
endif |
|
|
|
# |
|
# Installation |
|
# |
|
|
|
.PHONY: install |
|
|
|
ifeq "" "yes" |
|
install: installframework |
|
else |
|
|
|
ifeq "no" "yes" |
|
install: installlib installexamples |
|
else |
|
install: installlib |
|
endif |
|
|
|
endif |
|
|
|
doinstallheaders: $(ALLHDR:%=$(top_srcdir)/%) $(EXTRA_HEADERS) $(VARIMPHDR) |
|
mkdir -p $(DESTDIR)$(includedir) && \ |
|
(cd $(top_srcdir) && tar cf - $(ALLHDR)) | \ |
|
(cd $(DESTDIR)$(includedir) && tar xf -) && \ |
|
for_varimpheaders="$(VARIMPHDR)" && \ |
|
for f in $$for_varimpheaders; do \ |
|
cp $$f $(DESTDIR)$(includedir)/gecode/kernel; done && \ |
|
for_extraheaders="$(EXTRA_HEADERS)" && \ |
|
for f in $$for_extraheaders; do \ |
|
cp $$f $(DESTDIR)$(includedir)/gecode/support; done && \ |
|
for_mznlib="$(FLATZINCMZNLIB)" && \ |
|
for f in $$for_mznlib; do \ |
|
mkdir -p $(DESTDIR)$(datadir)/gecode/mznlib; \ |
|
cp $(top_srcdir)/$$f/*.mzn \ |
|
$(DESTDIR)$(datadir)/gecode/mznlib; done |
|
|
|
doinstalllib: |
|
mkdir -p $(DESTDIR)$(sharedlibdir) && \ |
|
mkdir -p $(DESTDIR)$(libdir) && \ |
|
mkdir -p $(DESTDIR)$(bindir) && \ |
|
for_libtargets="$(LIBTARGETS) $(PDBTARGETS)" && \ |
|
for f in $$for_libtargets; do \ |
|
cp $$f $(DESTDIR)$(sharedlibdir); done && \ |
|
for_liblinktargets="$(LIBLINKTARGETS)" && \ |
|
for f in $$for_liblinktargets; do \ |
|
cp -pR $$f $(DESTDIR)$(sharedlibdir); done &&\ |
|
for_liblibtargets="$(LIBLIBTARGETS)" && \ |
|
for f in $$for_liblibtargets; do \ |
|
cp $$f $(DESTDIR)$(libdir); done &&\ |
|
for_exetargets="$(EXETARGETS)" && \ |
|
for f in $$for_exetargets; do \ |
|
cp $$f $(DESTDIR)$(bindir); done |
|
|
|
ifeq "yes" "yes" |
|
ranliblib: |
|
for_static="$(STATICTARGETS)" ; \ |
|
for f in $$for_static; do \ |
|
$(RANLIB) $(DESTDIR)$(sharedlibdir)/$$f; done |
|
else |
|
ranliblib: |
|
endif |
|
|
|
installlib: compilelib |
|
$(MAKE) doinstalllib |
|
$(MAKE) doinstallheaders |
|
$(MAKE) ranliblib |
|
$(MAKE) installsubdirs |
|
|
|
installexamples: compileexamples |
|
mkdir -p $(DESTDIR)$(bindir); \ |
|
for_exampleexe="$(EXAMPLEEXE)" ; \ |
|
for f in $$for_exampleexe; do cp $$f $(DESTDIR)$(bindir); done \ |
|
|
|
installframework: framework |
|
mkdir -p $(DESTDIR)/Library/Frameworks/gecode.framework && \ |
|
(cd gecode.framework && tar cf - *) | \ |
|
(cd $(DESTDIR)/Library/Frameworks/gecode.framework && tar xf -) |
|
|
|
installdoc: doc |
|
mkdir -p $(DESTDIR)$(docdir); \ |
|
cp -r $(DOCTARGET) $(DESTDIR)$(docdir) |
|
|
|
installsubdirs: |
|
@for_subdirs="$(subdirs)" ; for i in $$for_subdirs; do \ |
|
cd $$i && if test -f Makefile; then \ |
|
echo "Making install in directory $$i"; \ |
|
$(MAKE) install; \ |
|
fi; \ |
|
done |
|
|
|
# |
|
# Source Distribution |
|
# |
|
|
|
.PHONY: distdoc |
|
|
|
ifeq "no" "yes" |
|
DOCSUFFIX = search-$(VERSION) |
|
else |
|
DOCSUFFIX = $(VERSION) |
|
endif |
|
|
|
distdoc: doc |
|
rm -rf gecode-doc-$(DOCSUFFIX) && \ |
|
mv doc/html gecode-doc-$(DOCSUFFIX) && \ |
|
$(TAR) cf - gecode-doc-$(DOCSUFFIX) | \ |
|
gzip -9 > gecode-doc-$(DOCSUFFIX).tar.gz && \ |
|
7z a -mx9 gecode-doc-$(DOCSUFFIX).7z gecode-doc-$(DOCSUFFIX) && \ |
|
$(RMF) gecode-doc-$(DOCSUFFIX) && \ |
|
if test -f doc/gecode-doc.tag; then \ |
|
mv doc/gecode-doc.tag gecode-doc-$(DOCSUFFIX).tag && \ |
|
gzip -9 gecode-doc-$(DOCSUFFIX).tag; \ |
|
fi |
|
|
|
|
|
# |
|
# Maintenance targets |
|
# |
|
|
|
clean: |
|
$(RMF) *.stackdump core gmon.out \ |
|
vc70.pdb vc80.pdb vc90.pdb vc100.pdb |
|
$(RMF) doxygen.log doxygen.hh doxygen.conf.use stat.hh \ |
|
changelog.hh doxygen.hh license.hh header.html |
|
$(RMF) $(ALLOBJ) $(ALLSBJ) $(ALLOBJ:%$(OBJSUFFIX)=%.pdb) |
|
$(RMF) $(TESTOBJ) $(TESTSBJ) $(TESTOBJ:%$(OBJSUFFIX)=%.pdb) |
|
$(RMF) $(GISTMOCSRC) |
|
$(RMF) $(LIBTARGETS:%$(DLLSUFFIX)=%$(MANIFESTSUFFIX)) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(RCSUFFIX)) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(RESSUFFIX)) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(EXPSUFFIX)) |
|
$(RMF) $(EXAMPLEEXE:%.exe=%.pdb) $(EXAMPLEEXE:%=%.manifest) \ |
|
$(EXAMPLEEXE:%=%.rc) $(EXAMPLEEXE:%=%.res) |
|
$(RMF) $(TESTEXE:%.exe=%.pdb) $(TESTEXE:%=%.manifest) \ |
|
$(TESTEXE:%=%.rc) $(TESTEXE:%=%.res) |
|
$(RMF) $(FLATZINCEXE:%.exe=%.pdb) $(FLATZINCEXE:%=%.manifest) \ |
|
$(FLATZINCEXE:%=%.rc) $(FLATZINCEXE:%=%.res) |
|
|
|
veryclean: clean |
|
$(RMF) $(LIBTARGETS) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(LIBSUFFIX)) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(PDBSUFFIX)) |
|
$(RMF) $(LIBTARGETS:%$(DLLSUFFIX)=%$(SOLINKSUFFIX)) \ |
|
$(LIBTARGETS:%$(DLLSUFFIX)=%$(SOSUFFIX)) |
|
$(RMF) $(EXAMPLEEXE) |
|
$(RMF) $(TESTEXE) |
|
$(RMF) $(FLATZINCEXE) |
|
$(RMF) doc GecodeReference.chm ChangeLog |
|
$(RMF) $(ALLOBJ:%$(OBJSUFFIX)=%.gcno) $(TESTOBJ:%$(OBJSUFFIX)=%.gcno) |
|
$(RMF) $(ALLOBJ:%$(OBJSUFFIX)=%.gcda) $(TESTOBJ:%$(OBJSUFFIX)=%.gcda) |
|
|
|
distclean: veryclean |
|
$(RMF) $(VARIMP) |
|
$(RMF) $(GENBRANCHSRC) |
|
$(RMF) Makefile doxygen.conf |
|
$(RMF) $(EXTRA_HEADERS) |
|
$(RMF) config.log config.status Makefile.dep |
|
|
|
depend: mkcompiledirs |
|
@$(MAKE) $(VARIMP) $(GENBRANCHSRC) |
|
perl $(top_srcdir)/misc/makedepend.perl \ |
|
$(top_srcdir) \ |
|
$(ALLSRC) \ |
|
$(FLATZINC_GENSRC) \ |
|
$(TESTSRC) > Makefile.dep |
|
|
|
-include Makefile.dep |