Changeset 1541 for trunk/Cbc/examples


Ignore:
Timestamp:
Nov 28, 2010 3:40:15 PM (8 years ago)
Author:
stefan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/examples/Makefile.in

    r1520 r1541  
    5050# C++ Compiler options
    5151CXXFLAGS = @CXXFLAGS@
    52 @COIN_HAS_SAMPLE_TRUE@CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
    53 @COIN_HAS_MIPLIB3_TRUE@CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA@\"
     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@\"
    5456
    5557# C Compiler options
     
    6062CXXLINKFLAGS = @RPATH_FLAGS@
    6163
    62 # Directory with COIN header files
    63 COININCDIR = @abs_include_dir@/coin
     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)
    6467
    65 # Directory with COIN libraries
    66 COINLIBDIR = @abs_lib_dir@
    67 
    68 # Libraries necessary to link with Cbc
    69 LIBS = -L$(COINLIBDIR) -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS@
    70 
    71 # Necessary Include dirs (we use the CYGPATH_W variables to allow
    72 # compilation with Windows compilers)
    73 # COININCDIR should come first, so that the include directory of the Cbc installation is checked first
    74 # for header files; this is necessary if the installed header files differ from their source header files (esp., XxxConfig.h)
    75 INCL = -I`$(CYGPATH_W) $(COININCDIR)` @COINDEPEND_CFLAGS@ @CLP_CFLAGS@ $(ADDINCFLAGS)
     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@
    7672
    7773# The following is necessary under cygwin, if native compilers are used
     
    112108        bla=;\
    113109        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
    114         $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(ADDLIBS) $(LIBS)
     110        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
    115111
    116112clean:
Note: See TracChangeset for help on using the changeset viewer.