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
Line 
1OptLevel := -g
2
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
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}
34IncDir += ${readlineIncDir}
35IncDir += ${lapackIncDir}
36IncDir += ${taucsIncDir}
37
38LibDir :=
39LibDir += ${ClpLibDir}
40LibDir += ${CoinLibDir}
41LibDir += ${zlibLibDir}
42LibDir += ${bzlibLibDir}
43LibDir += ${readlineLibDir}
44LibDir += ${lapackLibDir}
45#LibDir += ${taucsLibDir}
46LibDir += $(GlpkLibDir)
47
48LibName :=
49LibName += ${ClpLibName}
50LibName += ${CoinLibName}
51LibName += ${zlibLibName}
52LibName += ${bzlibLibName}
53LibName += ${readlineLibName}
54LibName += ${lapackLibName}
55#LibName += ${taucsLibName}
56LibName += $(GlpkLibName)
57ifeq ($(VolDefine),COIN_HAS_VOL)
58LibName += $(VolLibName)
59endif
60
61Define :=
62Define += ${ClpDefine}
63Define += ${CoinDefine}
64Define += ${zlibDefine}
65Define += ${bzlibDefine}
66Define += ${readlineDefine}
67Define += ${lapackDefine}
68Define += ${taucsDefine}
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
94#LDFLAGS += -lefence
95#LDFLAGS += -Wl,-static
96#LDFLAGS += -lwsmpP4 -lpthread
97#OSL_LIB_DIR = /home/forrest/osl/lib
98#LDFLAGS += -L $(OSL_LIB_DIR) -Wl,-rpath,$(OSL_LIB_DIR) -losl-O-nolic-native-32
99#LDFLAGS += -pg
100###############################################################################
101
102ifeq ($(DRIVER),driverC)
103    SRCEXT := c
104else
105    SRCEXT := cpp
106endif
107
108TESTSRC := $(DRIVER).$(SRCEXT)
109TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.$(SRCEXT)=.o))
110TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.$(SRCEXT)=.d))
111
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.