ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.6
Committed: Tue Jun 1 18:59:52 1999 UTC (25 years, 11 months ago) by williamc
Branch: V0_9branch
Changes since 1.14.2.5: +1 -1 lines
Log Message:
Add -C to PreProcessor Command

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