source: stable/2.6/Cbc/examples/Makefile.in @ 1553

Last change on this file since 1553 was 1553, checked in by stefan, 8 years ago

sync with trunk rev1551, except for chgsets 1539,1540

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