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

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

fix svn keywords property

  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 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 1854 2013-01-28 00:02:55Z 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#       CbcCompareUser.@OBJEXT@ \
24#       CbcSolver2.@OBJEXT@ \
25#       CbcSolver3.@OBJEXT@ \
26#       ClpQuadInterface.@OBJEXT@ \
27#       CbcBranchFollow2.@OBJEXT@ \
28#       CbcBranchUser.@OBJEXT@ \
29#       CbcBranchLink.@OBJEXT@
30
31# CHANGEME: Additional libraries
32ADDLIBS =
33
34# CHANGEME: Additional flags for compilation (e.g., include flags)
35ADDINCFLAGS =
36
37# CHANGEME: Directory to the sources for the (example) problem definition
38# files
39SRCDIR = @srcdir@
40VPATH = @srcdir@
41
42##########################################################################
43#  Usually, you don't have to change anything below.  Note that if you   #
44#  change certain compiler options, you might have to recompile the      #
45#  package.                                                              #
46##########################################################################
47
48COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE
49COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE
50COIN_HAS_SAMPLE = @COIN_HAS_SAMPLE_TRUE@TRUE
51COIN_HAS_MIPLIB3 = @COIN_HAS_MIPLIB3_TRUE@TRUE
52
53# C++ Compiler command
54CXX = @CXX@
55
56# C++ Compiler options
57CXXFLAGS = @CXXFLAGS@
58
59# C Compiler options
60CFLAGS = @CFLAGS@
61
62# additional C++ Compiler options for linking
63CXXLINKFLAGS = @RPATH_FLAGS@
64
65# Sample data directory
66ifeq ($(COIN_HAS_SAMPLE), TRUE)
67  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
68    CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
69      CFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
70  else
71    CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
72      CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
73  endif
74endif
75
76# Miplib3 data directory
77ifeq ($(COIN_HAS_MIPLIB3), TRUE)
78  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
79    CXXFLAGS += -DMIPLIB3DIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatamiplib3`\"
80  else
81    CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA_INSTALLED@\"
82  endif
83endif
84
85# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
86ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
87  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags cbc`
88else
89  INCL = @CBCLIB_CFLAGS_INSTALLED@
90endif
91INCL += $(ADDINCFLAGS)
92
93# Linker flags
94ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
95  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs cbc`
96else
97  ifeq ($(COIN_CXX_IS_CL), TRUE)
98    LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libCbcSolver.lib libCbc.lib libOsiCbc.lib @CBCLIB_LIBS_INSTALLED@
99  else
100    LIBS = -L@abs_lib_dir@ -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS_INSTALLED@
101  endif
102endif
103
104# The following is necessary under cygwin, if native compilers are used
105CYGPATH_W = @CYGPATH_W@
106
107# Here we list all possible generated objects or executables to delete them
108CLEANFILES = \
109        crew.@OBJEXT@ crew@EXEEXT@ \
110        barrier.@OBJEXT@ barrier@EXEEXT@ \
111        driver2.@OBJEXT@ driver2@EXEEXT@ \
112        driver.@OBJEXT@ driver@EXEEXT@ \
113        dynamic.@OBJEXT@ dynamic@EXEEXT@ \
114        fast0507b.@OBJEXT@ fast0507b@EXEEXT@ \
115        fast0507.@OBJEXT@ fast0507@EXEEXT@ \
116        gear.@OBJEXT@ gear@EXEEXT@ \
117        hotstart.@OBJEXT@ hotstart@EXEEXT@ \
118        link.@OBJEXT@ link@EXEEXT@ \
119        longthin.@OBJEXT@ longthin@EXEEXT@ \
120        lotsize.@OBJEXT@ lotsize@EXEEXT@ \
121        minimum.@OBJEXT@ minimum@EXEEXT@ \
122        nway.@OBJEXT@ nway@EXEEXT@ \
123        qmip.@OBJEXT@ qmip@EXEEXT@ \
124        qmip2.@OBJEXT@ qmip2@EXEEXT@ \
125        repeat.@OBJEXT@ repeat@EXEEXT@ \
126        sample1.@OBJEXT@ sample1@EXEEXT@ \
127        sample2.@OBJEXT@ sample2@EXEEXT@ \
128        sample3.@OBJEXT@ sample3@EXEEXT@ \
129        sample4.@OBJEXT@ sample4@EXEEXT@ \
130        sample5.@OBJEXT@ sample5@EXEEXT@ \
131        sos.@OBJEXT@ sos@EXEEXT@ \
132        sudoku.@OBJEXT@ sudoku@EXEEXT@
133
134all: $(EXE)
135
136.SUFFIXES: .cpp .c .o .obj
137
138$(EXE): $(OBJS)
139        bla=;\
140        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
141        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
142
143clean:
144        rm -rf $(CLEANFILES) $(OBJS)
145
146.cpp.o:
147        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
148
149
150.cpp.obj:
151        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
152
153.c.o:
154        $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
155
156
157.c.obj:
158        $(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.