ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
(Generate patch)

Comparing COMP/SCRAM/src/compilers.mk (file contents):
Revision 1.4 by williamc, Wed Mar 24 10:18:07 1999 UTC vs.
Revision 1.14.2.36 by williamc, Tue Aug 1 09:08:52 2000 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines