ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.13
Committed: Tue Sep 14 14:37:46 1999 UTC (25 years, 8 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_31
Changes since 1.14.2.12: +11 -0 lines
Log Message:
Seperate debug shared rules from regular shared rules

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