# Copyright (C) 2006 International Business Machines and others. # All Rights Reserved. # This file is distributed under the Common Public License. # $Id: Makefile.in 726 2006-04-17 04:16:00Z andreasw $ ########################################################################## # You can modify this example makefile to fit for your own program. # # Usually, you only need to change the five CHANGEME entries below. # ########################################################################## # To compile other examples, either changed the following line, or # add the argument DRIVER=problem_name to make DRIVER = mainmpi # CHANGEME: This should be the name of your executable EXE = $(DRIVER) # 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= mainmpi.o SYSTEM = x86-64_sles10_4.1 # Directory with COIN header files COININCDIR = /opt/coin-1.3.1/include/coin # Directory with COIN libraries COINLIBDIR = /opt/coin-1.3.1/lib COINLIBDIROSI = /opt/coin-1.3.1/Osi/lib # Directory with CPLEX CPLEXDIR= /opt/ILOG/CPLEX_Studio_AcademicResearch122/cplex # Directory with CPLEX header files CPLEXINCDIR = $(CPLEXDIR)/include/ilcplex # Directory with CPLEX libraries CPLEXLIBDIR =$(CPLEXDIR)/lib/$(SYSTEM)/static_pic/libcplex.a CPLEXBINDIR =$(CPLEXDIR)/bin/$(SYSTEM) # CHANGEME: Additional libraries ADDLIBS = # CHANGEME: Additional flags for compilation (e.g., include flags) ADDINCFLAGS = ########################################################################## # Usually, you don't have to change anything below. Note that if you # # change certain compiler options, you might have to recompile the # # package. # ########################################################################## # C++ Compiler command #CXX = g++ CXX=mpic++ # C++ Compiler options for g++ #CXXFLAGS = -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit #-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings #-Wconversion -Wno-unknown-pragmas -O -fPIC -fexceptions -DIL_STD # C++ Compiler options for mpic++ CXXFLAGS = -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -O -fPIC -fexceptions -DIL_STD # additional C++ Compiler options for linking CXXLINKFLAGS = -Wl,--rpath -Wl,$(COINLIBDIR) -Wl,$(CPLEXLIBDIR) # Libraries necessary to link with Clp LIBS = -L$(COINLIBDIR) -lCbcSolver -lCbc -lCgl -lOsiClp -lOsiCbc -lOsi -lClp -lCoinUtils -L$(COINLIBDIROSI) -lOsiCpx -L$(CPLEXBINDIR) -lcplex122 -lpthread \ -lm # Necessary Include dirs (we use the CYGPATH_W variables to allow # compilation with Windows compilers) INCL = -I`$(CYGPATH_W) $(COININCDIR) $(CPLEXINCDIR)` $(ADDINCFLAGS) # The following is necessary under cygwin, if native compilers are used CYGPATH_W = echo # Here we list all possible generated objects or executables to delete them CLEANFILES = 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 $(CLEANFILES) $(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` .c.o: $(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$< .c.obj: $(CC) $(CFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`