ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/toolrules.mk
(Generate patch)

Comparing COMP/SCRAM/src/toolrules.mk (file contents):
Revision 1.8 by williamc, Fri Mar 26 18:17:51 1999 UTC vs.
Revision 1.18 by williamc, Tue Apr 6 07:50:31 1999 UTC

# Line 1 | Line 1
1   # Some Pre-Defined Rules For Building Stuff
2   #
3 < #include compilers.mk
3 > .PHONY:bin lib
4   lib : dependencies.mk
5   bin : dependencies.mk
6  
7   #------------------------------------------------
8   # Default Behaviours - interpreted from makefile
9   #------------------------------------------------
10 + # -- Set the library vapths
11 + vpath %.$(SharedSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
12 + vpath %.$(ArchiveSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
13   # -- storage of binaries
14   binarystore:=$(LOCALTOP)/$(INTbin)
15   VPATH+=:$(LOCALTOP)/$(INTbin):$(RELEASETOP)/$(INTbin)
16  
14 # -- storage of libraries
15 librarystore:=$(LOCALTOP)/$(INTlib)
16 vpath %.$(SharedSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
17 vpath %.$(ArchiveSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
18
17   # -- library names
18  
19   ifdef libname
# Line 37 | Line 35 | ifdef DefaultDebugShared
35   lib : $(shlibname)_d.$(SharedSuffix)
36   MakeLib=yes
37   endif
38 + ifdef DefaultInsureShared
39 + lib : $(shlibname)_Insure.$(SharedSuffix)
40 + MakeLib=yes
41 + endif
42   ifdef DefaultArchive
43   lib : $(arlibname).$(ArchiveSuffix)
44   MakeLib=yes
# Line 45 | Line 47 | ifdef DefaultDebugArchive
47   lib : $(arlibname)_d.$(ArchiveSuffix)
48   MakeLib=yes
49   endif
50 + ifdef DefaultInsureArchive
51 + lib : $(arlibname)_Insure.$(ArchiveSuffix)
52 + MakeLib=yes
53 + endif
54  
55   ifdef MakeLib
56   all: lib
# Line 59 | Line 65 | Sarchivelibobjs:=$(addsuffix .o,$(archiv
65   Sarchivelibdebugobjs:=$(addsuffix _d.o,$(archivefiles))
66   Ssharedlibobjs:=$(addsuffix _pic.o,$(sharedfiles))
67   Ssharedlibdebugobjs:=$(addsuffix _picd.o,$(sharedfiles))
68 <
69 < # binary target files
64 < Sbinaryobjects:=$(addsuffix .o,$(binfiles))
68 > SsharedlibInsureobjs:=$(addsuffix _picInsure.o,$(sharedfiles))
69 > SarchivelibInsureobjs:=$(addsuffix _Insure.o,$(archivefiles))
70  
71   #------------------------------------------------
72   # Rules Start Here
# Line 95 | Line 100 | Sbinaryobjects:=$(addsuffix .o,$(binfile
100  
101   %_picd.o : %.f
102          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $(SharedFCObjectFlags) $< -o $@
103 < # -- Standard Archive Libs
104 < # Already built in
103 >
104 > # -- Debug Shared Objects with Insure
105 > %_picInsure.o : %.cc
106 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
107 >
108 > %_picInsure.o : %.C
109 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
110 >
111 > %_picInsure.o : %.cpp
112 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
113 >
114  
115   # -- Debug Archive Libs
116   %_d.o : %.cpp
# Line 114 | Line 128 | Sbinaryobjects:=$(addsuffix .o,$(binfile
128   %_d.o : %.f
129          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $< -o $@
130  
131 + # -- Debug Archive Libs with Insure
132 + %_Insure.o : %.cpp
133 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
134 +
135 + %_Insure.o : %.cc
136 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
137 +
138 + %_Insure.o : %.C
139 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
140 +
141 + # -- Standard Archive Libs
142 + %.o : %.cpp
143 +        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
144 +
145 + %.o : %.cc
146 +        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
147 +
148 + %.o : %.C
149 +        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
150 +
151 + %.o : %.F
152 +        $(FC) -c $(CPPFLAGS) $(FFLAGS) $< -o $@
153 +
154 + %.o : %.f
155 +        $(FC) -c $(CPPFLAGS) $(FFLAGS) $< -o $@
156 +
157 + # Already built in
158 +
159 + # -------------------------------------------------------------------------
160 + # Executables
161   # -------------------------------------------------------------------------
118 # -- Executables
119 %.exe : $(Sbinaryobjects)
120        $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
162  
163 < # -- Debug Exexcutables
163 > # -- Debug Executables
164  
165 < #LDLIBS_D:=$(shell $(TOOL_HOME)/LibTypeExpand $(LDLIBS) "_d")
166 < %_d.exe : $(Sbinaryobjects)
167 <        $(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ \                        $(LDLIBS_D)
165 > lib_d=$(shell $(TOOL_HOME)/LibTypeExpand "_d" $(lib))
166 > LDLIBS_D=$(addprefix -l,$(lib_d))
167 >
168 > #%_d.exe :
169 > #       $(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
170 >
171 > # -- Insure Executables
172 > lib_Insure=$(shell $(TOOL_HOME)/LibTypeExpand "_Insure" $(lib))
173 > LDLIBS_I=$(addprefix -l,$(lib_Insure))
174 > #%_Insure.exe :
175 > #       $(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
176 >
177 > # -- Executables
178 > #%.exe :
179 > #       $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
180 >
181 > # -------------------------------------------------------------------------
182  
183   realbins:=$(filter $(bintargets),$(notdir $(wildcard $(LOCALTOP)/$(INTbin)/*)))
184   clean ::
# Line 157 | Line 212 | $(shlibname)_picd.$(SharedSuffix) : $(Ss
212   $(shlibname)_d.$(SharedSuffix) : $(Ssharedlibdebugobjs)
213          @mv $< $(librarystore)/$@
214  
215 + # -- Insure Shared Objects Libs
216 + $(shlibname)_picInsure.$(SharedSuffix) : $(SsharedlibInsureobjs)
217 +        $(SharedCCTool)
218 +
219 + $(shlibname)_Insure.$(SharedSuffix) : $(SsharedlibInsureobjs)
220 +        @mv $< $(librarystore)/$@
221 +
222   # -- Standard Archive Libs
223   $(arlibname).$(ArchiveSuffix) : $(Sarchivelibobjs)
224          $(ArchiveCCTool)
# Line 167 | Line 229 | $(arlibname)_d.$(ArchiveSuffix) : $(Sarc
229          $(ArchiveCCTool)
230          @mv $@ $(librarystore)/$@
231  
232 + # -- Insure Archive libs
233 + $(arlibname)_Insure.$(ArchiveSuffix) : $(SarchivelibInsureobjs)
234 +        $(ArchiveCCTool)
235 +        @mv $@ $(librarystore)/$@
236 +
237   # -- Dependencies
238   dependencies.mk: $(files)
239          @$(DependencyCCTool)
240          @$(TOOL_HOME)/DependencyMangler $@
241 +
242 + %.dep:
243 +        @$(DependencyCCTool)
244 +        @$(TOOL_HOME)/DependencyMangler $@
245 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines