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.7 by williamc, Fri Mar 26 18:10:36 1999 UTC vs.
Revision 1.19 by williamc, Thu Apr 8 12:55:49 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 < %.exe : $(Sbinaryobjects)
162 <        $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
160 > # Executables
161 > # -------------------------------------------------------------------------
162 >
163 > # -- Debug Executables
164  
165 < # -- Debug Exexcutables
165 > lib_d=$(shell $(TOOL_HOME)/LibTypeExpand "_d" $(lib))
166 > LDLIBS_D=$(addprefix -l,$(lib_d))
167  
168 < #LDLIBS_D:=$(shell $(TOOL_HOME)/LibTypeExpand $(LDLIBS) "_d")
169 < %_d.exe : $(Sbinaryobjects)
170 <        $(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ \                        $(LDLIBS_D)
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 + frealbins=$(addprefix $(LOCALTOP)/$(INTbin)/,$(realbins))
185   clean ::
186          @if [ "$(realbins)" != "" ] ; then \
187          echo Removing executables : $(realbins); \
188 <        rm $(LOCALTOP)/$(INTbin)/$(realbins); \
188 >        rm $(frealbins); \
189          fi;
190  
191   # -------------------------------------------------------------------------
# Line 157 | Line 213 | $(shlibname)_picd.$(SharedSuffix) : $(Ss
213   $(shlibname)_d.$(SharedSuffix) : $(Ssharedlibdebugobjs)
214          @mv $< $(librarystore)/$@
215  
216 + # -- Insure Shared Objects Libs
217 + $(shlibname)_picInsure.$(SharedSuffix) : $(SsharedlibInsureobjs)
218 +        $(SharedCCTool)
219 +
220 + $(shlibname)_Insure.$(SharedSuffix) : $(SsharedlibInsureobjs)
221 +        @mv $< $(librarystore)/$@
222 +
223   # -- Standard Archive Libs
224   $(arlibname).$(ArchiveSuffix) : $(Sarchivelibobjs)
225          $(ArchiveCCTool)
226 <        mv $@ $(librarystore)/$@
226 >        @mv $@ $(librarystore)/$@
227  
228   # -- Debug Archive Libs
229   $(arlibname)_d.$(ArchiveSuffix) : $(Sarchivelibdebugobjs)
230          $(ArchiveCCTool)
231          @mv $@ $(librarystore)/$@
232  
233 + # -- Insure Archive libs
234 + $(arlibname)_Insure.$(ArchiveSuffix) : $(SarchivelibInsureobjs)
235 +        $(ArchiveCCTool)
236 +        @mv $@ $(librarystore)/$@
237 +
238   # -- Dependencies
239   dependencies.mk: $(files)
240          @$(DependencyCCTool)
241          @$(TOOL_HOME)/DependencyMangler $@
242 +
243 + %.dep:
244 +        @$(DependencyCCTool)
245 +        @$(TOOL_HOME)/DependencyMangler $@
246 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines