source: trunk/Cbc/examples/Makefile.in @ 1898

Last change on this file since 1898 was 1898, checked in by stefan, 5 years ago

fixup examples

  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# Copyright (C) 2006 International Business Machines and others.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5# $Id: Makefile.in 1898 2013-04-09 18:06:04Z stefan $
6
7##########################################################################
8#    You can modify this example makefile to fit for your own program.   #
9#    Usually, you only need to change the five CHANGEME entries below.   #
10##########################################################################
11
12# To compile other examples, either changed the following line, or
13# add the argument DRIVER=problem_name to make
14DRIVER = driver
15
16# CHANGEME: This should be the name of your executable
17EXE = $(DRIVER)@EXEEXT@
18
19# CHANGEME: Here is the name of all object files corresponding to the source
20#           code that you wrote in order to define the problem statement
21OBJS =  $(DRIVER).@OBJEXT@
22
23# extra object files that are required by some examples (we just link them into each one)
24EXTRAOBJS = \
25        CbcCompareUser.@OBJEXT@ \
26        CbcSolver2.@OBJEXT@ \
27        CbcSolver3.@OBJEXT@ \
28        CbcSolverLongThin.@OBJEXT@ \
29        ClpQuadInterface.@OBJEXT@ \
30        CbcBranchFollow2.@OBJEXT@ \
31        CbcBranchUser.@OBJEXT@ \
32        CbcBranchLink.@OBJEXT@
33
34# CHANGEME: Additional libraries
35# e.g., for driver2, put -lOsiCbc here
36ADDLIBS =
37
38# CHANGEME: Additional flags for compilation (e.g., include flags)
39ADDINCFLAGS =
40
41# CHANGEME: Directory to the sources for the (example) problem definition
42# files
43SRCDIR = @srcdir@
44VPATH = @srcdir@
45
46##########################################################################
47#  Usually, you don't have to change anything below.  Note that if you   #
48#  change certain compiler options, you might have to recompile the      #
49#  package.                                                              #
50##########################################################################
51
52COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE
53COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE
54COIN_HAS_SAMPLE = @COIN_HAS_SAMPLE_TRUE@TRUE
55COIN_HAS_MIPLIB3 = @COIN_HAS_MIPLIB3_TRUE@TRUE
56
57# C++ Compiler command
58CXX = @CXX@
59
60# C++ Compiler options
61CXXFLAGS = @CXXFLAGS@
62
63# C Compiler options
64CFLAGS = @CFLAGS@
65
66# additional C++ Compiler options for linking
67CXXLINKFLAGS = @RPATH_FLAGS@
68
69# Sample data directory
70ifeq ($(COIN_HAS_SAMPLE), TRUE)
71  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
72    CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
73      CFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
74  else
75    CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
76      CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
77  endif
78endif
79
80# Miplib3 data directory
81ifeq ($(COIN_HAS_MIPLIB3), TRUE)
82  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
83    CXXFLAGS += -DMIPLIB3DIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatamiplib3`\"
84  else
85    CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA_INSTALLED@\"
86  endif
87endif
88
89# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
90ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
91  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags cbc`
92else
93  INCL = @CBCLIB_CFLAGS_INSTALLED@
94endif
95INCL += -I@srcdir@ $(ADDINCFLAGS)
96
97# Linker flags
98ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
99  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs cbc`
100else
101  ifeq ($(COIN_CXX_IS_CL), TRUE)
102    LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libCbcSolver.lib libCbc.lib libOsiCbc.lib @CBCLIB_LIBS_INSTALLED@
103  else
104    LIBS = -L@abs_lib_dir@ -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS_INSTALLED@
105  endif
106endif
107
108# The following is necessary under cygwin, if native compilers are used
109CYGPATH_W = @CYGPATH_W@
110
111# Here we list all possible generated objects or executables to delete them
112CLEANFILES = $(EXTRAOBJS) \
113        allCuts.@OBJEXT@ allCuts@EXEEXT@ \
114        barrier.@OBJEXT@ barrier@EXEEXT@ \
115        cbc_driverC_sos.@OBJEXT@ cbc_driverC_sos@EXEEXT@ \
116        crew.@OBJEXT@ crew@EXEEXT@ \
117        driver.@OBJEXT@ driver@EXEEXT@ \
118        driver2.@OBJEXT@ driver2@EXEEXT@ \
119        driver3.@OBJEXT@ driver3@EXEEXT@ \
120        driver4.@OBJEXT@ driver4@EXEEXT@ \
121        fast0507b.@OBJEXT@ fast0507b@EXEEXT@ \
122        fast0507.@OBJEXT@ fast0507@EXEEXT@ \
123        gear.@OBJEXT@ gear@EXEEXT@ \
124        hotstart.@OBJEXT@ hotstart@EXEEXT@ \
125        interrupt.@OBJEXT@ interrupt@EXEEXT@ \
126        link.@OBJEXT@ link@EXEEXT@ \
127        longthin.@OBJEXT@ longthin@EXEEXT@ \
128        lotsize.@OBJEXT@ lotsize@EXEEXT@ \
129        minimum.@OBJEXT@ minimum@EXEEXT@ \
130        modify.@OBJEXT@ modify@EXEEXT@ \
131        nway.@OBJEXT@ nway@EXEEXT@ \
132        qmip.@OBJEXT@ qmip@EXEEXT@ \
133        qmip2.@OBJEXT@ qmip2@EXEEXT@ \
134        repeat.@OBJEXT@ repeat@EXEEXT@ \
135        sample1.@OBJEXT@ sample1@EXEEXT@ \
136        sample2.@OBJEXT@ sample2@EXEEXT@ \
137        sample3.@OBJEXT@ sample3@EXEEXT@ \
138        sample4.@OBJEXT@ sample4@EXEEXT@ \
139        sample5.@OBJEXT@ sample5@EXEEXT@ \
140        simpleBAB.@OBJEXT@ simpleBAB@EXEEXT@ \
141        sos.@OBJEXT@ sos@EXEEXT@ \
142        sudoku.@OBJEXT@ sudoku@EXEEXT@
143
144all: $(EXE)
145
146.SUFFIXES: .cpp .c .o .obj
147
148$(EXE): $(OBJS) $(EXTRAOBJS)
149        bla=;\
150        for file in $(OBJS) $(EXTRAOBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
151        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
152
153clean:
154        rm -rf $(CLEANFILES) $(OBJS)
155
156.cpp.o:
157        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
158
159
160.cpp.obj:
161        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
162
163.c.o:
164        $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
165
166
167.c.obj:
168        $(CC) $(CFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
Note: See TracBrowser for help on using the repository browser.