ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.2
Committed: Tue May 11 09:14:33 1999 UTC (26 years ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_8
Changes since 1.14.2.1: +4 -3 lines
Log Message:
Access the central template DB on Sun as well as the local copy

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.1
37     #----------------------------------------------
38     # Sun 4.2 CC
39     #----------------------------------------------
40     ifeq ($(CCcompiler),Sun-CC-4.2)
41 williamc 1.10 CXX=CC
42 williamc 1.14.2.2 templatedb=-ptr$(template_dir) -ptr$(RELEASETOP)/$(workdir)/$(template_dir)
43     CXXFLAGS+=$(templatedb)
44 williamc 1.6 template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*.o/tmpl/' -e 's/.*.a/tmpl/' -e 's/.*.exe/tmpl/')
45 williamc 1.14.2.2 ArchiveCCTool = $(CXX) -xar -o $@ $^ $(templatedb)
46     SharedCCTool = $(CXX) -G -o $@ $^ $(templatedb)
47 williamc 1.10 DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $^ > $@
48 williamc 1.4 ifdef f77
49     extralib+=M77 F77 sunmath m
50     endif
51 williamc 1.1 endif
52    
53     #----------------------------------------------
54     # aCC HP-UX
55     #----------------------------------------------
56     ifeq ($(CCcompiler),aCC)
57     CXX=aCC
58     SharedCCObjectFlags = +Z
59     SharedSuffix=sl
60     SharedCCTool=aCC -b $^ -o $@
61 williamc 1.4 ifdef f77
62     LIBDIR+=/opt/fortran/lib
63     extralib+=cl isamstub U77 /usr/lib/libdld.sl
64     endif
65 williamc 1.1 endif
66    
67     #----------------------------------------------
68     # gcc Linux
69     #----------------------------------------------
70     ifeq ($(CCcompiler),gcc)
71     CXX=c++
72     SharedCCObjectFlags = -fPIC
73     SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@
74 williamc 1.4 ifdef f77
75     extralib+=f2c m
76     endif
77 williamc 1.1 endif
78    
79     #----------------------------------------------
80     # egcs Linux
81     #----------------------------------------------
82     ifeq ($(CCcompiler),egcs)
83     CXX=c++
84     SharedCCObjectFlags = -fPIC
85     SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
86 williamc 1.4 ifdef f77
87     extralib+=g2c m
88     endif
89 williamc 1.7 endif
90    
91     #----------------------------------------------
92     # GNU g77 Fortran compiler
93     #----------------------------------------------
94     ifeq ($(F77compiler),g77)
95     FC:=g77
96 williamc 1.1 endif
97 williamc 1.8
98    
99     #-----------------------------------------------
100     # Insure++
101     #-----------------------------------------------
102     Insure:=insure
103 williamc 1.9 .psrc :
104     -@rm .psrc
105     echo insure++.compiler_cpp $(CXX) >> .psrc
106     echo insure++.temp_directory /tmp >> .psrc
107     echo insure++.compiler_default cpp >> .psrc
108     echo insure++.summarize leaks >> .psrc