source: trunk/Clp/examples/Makefile.in @ 1645

Last change on this file since 1645 was 1645, checked in by stefan, 10 years ago

get examples working for cygwin/cl without pkg-config

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
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
71ifeq ($(COIN_HAS_NETLIB), TRUE)
72  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
73    CXXFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
74      CFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
75  else
76    CXXFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
77      CFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
78  endif
79endif
80
81# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
82ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
83  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags clp`
84else
85  INCL = @CLPLIB_CFLAGS_INSTALLED@
86endif
87INCL += $(ADDINCFLAGS)
88
89# Linker flags
90ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
91  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs clp`
92else
93  ifeq ($(COIN_CXX_IS_CL), TRUE)
94    LIBS = /link /libpath:`$(CYGPATH_W) @abs_lib_dir@` libClp.lib @CLPLIB_LIBS_INSTALLED@
95  else
96    LIBS = -L@abs_lib_dir@ -lClp @CLPLIB_LIBS_INSTALLED@
97  endif
98endif
99
100# The following is necessary under cygwin, if native compilers are used
101CYGPATH_W = @CYGPATH_W@
102
103# Here we list all possible generated objects or executables to delete them
104CLEANFILES = \
105        addBits.@OBJEXT@ addBits@EXEEXT@ \
106        addColumns.@OBJEXT@ addColumns@EXEEXT@ \
107        addRows.@OBJEXT@ addRows@EXEEXT@ \
108        decompose.@OBJEXT@ decompose@EXEEXT@ \
109        defaults.@OBJEXT@ defaults@EXEEXT@ \
110        driver2.@OBJEXT@ driver2@EXEEXT@ \
111        driver.@OBJEXT@ driver@EXEEXT@ \
112        driverC.@OBJEXT@ driverC@EXEEXT@ \
113        dualCuts.@OBJEXT@ dualCuts@EXEEXT@ \
114        ekk.@OBJEXT@ ekk@EXEEXT@ \
115        ekk_interface.@OBJEXT@ ekk_interface@EXEEXT@ \
116        hello.@OBJEXT@ hello@EXEEXT@ \
117        makeDual.@OBJEXT@ makeDual@EXEEXT@ \
118        minimum.@OBJEXT@ minimum@EXEEXT@ \
119        network.@OBJEXT@ network@EXEEXT@ \
120        piece.@OBJEXT@ piece@EXEEXT@ \
121        rowColumn.@OBJEXT@ rowColumn@EXEEXT@ \
122        sprint2.@OBJEXT@ sprint2@EXEEXT@ \
123        sprint.@OBJEXT@ sprint@EXEEXT@ \
124        testBarrier.@OBJEXT@ testBarrier@EXEEXT@ \
125        testBasis.@OBJEXT@ testBasis@EXEEXT@ \
126        testGub2.@OBJEXT@ testGub2@EXEEXT@ \
127        testGub.@OBJEXT@ testGub@EXEEXT@ \
128        testQP.@OBJEXT@ testQP@EXEEXT@ \
129        useVolume.@OBJEXT@ useVolume@EXEEXT@
130
131all: $(EXE)
132
133.SUFFIXES: .cpp .c .o .obj
134
135$(EXE): $(OBJS)
136        bla=;\
137        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
138        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
139
140clean:
141        rm -rf $(CLEANFILES)
142
143.cpp.o:
144        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
145
146
147.cpp.obj:
148        $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
149
150.c.o:
151        $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
152
153
154.c.obj:
155        $(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.