| 1 |
# Copyright (C) 2006 International Business Machines. |
| 2 |
# All Rights Reserved. |
| 3 |
# This file is distributed under the Eclipse Public License. |
| 4 |
# |
| 5 |
# Author: Andreas Waechter IBM 2006-03-14 |
| 6 |
|
| 7 |
# $Id: Makefile.in,v 1.1.2.1 2006/04/19 23:25:14 andreasw Exp $ |
| 8 |
|
| 9 |
########################################################################## |
| 10 |
# You can modify this example makefile to fit for your own program. # |
| 11 |
# Usually, you only need to change the five CHANGEME entries below. # |
| 12 |
########################################################################## |
| 13 |
|
| 14 |
# CHANGEME: This should be the name of your executable |
| 15 |
EXE = CppExample@EXEEXT@ |
| 16 |
|
| 17 |
# CHANGEME: Here is the name of all object files corresponding to the source |
| 18 |
# code that you wrote in order to define the problem statement |
| 19 |
OBJS = MyBonmin.@OBJEXT@ MyTMINLP.@OBJEXT@ |
| 20 |
|
| 21 |
# CHANGEME: Additional libraries |
| 22 |
ADDLIBS = |
| 23 |
|
| 24 |
# CHANGEME: Additional flags for compilation (e.g., include flags) |
| 25 |
ADDINCFLAGS = |
| 26 |
|
| 27 |
# CHANGEME: Directory to the sources for the (example) problem definition |
| 28 |
# files |
| 29 |
SRCDIR = @srcdir@ |
| 30 |
VPATH = @srcdir@ |
| 31 |
|
| 32 |
########################################################################## |
| 33 |
# Usually, you don't have to change anything below. Note that if you # |
| 34 |
# change certain compiler options, you might have to recompile Bonmin. # |
| 35 |
########################################################################## |
| 36 |
|
| 37 |
COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE |
| 38 |
COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE |
| 39 |
|
| 40 |
# C++ Compiler command |
| 41 |
CXX = @CXX@ |
| 42 |
|
| 43 |
# C++ Compiler options |
| 44 |
CXXFLAGS = @CXXFLAGS@ |
| 45 |
|
| 46 |
# additional C++ Compiler options for linking |
| 47 |
CXXLINKFLAGS = @RPATH_FLAGS@ |
| 48 |
|
| 49 |
# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers) |
| 50 |
ifeq ($(COIN_HAS_PKGCONFIG), TRUE) |
| 51 |
INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags bonmin` |
| 52 |
else |
| 53 |
INCL = @BONMINLIB_CFLAGS_INSTALLED@ |
| 54 |
endif |
| 55 |
INCL += $(ADDINCFLAGS) |
| 56 |
|
| 57 |
# Linker flags |
| 58 |
ifeq ($(COIN_HAS_PKGCONFIG), TRUE) |
| 59 |
LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs bonmin` |
| 60 |
else |
| 61 |
ifeq ($(COIN_CXX_IS_CL), TRUE) |
| 62 |
LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libbonmin.lib @BONMINLIB_LIBS_INSTALLED@ |
| 63 |
else |
| 64 |
LIBS = -L@abs_lib_dir@ -lbonmin @BONMINLIB_LIBS_INSTALLED@ |
| 65 |
endif |
| 66 |
endif |
| 67 |
|
| 68 |
# The following is necessary under cygwin, if native compilers are used |
| 69 |
CYGPATH_W = @CYGPATH_W@ |
| 70 |
|
| 71 |
all: $(EXE) |
| 72 |
|
| 73 |
.SUFFIXES: .cpp .c .o .obj |
| 74 |
|
| 75 |
$(EXE): $(OBJS) |
| 76 |
bla=;\ |
| 77 |
for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \ |
| 78 |
$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS) |
| 79 |
|
| 80 |
clean: |
| 81 |
rm -rf $(EXE) $(OBJS) |
| 82 |
|
| 83 |
.cpp.o: |
| 84 |
$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$< |
| 85 |
|
| 86 |
|
| 87 |
.cpp.obj: |
| 88 |
$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi` |