ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/compilers.mk
Revision: 1.14
Committed: Thu Apr 8 12:55:49 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: ProtoEnd, V0_8
Branch point for: V0_9branch
Changes since 1.13: +4 -3 lines
Log Message:
Fix clean targets and make bin name default to the debug version

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