source: trunk/Samples/Makefile @ 343

Last change on this file since 343 was 343, checked in by forrest, 16 years ago

dualRanging

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 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}
46
47LibName :=
48LibName += ${ClpLibName}
49LibName += ${CoinLibName}
50LibName += ${zlibLibName}
51LibName += ${bzlibLibName}
52LibName += ${readlineLibName}
53LibName += ${lapackLibName}
54#LibName += ${taucsLibName}
55
56Define :=
57Define += ${ClpDefine}
58Define += ${CoinDefine}
59Define += ${zlibDefine}
60Define += ${bzlibDefine}
61Define += ${readlineDefine}
62Define += ${lapackDefine}
63Define += ${taucsDefine}
64
65CXXFLAGS += $(OPTFLAG)
66
67###############################################################################
68
69space:= $(empty) $(empty)
70OptVersion := $(subst $(space),_,$(OptLevel))
71
72TARGETDIR := $(UNAME)$(OptVersion)
73DEPDIR := dep
74
75VPATH := . : include : Junk : ${TARGETDIR} : ${DEPDIR}
76
77#########################################################################
78
79CXXFLAGS += $(addprefix -I,${IncDir})
80CXXFLAGS += $(addprefix -D,${Define})
81
82LIBDIRS := ${LibDir}
83LIBS    := ${LibName}
84
85LDFLAGS := $(addprefix -L,$(LIBDIRS))
86LDFLAGS += $(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))
87LDFLAGS += $(patsubst lib%,-l%,$(basename $(LIBS)))
88
89#LDFLAGS += -lefence
90#LDFLAGS += -Wl,-static
91#LDFLAGS += -lwsmpP4 -lpthread
92OSL_LIB_DIR = /home/forrest/osl/lib
93LDFLAGS += -L $(OSL_LIB_DIR) -Wl,-rpath,$(OSL_LIB_DIR) -losl-O-nolic-native-32
94#LDFLAGS += -pg
95###############################################################################
96
97ifeq ($(DRIVER),driverC)
98    SRCEXT := c
99else
100    SRCEXT := cpp
101endif
102
103TESTSRC := $(DRIVER).$(SRCEXT)
104TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.$(SRCEXT)=.o))
105TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.$(SRCEXT)=.d))
106
107###############################################################################
108# This one must be right before the rules
109
110include ${MakefileDir}/Makefile.rules
111
112###############################################################################
113
114.DELETE_ON_ERROR:
115
116.PHONY: default clean doc unitTest libdepend
117
118default: testit
119
120###############################################################################
121
122
123testit : libdepend $(TESTOBJ)
124        @rm -rf Junk
125        @echo ""
126        @echo Creating testit
127        @rm -f $@
128        $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJ) $(LDFLAGS) $(SYSLD) -lm
129
130###############################################################################
131
132-include $(TESTDEP)
Note: See TracBrowser for help on using the repository browser.