16 |
|
#---------------------------------------------- |
17 |
|
CXX=CC |
18 |
|
CXXDebugFlag=-g |
19 |
+ |
CXXO2Flag=-O2 |
20 |
+ |
CXXOptimised=$(CXXO2Flag) |
21 |
+ |
FCO2Flag=-O2 |
22 |
+ |
FCOptimised=$(FCO2Flag) |
23 |
|
FCDebugFlag=-g |
24 |
+ |
FC:=f77 |
25 |
+ |
|
26 |
+ |
# java |
27 |
+ |
JAVAC:=javac |
28 |
+ |
JAVACG:=javac_g |
29 |
+ |
JAVAC_=$(JAVAC) |
30 |
+ |
JAVAC_o=$(JAVAC) -O |
31 |
+ |
JAVAC_d=$(JAVAC) -g |
32 |
+ |
JAVAC_g=$(JAVACG) -O |
33 |
+ |
JAVAC_gd=$(JAVACG) -g |
34 |
|
|
35 |
|
ArchiveSuffix = a |
36 |
|
ArchiveTool = ar -rc $@ $^ |
37 |
|
ArchiveCCTool = $(ArchiveTool) |
38 |
+ |
DebugArchiveCCTool = $(ArchiveTool) |
39 |
+ |
SCClinkCmd=$(CXX) $(CXXFLAGS) $(CXXOptimised) $(LDFLAGS) $< -o $@ |
40 |
+ |
SCClinkCmd_d=$(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ |
41 |
+ |
CClinkCmd=$(SCClinkCmd) $(LDLIBS) |
42 |
+ |
CClinkCmdDebug=$(SCClinkCmd_d) $(LDLIBS_D) |
43 |
+ |
CClinkCmdDebugLocal=$(SCClinkCmd_d) $(LDLIBS_D_L) |
44 |
+ |
CClinkCmdInsure=$(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_Insure) |
45 |
|
|
46 |
|
SharedCCObjectFlags = -PIC |
47 |
|
SharedFCObjectFlags = -PIC |
48 |
|
SharedSuffix =so |
49 |
|
SharedCCTool = @echo No Shared Library support |
50 |
+ |
DebugSharedCCTool = $(SharedCCTool) |
51 |
+ |
InsureSharedCCTool = $(DebugSharedCCTool) |
52 |
+ |
DependencyCCTool = $(CXX) -M $(CPPFLAGS) $(DependIncludes) $^ > $@ |
53 |
+ |
PreProcessorCCTool = $(CXX) -P $(CPPFLAGS) $^ |
54 |
|
|
55 |
|
#---------------------------------------------- |
56 |
|
# Sun 4.2 CC |
57 |
|
#---------------------------------------------- |
58 |
|
ifeq ($(CCcompiler),Sun-CC-4.2) |
59 |
< |
CXXFLAGS+=-ptr$(template_dir) -features=rtti |
60 |
< |
#template_dir=$(shell echo $@ ) |
61 |
< |
template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*.o/tmpl/' -e 's/.*.a/tmpl/' -e 's/.*.exe/tmpl/') |
62 |
< |
ArchiveCCTool = CC -xar -o $@ $^ -ptr$(template_dir) |
63 |
< |
SharedCCTool = CC -G -o $@ $^ -ptr$(template_dir) |
64 |
< |
DependencyCCTool = CC -xM1 $(CPPFLAGS) $^ > $@ |
59 |
> |
CXX=eval `scram runtime -sh`; CC |
60 |
> |
templatedblib=-ptr$(template_dir) -ptr$(RELEASETOP)/$(workdir)/$(template_dir) |
61 |
> |
templatedoblib=-ptrtmpl_o -ptr$(RELEASETOP)/$(workdir)/tmpl_o |
62 |
> |
templatedshlib=-ptr$(templatesh_dir) -ptr$(RELEASETOP)/$(workdir)/$(templatesh_dir) |
63 |
> |
templateddshlib=-ptr$(templateshd_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshd_dir) |
64 |
> |
templatedinsureshlib=-ptr$(templateshi_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshi_dir) |
65 |
> |
templatedbin=-ptr$(RELEASETOP)/$(workdir)/$(template_dir) |
66 |
> |
templatedbo=-ptr$(template_dir) |
67 |
> |
SCClinkCmd+=$(templatedbin) |
68 |
> |
SCClinkCmd_d+=$(templatedbin) |
69 |
> |
CXXFLAGS+=$(templatedbo) |
70 |
> |
template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*\.o/tmpl/' -e 's/.*\.a/tmpl/' -e 's/.*\.exe/tmpl/') |
71 |
> |
templatesh_dir=tmpl_pic |
72 |
> |
templateshd_dir=tmpl_picd |
73 |
> |
templateshi_dir=tmpl_picInsure |
74 |
> |
ArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedoblib) |
75 |
> |
DebugArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedblib) |
76 |
> |
SharedCCTool = $(CXX) -G -o $@ $^ $(templatedshlib) |
77 |
> |
DebugSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templateddshlib) |
78 |
> |
InsureSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templatedinsureshlib) |
79 |
> |
DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $(DependIncludes) $^ > $@ |
80 |
> |
ifdef defaultcompilerlib$(DependIncludes) |
81 |
> |
PRIORITY_LIBDIR s+=/opt/SUNWspro/SC4.2/lib |
82 |
> |
endif |
83 |
|
ifdef f77 |
84 |
|
extralib+=M77 F77 sunmath m |
85 |
|
endif |
86 |
+ |
ifdef MultiThreaded |
87 |
+ |
CXXFLAGS+=-mt |
88 |
+ |
endif |
89 |
|
endif |
90 |
|
|
91 |
|
#---------------------------------------------- |
96 |
|
SharedCCObjectFlags = +Z |
97 |
|
SharedSuffix=sl |
98 |
|
SharedCCTool=aCC -b $^ -o $@ |
99 |
+ |
DebugSharedCCTool=aCC $(CXXDebugFlag) -b $^ -o $@ |
100 |
|
ifdef f77 |
101 |
|
LIBDIR+=/opt/fortran/lib |
102 |
|
extralib+=cl isamstub U77 /usr/lib/libdld.sl |
110 |
|
CXX=c++ |
111 |
|
SharedCCObjectFlags = -fPIC |
112 |
|
SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@ |
113 |
+ |
DebugSharedCCTool = gcc $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@ |
114 |
|
ifdef f77 |
115 |
|
extralib+=f2c m |
116 |
|
endif |
120 |
|
# egcs Linux |
121 |
|
#---------------------------------------------- |
122 |
|
ifeq ($(CCcompiler),egcs) |
123 |
+ |
CXX=eval `scram runtime -sh`; c++ |
124 |
+ |
SharedCCObjectFlags = -fPIC |
125 |
+ |
SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@ |
126 |
+ |
DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@ |
127 |
+ |
ifdef f77 |
128 |
+ |
extralib+=g2c m |
129 |
+ |
endif |
130 |
+ |
endif |
131 |
+ |
|
132 |
+ |
#---------------------------------------------- |
133 |
+ |
# gcc2.95 Linux |
134 |
+ |
#---------------------------------------------- |
135 |
+ |
ifeq ($(CCcompiler),gcc2.95) |
136 |
|
CXX=c++ |
137 |
|
SharedCCObjectFlags = -fPIC |
138 |
|
SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@ |
139 |
+ |
DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@ |
140 |
|
ifdef f77 |
141 |
|
extralib+=g2c m |
142 |
|
endif |
143 |
|
endif |
144 |
+ |
|
145 |
+ |
#---------------------------------------------- |
146 |
+ |
# GNU g77 Fortran compiler |
147 |
+ |
#---------------------------------------------- |
148 |
+ |
ifeq ($(F77compiler),g77) |
149 |
+ |
SharedFCObjectFlags = -fPIC |
150 |
+ |
FC:=g77 |
151 |
+ |
endif |
152 |
+ |
|
153 |
+ |
#---------------------------------------------- |
154 |
+ |
# HP-UX Fortran compiler fort77 |
155 |
+ |
#---------------------------------------------- |
156 |
+ |
ifeq ($(F77compiler),fort77) |
157 |
+ |
FC:=fort77 |
158 |
+ |
SharedFCObjectFlags = +Z |
159 |
+ |
endif |
160 |
+ |
|
161 |
+ |
#----------------------------------------------- |
162 |
+ |
# Insure++ |
163 |
+ |
#----------------------------------------------- |
164 |
+ |
Insure:=insure |
165 |
+ |
.psrc : |
166 |
+ |
if [ -f .psrc ]; then \ |
167 |
+ |
rm .psrc; \ |
168 |
+ |
fi; |
169 |
+ |
echo insure++.compiler_cpp $(CXX) >> .psrc |
170 |
+ |
echo insure++.temp_directory /tmp >> .psrc |
171 |
+ |
echo insure++.compiler_default cpp >> .psrc |
172 |
+ |
echo insure++.summarize leaks >> .psrc |
173 |
+ |
|
174 |
+ |
#----------------------------------------------- |
175 |
+ |
# Macabe |
176 |
+ |
#----------------------------------------------- |
177 |
+ |
ifdef MCCABE_EXTENSIONS |
178 |
+ |
include mccabe.mk |
179 |
+ |
endif |