source: trunk/Clp/examples/Makefile.in

Last change on this file was 2030, checked in by forrest, 5 years ago

fix some ampl stuff, add ClpSolver? and a few fixes

File size: 5.3 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 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
23# CHANGEME: Additional libraries
24ADDLIBS =
25
26# CHANGEME: Additional flags for compilation (e.g., include flags)
27ADDINCFLAGS =
28
29# CHANGEME: Directory to the sources for the (example) problem definition
30# files
31SRCDIR = @srcdir@
32VPATH = @srcdir@
33
34##########################################################################
35#  Usually, you don't have to change anything below.  Note that if you   #
36#  change certain compiler options, you might have to recompile the      #
37#  COIN package.                                                         #
38##########################################################################
39
40COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE
41COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE
42COIN_HAS_SAMPLE = @COIN_HAS_SAMPLE_TRUE@TRUE
43COIN_HAS_NETLIB = @COIN_HAS_NETLIB_TRUE@TRUE
44
45# C++ Compiler command
46CXX = @CXX@
47
48# C++ Compiler options
49CXXFLAGS = @CXXFLAGS@
50
51# additional C++ Compiler options for linking
52CXXLINKFLAGS = @RPATH_FLAGS@
53
54# C Compiler command
55CC = @CC@
56
57# C Compiler options
58CFLAGS = @CFLAGS@
59
60# Sample data directory
61ifeq ($(COIN_HAS_SAMPLE), TRUE)
62  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
63    CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
64      CFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
65  else
66    CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
67      CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
68  endif
69endif
70
71# Netlib data directory
72ifeq ($(COIN_HAS_NETLIB), TRUE)
73  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
74    CXXFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
75      CFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
76  else
77    CXXFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
78      CFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
79  endif
80endif
81
82# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
83ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
84  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags clp`
85else
86  INCL = @CLPLIB_CFLAGS_INSTALLED@
87endif
88INCL += $(ADDINCFLAGS)
89
90# Linker flags
91ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
92  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs clp`
93else
94  ifeq ($(COIN_CXX_IS_CL), TRUE)
95    LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libClpSolver.lib libClp.lib @CLPLIB_LIBS_INSTALLED@
96  else
97    LIBS = -L@abs_lib_dir@ -lClpSolver -lClp @CLPLIB_LIBS_INSTALLED@
98  endif
99endif
100
101# The following is necessary under cygwin, if native compilers are used
102CYGPATH_W = @CYGPATH_W@
103
104# Here we list all possible generated objects or executables to delete them
105CLEANFILES = \
106        addBits.@OBJEXT@ addBits@EXEEXT@ \
107        addColumns.@OBJEXT@ addColumns@EXEEXT@ \
108        addRows.@OBJEXT@ addRows@EXEEXT@ \
109        decomp2.@OBJEXT@ decomp2@EXEEXT@ \
110        decomp3.@OBJEXT@ decomp3@EXEEXT@ \
111        decompose.@OBJEXT@ decompose@EXEEXT@ \
112        defaults.@OBJEXT@ defaults@EXEEXT@ \
113        driver2.@OBJEXT@ driver2@EXEEXT@ \
114        driver.@OBJEXT@ driver@EXEEXT@ \
115        driverC.@OBJEXT@ driverC@EXEEXT@ \
116        dualCuts.@OBJEXT@ dualCuts@EXEEXT@ \
117        ekk.@OBJEXT@ ekk@EXEEXT@ \
118        ekk_interface.@OBJEXT@ ekk_interface@EXEEXT@ \
119        hello.@OBJEXT@ hello@EXEEXT@ \
120        makeDual.@OBJEXT@ makeDual@EXEEXT@ \
121        minimum.@OBJEXT@ minimum@EXEEXT@ \
122        modify.@OBJEXT@ modify@EXEEXT@ \
123        network.@OBJEXT@ network@EXEEXT@ \
124        pdco.@OBJEXT@ pdco@EXEEXT@ \
125        piece.@OBJEXT@ piece@EXEEXT@ \
126        rowColumn.@OBJEXT@ rowColumn@EXEEXT@ \
127        sprint2.@OBJEXT@ sprint2@EXEEXT@ \
128        sprint.@OBJEXT@ sprint@EXEEXT@ \
129        testBarrier.@OBJEXT@ testBarrier@EXEEXT@ \
130        testBasis.@OBJEXT@ testBasis@EXEEXT@ \
131        testGub2.@OBJEXT@ testGub2@EXEEXT@ \
132        testGub.@OBJEXT@ testGub@EXEEXT@ \
133        testQP.@OBJEXT@ testQP@EXEEXT@ \
134        useVolume.@OBJEXT@ useVolume@EXEEXT@
135
136all: $(EXE)
137
138.SUFFIXES: .cpp .c .o .obj
139
140$(EXE): $(OBJS)
141        bla=;\
142        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
143        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
144
145clean:
146        rm -rf $(CLEANFILES)
147
148.cpp.o:
149        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
150
151
152.cpp.obj:
153        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
154
155.c.o:
156        $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
157
158
159.c.obj:
160        $(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.