ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.19
Committed: Fri Sep 24 16:37:15 1999 UTC (25 years, 7 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_37, V0_9_36
Changes since 1.14.2.18: +1 -1 lines
Log Message:
Use _o for optimised libs - no longer any bareword types as this causes tmpl problems

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.1 DependencyCCTool = $(CXX) -M $(CPPFLAGS) $^ > $@
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.10 DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $^ > $@
71 williamc 1.4 ifdef f77
72     extralib+=M77 F77 sunmath m
73     endif
74 williamc 1.14.2.9 ifdef MultiThreaded
75 williamc 1.14.2.8 CXXFLAGS+=-mt
76     endif
77 williamc 1.1 endif
78    
79     #----------------------------------------------
80     # aCC HP-UX
81     #----------------------------------------------
82     ifeq ($(CCcompiler),aCC)
83     CXX=aCC
84     SharedCCObjectFlags = +Z
85     SharedSuffix=sl
86     SharedCCTool=aCC -b $^ -o $@
87 williamc 1.14.2.13 DebugSharedCCTool=aCC $(CXXDebugFlag) -b $^ -o $@
88 williamc 1.4 ifdef f77
89     LIBDIR+=/opt/fortran/lib
90     extralib+=cl isamstub U77 /usr/lib/libdld.sl
91     endif
92 williamc 1.1 endif
93    
94     #----------------------------------------------
95     # gcc Linux
96     #----------------------------------------------
97     ifeq ($(CCcompiler),gcc)
98     CXX=c++
99     SharedCCObjectFlags = -fPIC
100     SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@
101 williamc 1.14.2.13 DebugSharedCCTool = gcc $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
102 williamc 1.4 ifdef f77
103     extralib+=f2c m
104     endif
105 williamc 1.1 endif
106    
107     #----------------------------------------------
108     # egcs Linux
109     #----------------------------------------------
110     ifeq ($(CCcompiler),egcs)
111     CXX=c++
112     SharedCCObjectFlags = -fPIC
113     SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
114 williamc 1.14.2.13 DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
115 williamc 1.4 ifdef f77
116     extralib+=g2c m
117     endif
118 williamc 1.7 endif
119    
120     #----------------------------------------------
121     # GNU g77 Fortran compiler
122     #----------------------------------------------
123     ifeq ($(F77compiler),g77)
124     FC:=g77
125 williamc 1.1 endif
126 williamc 1.8
127 williamc 1.14.2.10 #----------------------------------------------
128     # HP-UX Fortran compiler fort77
129     #----------------------------------------------
130     ifeq ($(F77compiler),fort77)
131     FC:=fort77
132     SharedFCObjectFlags = +Z
133     endif
134 williamc 1.8
135     #-----------------------------------------------
136     # Insure++
137     #-----------------------------------------------
138     Insure:=insure
139 williamc 1.9 .psrc :
140 williamc 1.14.2.17 @if [ -f .psrc ]; then \
141     rm .psrc \
142     fi
143 williamc 1.9 echo insure++.compiler_cpp $(CXX) >> .psrc
144     echo insure++.temp_directory /tmp >> .psrc
145     echo insure++.compiler_default cpp >> .psrc
146     echo insure++.summarize leaks >> .psrc
147 williamc 1.14.2.5
148     #-----------------------------------------------
149     # Macabe
150     #-----------------------------------------------
151     ifdef MCCABE_EXTENSIONS
152     include mccabe.mk
153     endif