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.6 by williamc, Fri Mar 26 15:14:37 1999 UTC vs.
Revision 1.16 by williamc, Thu Apr 1 16:19:28 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  
# Line 11 | Line 11 | bin : dependencies.mk
11   binarystore:=$(LOCALTOP)/$(INTbin)
12   VPATH+=:$(LOCALTOP)/$(INTbin):$(RELEASETOP)/$(INTbin)
13  
14 # -- storage of libraries
15 librarystore:=$(LOCALTOP)/$(INTlib)
16 vpath %.$(SharedSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
17 vpath %.$(ArchiveSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
18
14   # -- library names
15  
16   ifdef libname
# Line 37 | Line 32 | ifdef DefaultDebugShared
32   lib : $(shlibname)_d.$(SharedSuffix)
33   MakeLib=yes
34   endif
35 + ifdef DefaultInsureShared
36 + lib : $(shlibname)_Insure.$(SharedSuffix)
37 + MakeLib=yes
38 + endif
39   ifdef DefaultArchive
40   lib : $(arlibname).$(ArchiveSuffix)
41   MakeLib=yes
# Line 45 | Line 44 | ifdef DefaultDebugArchive
44   lib : $(arlibname)_d.$(ArchiveSuffix)
45   MakeLib=yes
46   endif
47 + ifdef DefaultInsureArchive
48 + lib : $(arlibname)_Insure.$(ArchiveSuffix)
49 + MakeLib=yes
50 + endif
51  
52   ifdef MakeLib
53   all: lib
# Line 59 | Line 62 | Sarchivelibobjs:=$(addsuffix .o,$(archiv
62   Sarchivelibdebugobjs:=$(addsuffix _d.o,$(archivefiles))
63   Ssharedlibobjs:=$(addsuffix _pic.o,$(sharedfiles))
64   Ssharedlibdebugobjs:=$(addsuffix _picd.o,$(sharedfiles))
65 + SsharedlibInsureobjs:=$(addsuffix _picInsure.o,$(sharedfiles))
66 + SarchivelibInsureobjs:=$(addsuffix _Insure.o,$(archivefiles))
67  
68   #------------------------------------------------
69   # Rules Start Here
# Line 92 | Line 97 | Ssharedlibdebugobjs:=$(addsuffix _picd.o
97  
98   %_picd.o : %.f
99          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $(SharedFCObjectFlags) $< -o $@
100 < # -- Standard Archive Libs
101 < # Already built in
100 >
101 > # -- Debug Shared Objects with Insure
102 > %_picInsure.o : %.cc
103 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
104 >
105 > %_picInsure.o : %.C
106 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
107 >
108 > %_picInsure.o : %.cpp
109 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
110 >
111  
112   # -- Debug Archive Libs
113   %_d.o : %.cpp
# Line 111 | Line 125 | Ssharedlibdebugobjs:=$(addsuffix _picd.o
125   %_d.o : %.f
126          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $< -o $@
127  
128 < # -- Executables
129 < %.exe : %.cpp
130 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
128 > # -- Debug Archive Libs with Insure
129 > %_Insure.o : %.cpp
130 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
131  
132 < %.exe : %.cc
133 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
132 > %_Insure.o : %.cc
133 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
134  
135 < %.exe : %.C
136 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
135 > %_Insure.o : %.C
136 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
137  
138 < %.exe : %.F
139 <        $(FC) $(CPPFLAGS) $(FFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
138 > # -- Standard Archive Libs
139 > %.o : %.cpp
140 >        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
141  
142 < %.exe : %.f
143 <        $(FC) $(CPPFLAGS) $(FFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
142 > %.o : %.cc
143 >        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
144  
145 < # -- Debug Exexcutables
146 < #LDLIBS_D:=$(shell $(TOOL_HOME)/LibTypeExpand $(LDLIBS) "_d")
132 < %_d.exe : %.cpp
133 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ \                    $(LDLIBS_D)
145 > %.o : %.C
146 >        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
147  
148 < %_d.exe : %.cc
149 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
148 > %.o : %.F
149 >        $(FC) -c $(CPPFLAGS) $(FFLAGS) $< -o $@
150  
151 < %_d.exe : %.C
152 <        $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
151 > %.o : %.f
152 >        $(FC) -c $(CPPFLAGS) $(FFLAGS) $< -o $@
153  
154 < %_d.exe : %.F
142 <        $(FC) $(CPPFLAGS) $(FFLAGS_D) $(FCDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
154 > # Already built in
155  
156 < %_d.exe : %.f
157 <        $(FC) $(CPPFLAGS) $(FFLAGS_D) $(FCDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
156 > # -------------------------------------------------------------------------
157 > # Executables
158 > # -------------------------------------------------------------------------
159 >
160 > # -- Debug Executables
161 >
162 > lib_d=$(shell $(TOOL_HOME)/LibTypeExpand "_d" $(lib))
163 > LDLIBS_D=$(addprefix -l,$(lib_d))
164 >
165 > #%_d.exe :
166 > #       $(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
167 >
168 > # -- Insure Executables
169 > lib_Insure=$(shell $(TOOL_HOME)/LibTypeExpand "_Insure" $(lib))
170 > LDLIBS_I=$(addprefix -l,$(lib_Insure))
171 > #%_Insure.exe :
172 > #       $(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
173  
174 + # -- Executables
175 + #%.exe :
176 + #       $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
177 +
178 + # -------------------------------------------------------------------------
179 +
180 + realbins:=$(filter $(bintargets),$(notdir $(wildcard $(LOCALTOP)/$(INTbin)/*)))
181 + clean ::
182 +        @if [ "$(realbins)" != "" ] ; then \
183 +        echo Removing executables : $(realbins); \
184 +        rm $(LOCALTOP)/$(INTbin)/$(realbins); \
185 +        fi;
186 +
187 + # -------------------------------------------------------------------------
188  
189   # Some nice generic target names for the user
190  
# Line 168 | Line 209 | $(shlibname)_picd.$(SharedSuffix) : $(Ss
209   $(shlibname)_d.$(SharedSuffix) : $(Ssharedlibdebugobjs)
210          @mv $< $(librarystore)/$@
211  
212 + # -- Insure Shared Objects Libs
213 + $(shlibname)_picInsure.$(SharedSuffix) : $(SsharedlibInsureobjs)
214 +        $(SharedCCTool)
215 +
216 + $(shlibname)_Insure.$(SharedSuffix) : $(SsharedlibInsureobjs)
217 +        @mv $< $(librarystore)/$@
218 +
219   # -- Standard Archive Libs
220   $(arlibname).$(ArchiveSuffix) : $(Sarchivelibobjs)
221          $(ArchiveCCTool)
222 <        @mv $@ $(librarystore)
222 >        @mv $@ $(librarystore)/$@
223  
224   # -- Debug Archive Libs
225   $(arlibname)_d.$(ArchiveSuffix) : $(Sarchivelibdebugobjs)
226          $(ArchiveCCTool)
227 <        @mv $@ $(librarystore)
227 >        @mv $@ $(librarystore)/$@
228 >
229 > # -- Insure Archive libs
230 > $(arlibname)_Insure.$(ArchiveSuffix) : $(SarchivelibInsureobjs)
231 >        $(ArchiveCCTool)
232 >        @mv $@ $(librarystore)/$@
233  
234   # -- Dependencies
235   dependencies.mk: $(files)
236          @$(DependencyCCTool)
237          @$(TOOL_HOME)/DependencyMangler $@
238 +
239 + %.dep:
240 +        @$(DependencyCCTool)
241 +        @$(TOOL_HOME)/DependencyMangler $@

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines