ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.22
Committed: Tue Oct 5 14:51:34 1999 UTC (25 years, 7 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_10_3, V0_10_2, V0_10_1, V0_10_0, V0_10_0beta, V0_9_42, V0_9_41, V0_9_40, V0_9_39
Changes since 1.14.2.21: +4 -4 lines
Log Message:
Add :: rule for dependencies.mk - gmake on linux dosnt seem to use single rules properly

File Contents

# User Rev Content
1 williamc 1.1 # Compiler Specific Details
2     #
3     #----------------------------------------------
4     # Some standard variables
5     #----------------------------------------------
6     # arlibname : name of library archive etc
7     # shlibname : name of shared object
8     # arlibobjs : name of objects destined for a library archive
9     # sharedlibobjs : name of objects detined for a shared object file
10     #
11     #
12     #
13     #----------------------------------------------
14     # Standard Defaults
15     # Override as necessary for specific compilers
16     #----------------------------------------------
17     CXX=CC
18     CXXDebugFlag=-g
19 williamc 1.14.2.12 CXXO2Flag=-O2
20     CXXOptimised=$(CXXO2Flag)
21     FCO2Flag=-O2
22     FCOptimised=$(FCO2Flag)
23 williamc 1.1 FCDebugFlag=-g
24 williamc 1.7 FC:=f77
25 williamc 1.1
26     ArchiveSuffix = a
27     ArchiveTool = ar -rc $@ $^
28     ArchiveCCTool = $(ArchiveTool)
29 williamc 1.14.2.18 DebugArchiveCCTool = $(ArchiveTool)
30 williamc 1.14.2.12 SCClinkCmd=$(CXX) $(CXXFLAGS) $(CXXOptimised) $(LDFLAGS) $< -o $@
31 williamc 1.14 SCClinkCmd_d=$(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@
32 williamc 1.11 CClinkCmd=$(SCClinkCmd) $(LDLIBS)
33 williamc 1.14 CClinkCmdDebug=$(SCClinkCmd_d) $(LDLIBS_D)
34 williamc 1.14.2.14 CClinkCmdDebugLocal=$(SCClinkCmd_d) $(LDLIBS_D_L)
35 williamc 1.14.2.16 CClinkCmdInsure=$(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_Insure)
36 williamc 1.1
37     SharedCCObjectFlags = -PIC
38     SharedFCObjectFlags = -PIC
39     SharedSuffix =so
40     SharedCCTool = @echo No Shared Library support
41 williamc 1.14.2.13 DebugSharedCCTool = $(SharedCCTool)
42     InsureSharedCCTool = $(DebugSharedCCTool)
43 williamc 1.14.2.22 DependencyCCTool = $(CXX) -M $(CPPFLAGS) $(DependIncludes) $^ > $@
44 williamc 1.14.2.7 PreProcessorCCTool = $(CXX) -P $(CPPFLAGS) $^
45 williamc 1.1
46     #----------------------------------------------
47     # Sun 4.2 CC
48     #----------------------------------------------
49     ifeq ($(CCcompiler),Sun-CC-4.2)
50 williamc 1.10 CXX=CC
51 williamc 1.14.2.3 templatedblib=-ptr$(template_dir) -ptr$(RELEASETOP)/$(workdir)/$(template_dir)
52 williamc 1.14.2.19 templatedoblib=-ptrtmpl_o -ptr$(RELEASETOP)/$(workdir)/tmpl_o
53 williamc 1.14.2.11 templatedshlib=-ptr$(templatesh_dir) -ptr$(RELEASETOP)/$(workdir)/$(templatesh_dir)
54 williamc 1.14.2.13 templateddshlib=-ptr$(templateshd_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshd_dir)
55     templatedinsureshlib=-ptr$(templateshi_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshi_dir)
56 williamc 1.14.2.4 templatedbin=-ptr$(RELEASETOP)/$(workdir)/$(template_dir)
57 williamc 1.14.2.3 templatedbo=-ptr$(template_dir)
58 williamc 1.14.2.4 SCClinkCmd+=$(templatedbin)
59     SCClinkCmd_d+=$(templatedbin)
60 williamc 1.14.2.3 CXXFLAGS+=$(templatedbo)
61 williamc 1.14.2.18 template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*\.o/tmpl/' -e 's/.*\.a/tmpl/' -e 's/.*\.exe/tmpl/')
62 williamc 1.14.2.11 templatesh_dir=tmpl_pic
63 williamc 1.14.2.13 templateshd_dir=tmpl_picd
64 williamc 1.14.2.15 templateshi_dir=tmpl_picInsure
65 williamc 1.14.2.18 ArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedoblib)
66     DebugArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedblib)
67 williamc 1.14.2.11 SharedCCTool = $(CXX) -G -o $@ $^ $(templatedshlib)
68 williamc 1.14.2.13 DebugSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templateddshlib)
69     InsureSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templatedinsureshlib)
70 williamc 1.14.2.22 DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $(DependIncludes) $^ > $@
71     ifdef defaultcompilerlib$(DependIncludes)
72     PRIORITY_LIBDIR s+=/opt/SUNWspro/SC4.2/lib
73 williamc 1.14.2.20 endif
74 williamc 1.4 ifdef f77
75     extralib+=M77 F77 sunmath m
76     endif
77 williamc 1.14.2.9 ifdef MultiThreaded
78 williamc 1.14.2.8 CXXFLAGS+=-mt
79     endif
80 williamc 1.1 endif
81    
82     #----------------------------------------------
83     # aCC HP-UX
84     #----------------------------------------------
85     ifeq ($(CCcompiler),aCC)
86     CXX=aCC
87     SharedCCObjectFlags = +Z
88     SharedSuffix=sl
89     SharedCCTool=aCC -b $^ -o $@
90 williamc 1.14.2.13 DebugSharedCCTool=aCC $(CXXDebugFlag) -b $^ -o $@
91 williamc 1.4 ifdef f77
92     LIBDIR+=/opt/fortran/lib
93     extralib+=cl isamstub U77 /usr/lib/libdld.sl
94     endif
95 williamc 1.1 endif
96    
97     #----------------------------------------------
98     # gcc Linux
99     #----------------------------------------------
100     ifeq ($(CCcompiler),gcc)
101     CXX=c++
102     SharedCCObjectFlags = -fPIC
103     SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@
104 williamc 1.14.2.13 DebugSharedCCTool = gcc $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
105 williamc 1.4 ifdef f77
106     extralib+=f2c m
107     endif
108 williamc 1.1 endif
109    
110     #----------------------------------------------
111     # egcs Linux
112     #----------------------------------------------
113     ifeq ($(CCcompiler),egcs)
114     CXX=c++
115     SharedCCObjectFlags = -fPIC
116     SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
117 williamc 1.14.2.13 DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
118 williamc 1.4 ifdef f77
119     extralib+=g2c m
120     endif
121 williamc 1.7 endif
122    
123     #----------------------------------------------
124 williamc 1.14.2.21 # gcc2.95 Linux
125     #----------------------------------------------
126     ifeq ($(CCcompiler),gcc2.95)
127     CXX=c++
128     SharedCCObjectFlags = -fPIC
129     SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
130     DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
131     ifdef f77
132     extralib+=g2c m
133     endif
134     endif
135    
136     #----------------------------------------------
137 williamc 1.7 # GNU g77 Fortran compiler
138     #----------------------------------------------
139     ifeq ($(F77compiler),g77)
140 williamc 1.14.2.21 SharedFCObjectFlags = -fPIC
141 williamc 1.7 FC:=g77
142 williamc 1.1 endif
143 williamc 1.8
144 williamc 1.14.2.10 #----------------------------------------------
145     # HP-UX Fortran compiler fort77
146     #----------------------------------------------
147     ifeq ($(F77compiler),fort77)
148     FC:=fort77
149     SharedFCObjectFlags = +Z
150     endif
151 williamc 1.8
152     #-----------------------------------------------
153     # Insure++
154     #-----------------------------------------------
155     Insure:=insure
156 williamc 1.9 .psrc :
157 williamc 1.14.2.17 @if [ -f .psrc ]; then \
158     rm .psrc \
159     fi
160 williamc 1.9 echo insure++.compiler_cpp $(CXX) >> .psrc
161     echo insure++.temp_directory /tmp >> .psrc
162     echo insure++.compiler_default cpp >> .psrc
163     echo insure++.summarize leaks >> .psrc
164 williamc 1.14.2.5
165     #-----------------------------------------------
166     # Macabe
167     #-----------------------------------------------
168     ifdef MCCABE_EXTENSIONS
169     include mccabe.mk
170     endif