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