source: trunk/Samples/Makefile.pdco @ 225

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

This should break everything

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 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}
14IncDir += ./
15
16LibDir :=
17LibDir += ${ClpLibDir}
18LibDir += ${CoinLibDir}
19LibDir += ${zlibLibDir}
20LibDir += ${bzlibLibDir}
21
22LibName :=
23LibName += ${ClpLibName}
24LibName += ${CoinLibName}
25LibName += ${zlibLibName}
26LibName += ${bzlibLibName}
27
28Define :=
29Define += ${ClpDefine}
30Define += ${CoinDefine}
31Define += ${zlibDefine}
32Define += ${bzlibDefine}
33
34CXXFLAGS += $(OPTFLAG)
35
36###############################################################################
37
38space:= $(empty) $(empty)
39OptVersion := $(subst $(space),_,$(OptLevel))
40
41TARGETDIR := $(UNAME)$(OptVersion)
42DEPDIR := dep
43
44VPATH := . : include : Junk : ${TARGETDIR} : ${DEPDIR}
45
46#########################################################################
47
48CXXFLAGS += $(addprefix -I,${IncDir})
49CXXFLAGS += $(addprefix -D,${Define})
50
51LIBDIRS := ${LibDir}
52LIBS    := ${LibName}
53
54LDFLAGS := $(addprefix -L,$(LIBDIRS))
55LDFLAGS += $(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))
56LDFLAGS += $(patsubst lib%,-l%,$(basename $(LIBS)))
57#LDFLAGS += -static
58#if DENSE and using given libraries
59LDFLAGS += -llapack -lblas -lg2c
60
61ifeq ($(findstring Linux,${UNAME}),Linux)
62        CXXFLAGS +=     -DREADLINE
63        LDFLAGS += -lhistory -lreadline -ltermcap
64endif
65#LDFLAGS += -lefence
66###############################################################################
67
68TESTSRC := pdco.cpp
69TESTSRC += myPdco.cpp
70TESTOBJ := $(addprefix $(TARGETDIR)/, $(TESTSRC:.cpp=.o))
71TESTDEP := $(addprefix $(DEPDIR)/, $(TESTSRC:.cpp=.d))
72
73###############################################################################
74# This one must be right before the rules
75
76include ${MakefileDir}/Makefile.rules
77
78###############################################################################
79
80.DELETE_ON_ERROR:
81
82.PHONY: default clean doc unitTest libdepend
83
84default: testit
85
86###############################################################################
87
88
89testit : libdepend $(TESTOBJ)
90        @rm -rf Junk
91        @echo ""
92        @echo Creating testit
93        @rm -f $@
94        $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJ) $(LDFLAGS) $(SYSLD) -lm
95#       ${CP} $@ ..
96
97###############################################################################
98
99-include $(TESTDEP)
Note: See TracBrowser for help on using the repository browser.