source: trunk/Samples/Makefile @ 607

Last change on this file since 607 was 607, checked in by forrest, 14 years ago

test for vol

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
RevLine 
[225]1OptLevel := -g
2
[272]3DRIVER ?= driver
4
5# Possible choices for driver:
6#   decompose
7#   defaults
8#   driver
9#   driver2
10#   dualCuts
11#   ekk
12#   ekk_interface
13#   minimum
14#   network
15#   piece
16#   sprint
17#   sprint2
18#   testBarrier
19#   testBasis
20#   useVolume
21
22
[225]23# The location of the customized Makefiles
24CoinDir := ../../
25export MakefileDir := $(CoinDir)/Makefiles
26include ${MakefileDir}/Makefile.coin
27include ${MakefileDir}/Makefile.location
28
29IncDir :=
30IncDir += ${ClpIncDir}
31IncDir += ${CoinIncDir}
32IncDir += ${zlibIncDir}
33IncDir += ${bzlibIncDir}
[272]34IncDir += ${readlineIncDir}
[270]35IncDir += ${lapackIncDir}
[343]36IncDir += ${taucsIncDir}
[225]37
38LibDir :=
39LibDir += ${ClpLibDir}
40LibDir += ${CoinLibDir}
41LibDir += ${zlibLibDir}
42LibDir += ${bzlibLibDir}
[272]43LibDir += ${readlineLibDir}
[270]44LibDir += ${lapackLibDir}
[343]45#LibDir += ${taucsLibDir}
[574]46LibDir += $(GlpkLibDir)
[225]47
48LibName :=
49LibName += ${ClpLibName}
50LibName += ${CoinLibName}
51LibName += ${zlibLibName}
52LibName += ${bzlibLibName}
[272]53LibName += ${readlineLibName}
[270]54LibName += ${lapackLibName}
[343]55#LibName += ${taucsLibName}
[574]56LibName += $(GlpkLibName)
[607]57ifeq ($(VolDefine),COIN_HAS_VOL)
58LibName += $(VolLibName)
59endif
[225]60
61Define :=
62Define += ${ClpDefine}
63Define += ${CoinDefine}
64Define += ${zlibDefine}
65Define += ${bzlibDefine}
[272]66Define += ${readlineDefine}
[270]67Define += ${lapackDefine}
[343]68Define += ${taucsDefine}
[225]69
70CXXFLAGS += $(OPTFLAG)
71
72###############################################################################
73
74space:= $(empty) $(empty)
75OptVersion := $(subst $(space),_,$(OptLevel))
76
77TARGETDIR := $(UNAME)$(OptVersion)
78DEPDIR := dep
79
80VPATH := . : include : Junk : ${TARGETDIR} : ${DEPDIR}
81
82#########################################################################
83
84CXXFLAGS += $(addprefix -I,${IncDir})
85CXXFLAGS += $(addprefix -D,${Define})
86
87LIBDIRS := ${LibDir}
88LIBS    := ${LibName}
89
90LDFLAGS := $(addprefix -L,$(LIBDIRS))
91LDFLAGS += $(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))
92LDFLAGS += $(patsubst lib%,-l%,$(basename $(LIBS)))
93
[288]94#LDFLAGS += -lefence
[343]95#LDFLAGS += -Wl,-static
[279]96#LDFLAGS += -lwsmpP4 -lpthread
[404]97#OSL_LIB_DIR = /home/forrest/osl/lib
98#LDFLAGS += -L $(OSL_LIB_DIR) -Wl,-rpath,$(OSL_LIB_DIR) -losl-O-nolic-native-32
[343]99#LDFLAGS += -pg
[225]100###############################################################################
101
[272]102ifeq ($(DRIVER),driverC)
103    SRCEXT := c
104else
105    SRCEXT := cpp
106endif
[225]107
[272]108TESTSRC := $(DRIVER).$(SRCEXT)
109TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.$(SRCEXT)=.o))
110TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.$(SRCEXT)=.d))
111
[225]112###############################################################################
113# This one must be right before the rules
114
115include ${MakefileDir}/Makefile.rules
116
117###############################################################################
118
119.DELETE_ON_ERROR:
120
121.PHONY: default clean doc unitTest libdepend
122
123default: testit
124
125###############################################################################
126
127
128testit : libdepend $(TESTOBJ)
129        @rm -rf Junk
130        @echo ""
131        @echo Creating testit
132        @rm -f $@
133        $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJ) $(LDFLAGS) $(SYSLD) -lm
134
135###############################################################################
136
137-include $(TESTDEP)
Note: See TracBrowser for help on using the repository browser.