ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.15
Committed: Tue Sep 21 08:30:08 1999 UTC (25 years, 7 months ago) by williamc
Branch: V0_9branch
Changes since 1.14.2.14: +1 -1 lines
Log Message:
Fix Insure Shared Libraries

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.12 SCClinkCmd=$(CXX) $(CXXFLAGS) $(CXXOptimised) $(LDFLAGS) $< -o $@
30 williamc 1.14 SCClinkCmd_d=$(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@
31 williamc 1.11 CClinkCmd=$(SCClinkCmd) $(LDLIBS)
32 williamc 1.14 CClinkCmdDebug=$(SCClinkCmd_d) $(LDLIBS_D)
33 williamc 1.14.2.14 CClinkCmdDebugLocal=$(SCClinkCmd_d) $(LDLIBS_D_L)
34 williamc 1.14 CClinkCmdInsure=$(SCClinkCmd_d) $(LDLIBS_Insure)
35 williamc 1.1
36     SharedCCObjectFlags = -PIC
37     SharedFCObjectFlags = -PIC
38     SharedSuffix =so
39     SharedCCTool = @echo No Shared Library support
40 williamc 1.14.2.13 DebugSharedCCTool = $(SharedCCTool)
41     InsureSharedCCTool = $(DebugSharedCCTool)
42 williamc 1.14.2.1 DependencyCCTool = $(CXX) -M $(CPPFLAGS) $^ > $@
43 williamc 1.14.2.7 PreProcessorCCTool = $(CXX) -P $(CPPFLAGS) $^
44 williamc 1.1
45     #----------------------------------------------
46     # Sun 4.2 CC
47     #----------------------------------------------
48     ifeq ($(CCcompiler),Sun-CC-4.2)
49 williamc 1.10 CXX=CC
50 williamc 1.14.2.3 templatedblib=-ptr$(template_dir) -ptr$(RELEASETOP)/$(workdir)/$(template_dir)
51 williamc 1.14.2.11 templatedshlib=-ptr$(templatesh_dir) -ptr$(RELEASETOP)/$(workdir)/$(templatesh_dir)
52 williamc 1.14.2.13 templateddshlib=-ptr$(templateshd_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshd_dir)
53     templatedinsureshlib=-ptr$(templateshi_dir) -ptr$(RELEASETOP)/$(workdir)/$(templateshi_dir)
54 williamc 1.14.2.4 templatedbin=-ptr$(RELEASETOP)/$(workdir)/$(template_dir)
55 williamc 1.14.2.3 templatedbo=-ptr$(template_dir)
56 williamc 1.14.2.4 SCClinkCmd+=$(templatedbin)
57     SCClinkCmd_d+=$(templatedbin)
58 williamc 1.14.2.3 CXXFLAGS+=$(templatedbo)
59 williamc 1.6 template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*.o/tmpl/' -e 's/.*.a/tmpl/' -e 's/.*.exe/tmpl/')
60 williamc 1.14.2.11 templatesh_dir=tmpl_pic
61 williamc 1.14.2.13 templateshd_dir=tmpl_picd
62 williamc 1.14.2.15 templateshi_dir=tmpl_picInsure
63 williamc 1.14.2.3 ArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedblib)
64 williamc 1.14.2.11 SharedCCTool = $(CXX) -G -o $@ $^ $(templatedshlib)
65 williamc 1.14.2.13 DebugSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templateddshlib)
66     InsureSharedCCTool = $(CXX) -G $(CXXDebugFlag) -o $@ $^ $(templatedinsureshlib)
67 williamc 1.10 DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $^ > $@
68 williamc 1.4 ifdef f77
69     extralib+=M77 F77 sunmath m
70     endif
71 williamc 1.14.2.9 ifdef MultiThreaded
72 williamc 1.14.2.8 CXXFLAGS+=-mt
73     endif
74 williamc 1.1 endif
75    
76     #----------------------------------------------
77     # aCC HP-UX
78     #----------------------------------------------
79     ifeq ($(CCcompiler),aCC)
80     CXX=aCC
81     SharedCCObjectFlags = +Z
82     SharedSuffix=sl
83     SharedCCTool=aCC -b $^ -o $@
84 williamc 1.14.2.13 DebugSharedCCTool=aCC $(CXXDebugFlag) -b $^ -o $@
85 williamc 1.4 ifdef f77
86     LIBDIR+=/opt/fortran/lib
87     extralib+=cl isamstub U77 /usr/lib/libdld.sl
88     endif
89 williamc 1.1 endif
90    
91     #----------------------------------------------
92     # gcc Linux
93     #----------------------------------------------
94     ifeq ($(CCcompiler),gcc)
95     CXX=c++
96     SharedCCObjectFlags = -fPIC
97     SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@
98 williamc 1.14.2.13 DebugSharedCCTool = gcc $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
99 williamc 1.4 ifdef f77
100     extralib+=f2c m
101     endif
102 williamc 1.1 endif
103    
104     #----------------------------------------------
105     # egcs Linux
106     #----------------------------------------------
107     ifeq ($(CCcompiler),egcs)
108     CXX=c++
109     SharedCCObjectFlags = -fPIC
110     SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
111 williamc 1.14.2.13 DebugSharedCCTool = $(CXX) $(CXXDebugFlag) $^ -o $@ -shared -Wl,-soname,$@
112 williamc 1.4 ifdef f77
113     extralib+=g2c m
114     endif
115 williamc 1.7 endif
116    
117     #----------------------------------------------
118     # GNU g77 Fortran compiler
119     #----------------------------------------------
120     ifeq ($(F77compiler),g77)
121     FC:=g77
122 williamc 1.1 endif
123 williamc 1.8
124 williamc 1.14.2.10 #----------------------------------------------
125     # HP-UX Fortran compiler fort77
126     #----------------------------------------------
127     ifeq ($(F77compiler),fort77)
128     FC:=fort77
129     SharedFCObjectFlags = +Z
130     endif
131 williamc 1.8
132     #-----------------------------------------------
133     # Insure++
134     #-----------------------------------------------
135     Insure:=insure
136 williamc 1.9 .psrc :
137     -@rm .psrc
138     echo insure++.compiler_cpp $(CXX) >> .psrc
139     echo insure++.temp_directory /tmp >> .psrc
140     echo insure++.compiler_default cpp >> .psrc
141     echo insure++.summarize leaks >> .psrc
142 williamc 1.14.2.5
143     #-----------------------------------------------
144     # Macabe
145     #-----------------------------------------------
146     ifdef MCCABE_EXTENSIONS
147     include mccabe.mk
148     endif