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

Last change on this file since 1541 was 1541, checked in by stefan, 9 years ago

use new fallback variables to setup addlibs file in fallback mode; use pkg-config or these variables for examples Makefile

File size: 4.7 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
47# C++ Compiler command
48CXX = @CXX@
49
50# C++ Compiler options
51CXXFLAGS = @CXXFLAGS@
52@COIN_HAS_SAMPLE_TRUE@@COIN_HAS_PKGCONFIG_TRUE@CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
53@COIN_HAS_SAMPLE_TRUE@@COIN_HAS_PKGCONFIG_FALSE@CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
54@COIN_HAS_MIPLIB3_TRUE@@COIN_HAS_PKGCONFIG_TRUE@CXXFLAGS += -DMIPLIB3DIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatamiplib3`\"
55@COIN_HAS_MIPLIB3_TRUE@@COIN_HAS_PKGCONFIG_FALSE@CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA_INSTALLED@\"
56
57# C Compiler options
58CFLAGS = @CFLAGS@
59@COIN_HAS_SAMPLE_TRUE@CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
60
61# additional C++ Compiler options for linking
62CXXLINKFLAGS = @RPATH_FLAGS@
63
64# Compiler flags (we use the CYGPATH_W variables to allow compilation with Windows compilers)
65@COIN_HAS_PKGCONFIG_TRUE@INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags cbc` $(ADDINCFLAGS)
66@COIN_HAS_PKGCONFIG_FALSE@INCL = @CBCLIB_CFLAGS_INSTALLED@ $(ADDINCFLAGS)
67
68# Linker flags
69@COIN_HAS_PKGCONFIG_TRUE@@COIN_CXX_IS_CL_FALSE@LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs cbc`
70@COIN_HAS_PKGCONFIG_TRUE@@COIN_CXX_IS_CL_TRUE@LIBS = /link: `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --msvc-syntax --libs cbc`
71@COIN_HAS_PKGCONFIG_FALSE@LIBS = -L@abs_lib_dir@ -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS_INSTALLED@
72
73# The following is necessary under cygwin, if native compilers are used
74CYGPATH_W = @CYGPATH_W@
75
76# Here we list all possible generated objects or executables to delete them
77CLEANFILES = \
78        crew.@OBJEXT@ crew@EXEEXT@ \
79        barrier.@OBJEXT@ barrier@EXEEXT@ \
80        driver2.@OBJEXT@ driver2@EXEEXT@ \
81        driver.@OBJEXT@ driver@EXEEXT@ \
82        dynamic.@OBJEXT@ dynamic@EXEEXT@ \
83        fast0507b.@OBJEXT@ fast0507b@EXEEXT@ \
84        fast0507.@OBJEXT@ fast0507@EXEEXT@ \
85        gear.@OBJEXT@ gear@EXEEXT@ \
86        hotstart.@OBJEXT@ hotstart@EXEEXT@ \
87        link.@OBJEXT@ link@EXEEXT@ \
88        longthin.@OBJEXT@ longthin@EXEEXT@ \
89        lotsize.@OBJEXT@ lotsize@EXEEXT@ \
90        minimum.@OBJEXT@ minimum@EXEEXT@ \
91        nway.@OBJEXT@ nway@EXEEXT@ \
92        qmip.@OBJEXT@ qmip@EXEEXT@ \
93        qmip2.@OBJEXT@ qmip2@EXEEXT@ \
94        repeat.@OBJEXT@ repeat@EXEEXT@ \
95        sample1.@OBJEXT@ sample1@EXEEXT@ \
96        sample2.@OBJEXT@ sample2@EXEEXT@ \
97        sample3.@OBJEXT@ sample3@EXEEXT@ \
98        sample4.@OBJEXT@ sample4@EXEEXT@ \
99        sample5.@OBJEXT@ sample5@EXEEXT@ \
100        sos.@OBJEXT@ sos@EXEEXT@ \
101        sudoku.@OBJEXT@ sudoku@EXEEXT@
102
103all: $(EXE)
104
105.SUFFIXES: .cpp .c .o .obj
106
107$(EXE): $(OBJS)
108        bla=;\
109        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
110        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
111
112clean:
113        rm -rf $(CLEANFILES) $(OBJS)
114
115.cpp.o:
116        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
117
118
119.cpp.obj:
120        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
121
122.c.o:
123        $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
124
125
126.c.obj:
127        $(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.