ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.11
Committed: Thu Sep 2 16:35:05 1999 UTC (25 years, 8 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_30, V0_9_29, V0_9_28, V0_9_27, V0_9_26, V0_9_25, V0_9_24, V0_9_23
Changes since 1.14.2.10: +3 -1 lines
Log Message:
Fix Sun4.2 template.DB bug for shared objects

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