ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14.2.1
Committed: Thu Apr 22 16:47:17 1999 UTC (26 years ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_7, V0_9_6, V0_9_5, V0_9_4, V0_9_3, V0_9_2, V0_9_1, V0_9
Changes since 1.14: +1 -0 lines
Log Message:
Add default DependencyCCTool

File Contents

# Content
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 FC:=f77
21
22 ArchiveSuffix = a
23 ArchiveTool = ar -rc $@ $^
24 ArchiveCCTool = $(ArchiveTool)
25 SCClinkCmd=$(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@
26 SCClinkCmd_d=$(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@
27 CClinkCmd=$(SCClinkCmd) $(LDLIBS)
28 CClinkCmdDebug=$(SCClinkCmd_d) $(LDLIBS_D)
29 CClinkCmdInsure=$(SCClinkCmd_d) $(LDLIBS_Insure)
30
31 SharedCCObjectFlags = -PIC
32 SharedFCObjectFlags = -PIC
33 SharedSuffix =so
34 SharedCCTool = @echo No Shared Library support
35 DependencyCCTool = $(CXX) -M $(CPPFLAGS) $^ > $@
36
37 #----------------------------------------------
38 # Sun 4.2 CC
39 #----------------------------------------------
40 ifeq ($(CCcompiler),Sun-CC-4.2)
41 CXX=CC
42 CXXFLAGS+=-ptr$(template_dir)
43 template_dir=$(shell echo $@ | sed -e 's/.*\(_.*\)\..*/tmpl\1/' -e 's/.*.o/tmpl/' -e 's/.*.a/tmpl/' -e 's/.*.exe/tmpl/')
44 ArchiveCCTool = $(CXX) -xar -o $@ $^ -ptr$(template_dir)
45 SharedCCTool = $(CXX) -G -o $@ $^ -ptr$(template_dir)
46 DependencyCCTool = $(CXX) -xM1 $(CPPFLAGS) $^ > $@
47 ifdef f77
48 extralib+=M77 F77 sunmath m
49 endif
50 endif
51
52 #----------------------------------------------
53 # aCC HP-UX
54 #----------------------------------------------
55 ifeq ($(CCcompiler),aCC)
56 CXX=aCC
57 SharedCCObjectFlags = +Z
58 SharedSuffix=sl
59 SharedCCTool=aCC -b $^ -o $@
60 ifdef f77
61 LIBDIR+=/opt/fortran/lib
62 extralib+=cl isamstub U77 /usr/lib/libdld.sl
63 endif
64 endif
65
66 #----------------------------------------------
67 # gcc Linux
68 #----------------------------------------------
69 ifeq ($(CCcompiler),gcc)
70 CXX=c++
71 SharedCCObjectFlags = -fPIC
72 SharedCCTool = gcc $^ -o $@ -shared -Wl,-soname,$@
73 ifdef f77
74 extralib+=f2c m
75 endif
76 endif
77
78 #----------------------------------------------
79 # egcs Linux
80 #----------------------------------------------
81 ifeq ($(CCcompiler),egcs)
82 CXX=c++
83 SharedCCObjectFlags = -fPIC
84 SharedCCTool = $(CXX) $^ -o $@ -shared -Wl,-soname,$@
85 ifdef f77
86 extralib+=g2c m
87 endif
88 endif
89
90 #----------------------------------------------
91 # GNU g77 Fortran compiler
92 #----------------------------------------------
93 ifeq ($(F77compiler),g77)
94 FC:=g77
95 endif
96
97
98 #-----------------------------------------------
99 # Insure++
100 #-----------------------------------------------
101 Insure:=insure
102 .psrc :
103 -@rm .psrc
104 echo insure++.compiler_cpp $(CXX) >> .psrc
105 echo insure++.temp_directory /tmp >> .psrc
106 echo insure++.compiler_default cpp >> .psrc
107 echo insure++.summarize leaks >> .psrc