# Copyright (C) 2003, 2006 International Business Machines and others. # All Rights Reserved. # This file is distributed under the Common Public License. # $Id: Makefile.in 759 2006-07-07 03:07:08Z andreasw $ ########################################################################## # You can modify this example makefile to fit for your own program. # # Usually, you only need to change the five CHANGEME entries below. # ########################################################################## # CHANGEME: This should be the name of your executable EXE = OSTestCode # CHANGEME: Here is the name of all object files corresponding to the source # code that you wrote in order to define the problem statement OBJS = OSTestCode.o # CHANGEME: Additional libraries ADDLIBS = # CHANGEME: Additional flags for compilation (e.g., include flags) ADDINCFLAGS = -I${prefix}/include # CHANGEME: SRCDIR and VPATH should be the path to the source code. It is assumed # that the lib directory is in prefix/lib and the header files are in # prefix/include SRCDIR = . prefix = ../.. # # ########################################################################## # Usually, you don't have to change anything below. Note that if you # # change certain compiler options, you might have to recompile OS. # ########################################################################## # C++ Compiler command CXX = g++ DEFS = -DHAVE_CONFIG_H # C++ Compiler options CXXFLAGS = -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas $(DEFS) DARWIN=$(findstring darwin, darwin8.11.1) # additional C++ Compiler options for linking CXXLINKFLAGS = ifeq ($(DARWIN),darwin) CXXLINKFLAGS += -bind_at_load endif # Directory with header files OSINCDIR = ${prefix}/include/coin # Directory with the libraries INSTALLIBDIR = ${exec_prefix}/lib exec_prefix = ${prefix} # Libraries necessary to link with OS # Libraries necessary to link LIBS = -L$(INSTALLIBDIR) -lOS LIBS += -L$(INSTALLIBDIR) -lbonmin #ADDITIONAL IPOPT LIBS ADDIPOPTLIBS = `cat $(prefix)/share/doc/coin/Ipopt/ipopt_addlibs_cpp.txt` LIBS += -L$(INSTALLIBDIR) -lipopt $(ADDIPOPTLIBS) LIBS += -lm # #ADD ALL THE LIBS # LIBS += -L$(INSTALLIBDIR) -lOsiCbc LIBS += -L$(INSTALLIBDIR) -lOsiSym LIBS += -L$(INSTALLIBDIR) -lOsiClp LIBS += -L$(INSTALLIBDIR) -lOsiDylp LIBS += -L$(INSTALLIBDIR) -lOsiVol #LIBS += -L$(INSTALLIBDIR) -lOsiGlpk LIBS += -L$(INSTALLIBDIR) -lCbc LIBS += -L$(INSTALLIBDIR) -lSym LIBS += -L$(INSTALLIBDIR) -lCgl LIBS += -L$(INSTALLIBDIR) -lOsi LIBS += -L$(INSTALLIBDIR) -lClp LIBS += -L$(INSTALLIBDIR) -lDylp LIBS += -L$(INSTALLIBDIR) -lVol # LIBS += -L$(INSTALLIBDIR) -lCoinUtils LIBS += #DONE ADDING LIBS # Necessary Include dirs (we use the CYGPATH_W variables to allow # compilation with Windows compilers) INCL = -I`$(CYGPATH_W) $(OSINCDIR)` $(ADDINCFLAGS) # The following is necessary under cygwin, if native compilers are used CYGPATH_W = echo all: $(EXE) .SUFFIXES: .cpp .c .o .obj $(EXE): $(OBJS) bla=;\ for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \ $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(ADDLIBS) $(LIBS) clean: rm -rf $(EXE) $(OBJS) .cpp.o: $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$< .cpp.obj: $(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`