source: trunk/Samples/Makefile.qmip @ 12

Last change on this file since 12 was 12, checked in by forrest, 15 years ago

MIQP example

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1OptLevel := -g
2
3# The location of the customized Makefiles
4CoinDir := ../..
5export MakefileDir := $(CoinDir)/Makefiles
6include ${MakefileDir}/Makefile.coin
7include ${MakefileDir}/Makefile.location
8
9IncDir :=
10IncDir += ${CoinIncDir}
11IncDir += ${ClpIncDir}
12IncDir += ${zlibIncDir}
13IncDir += ${bzlibIncDir}
14
15LibDir :=
16LibDir += ${CoinLibDir}
17LibDir += ${ClpLibDir}
18LibDir += ${zlibLibDir}
19LibDir += ${bzlibLibDir}
20
21LibName :=
22LibName += ${CbcLibName}
23LibName += ${CglLibName}
24LibName += ${OsiClpLibName}
25LibName += ${OsiLibName}
26LibName += ${ClpLibName}
27LibName += ${CoinLibName}
28LibName += ${zlibLibName}
29LibName += ${bzlibLibName}
30LibName += ${readlineLibName}
31
32Define :=
33Define += ${ClpDefine}
34Define += ${CoinDefine}
35Define += ${zlibDefine}
36Define += ${bzlibDefine}
37#lapack
38IncDir +=  $(lapackIncDir)
39LibDir +=  $(lapackLibDir)
40LibName += $(lapackLibName)
41Define +=  $(lapackDefine)
42
43CXXFLAGS += $(OPTFLAG)
44CXXFLAGS += -DCOIN_USE_CLP
45###############################################################################
46
47space:= $(empty) $(empty)
48OptVersion := $(subst $(space),_,$(OptLevel))
49
50TARGETDIR := $(UNAME)$(OptVersion)
51DEPDIR := dep
52
53VPATH := . : include : Junk : ${TARGETDIR} : ${DEPDIR}
54
55#########################################################################
56
57CXXFLAGS += $(addprefix -I,${IncDir})
58CXXFLAGS += $(addprefix -D,${Define})
59
60LIBDIRS := ${LibDir}
61LIBS    := ${LibName}
62
63LDFLAGS := $(addprefix -L,$(LIBDIRS))
64LDFLAGS += $(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))
65LDFLAGS += $(patsubst lib%,-l%,$(basename $(LIBS)))
66
67ifeq ($(findstring Linux,${UNAME}),Linux)
68        CXXFLAGS +=     -DREADLINE
69endif
70CXXFLAGS  += -I.
71#CXXFLAGS += -DCHECK_CUT_COUNTS
72#LDFLAGS += -lefence
73###############################################################################
74
75TESTSRC := qmip.cpp
76TESTSRC += CbcBranchUser.cpp
77TESTSRC += CbcHeuristicUser.cpp
78TESTSRC += CbcCompareUser.cpp
79TESTSRC += ClpQuadInterface.cpp
80TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.cpp=.o))
81TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.cpp=.d))
82
83###############################################################################
84# This one must be right before the rules
85
86include ${MakefileDir}/Makefile.rules
87
88###############################################################################
89
90.DELETE_ON_ERROR:
91
92.PHONY: default clean doc unitTest libdepend
93
94default: testit
95
96###############################################################################
97
98
99testit : libdepend $(TESTOBJ)
100        @rm -rf Junk
101        @echo ""
102        @echo Creating testit
103        @rm -f $@
104        $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJ) $(LDFLAGS) $(SYSLD) -lm
105#       ${CP} $@ ..
106
107###############################################################################
108
109-include $(TESTDEP)
Note: See TracBrowser for help on using the repository browser.