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.4 by williamc, Mon Mar 22 17:57:40 1999 UTC vs.
Revision 1.14 by williamc, Thu Apr 1 09:55:00 1999 UTC

# Line 1 | Line 1
1   # Some Pre-Defined Rules For Building Stuff
2   #
3 < include compilers.mk
3 > #include compilers.mk
4   lib : dependencies.mk
5   bin : dependencies.mk
6  
7   #------------------------------------------------
8   # Default Behaviours - interpreted from makefile
9   #------------------------------------------------
10 + # -- storage of binaries
11 + binarystore:=$(LOCALTOP)/$(INTbin)
12 + VPATH+=:$(LOCALTOP)/$(INTbin):$(RELEASETOP)/$(INTbin)
13  
14   # -- storage of libraries
15   librarystore:=$(LOCALTOP)/$(INTlib)
# Line 34 | Line 37 | ifdef DefaultDebugShared
37   lib : $(shlibname)_d.$(SharedSuffix)
38   MakeLib=yes
39   endif
40 + ifdef DefaultInsureShared
41 + lib : $(shlibname)_Insure.$(SharedSuffix)
42 + MakeLib=yes
43 + endif
44   ifdef DefaultArchive
45   lib : $(arlibname).$(ArchiveSuffix)
46   MakeLib=yes
# Line 42 | Line 49 | ifdef DefaultDebugArchive
49   lib : $(arlibname)_d.$(ArchiveSuffix)
50   MakeLib=yes
51   endif
52 + ifdef DefaultInsureArchive
53 + lib : $(arlibname)_Insure.$(ArchiveSuffix)
54 + MakeLib=yes
55 + endif
56  
57   ifdef MakeLib
58   all: lib
# Line 56 | Line 67 | Sarchivelibobjs:=$(addsuffix .o,$(archiv
67   Sarchivelibdebugobjs:=$(addsuffix _d.o,$(archivefiles))
68   Ssharedlibobjs:=$(addsuffix _pic.o,$(sharedfiles))
69   Ssharedlibdebugobjs:=$(addsuffix _picd.o,$(sharedfiles))
70 + SsharedlibInsureobjs:=$(addsuffix _picInsure.o,$(sharedfiles))
71 + SarchivelibInsureobjs:=$(addsuffix _Insure.o,$(archivefiles))
72  
73   #------------------------------------------------
74   # Rules Start Here
# Line 89 | Line 102 | Ssharedlibdebugobjs:=$(addsuffix _picd.o
102  
103   %_picd.o : %.f
104          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $(SharedFCObjectFlags) $< -o $@
105 < # -- Standard Archive Libs
106 < # Already built in
105 >
106 > # -- Debug Shared Objects with Insure
107 > %_picInsure.o : %.cc
108 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
109 >
110 > %_picInsure.o : %.C
111 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
112 >
113 > %_picInsure.o : %.cpp
114 >        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(SharedCCObjectFlags) $< -o $@
115 >
116  
117   # -- Debug Archive Libs
118   %_d.o : %.cpp
# Line 108 | Line 130 | Ssharedlibdebugobjs:=$(addsuffix _picd.o
130   %_d.o : %.f
131          $(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $< -o $@
132  
133 + # -- Debug Archive Libs with Insure
134 + %_Insure.o : %.cpp
135 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
136 +
137 + %_Insure.o : %.cc
138 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
139 +
140 + %_Insure.o : %.C
141 +        $(Insure) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $< -o $@
142 +
143 + # -- Standard Archive Libs
144 + # Already built in
145 +
146 + # -------------------------------------------------------------------------
147 + # Executables
148 + # -------------------------------------------------------------------------
149 +
150 + # -- Debug Executables
151 +
152 + lib_d=$(shell $(TOOL_HOME)/LibTypeExpand "_d" $(lib))
153 + LDLIBS_D=$(addprefix -l,$(lib_d))
154 +
155 + %_d.exe :
156 +        $(CXX) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
157 +
158 + # -- Insure Executables
159 + lib_Insure=$(shell $(TOOL_HOME)/LibTypeExpand "_Insure" $(lib))
160 + LDLIBS_I=$(addprefix -l,$(lib_Insure))
161 + %_Insure.exe :
162 +        $(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D)
163 +
164 + # -- Executables
165 + %.exe :
166 +        $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
167 +
168 + # -------------------------------------------------------------------------
169 +
170 + realbins:=$(filter $(bintargets),$(notdir $(wildcard $(LOCALTOP)/$(INTbin)/*)))
171 + clean ::
172 +        @if [ "$(realbins)" != "" ] ; then \
173 +        echo Removing executables : $(realbins); \
174 +        rm $(LOCALTOP)/$(INTbin)/$(realbins); \
175 +        fi;
176 +
177 + # -------------------------------------------------------------------------
178 +
179   # Some nice generic target names for the user
180  
181   shared : $(shlibname).$(SharedSuffix)
# Line 131 | Line 199 | $(shlibname)_picd.$(SharedSuffix) : $(Ss
199   $(shlibname)_d.$(SharedSuffix) : $(Ssharedlibdebugobjs)
200          @mv $< $(librarystore)/$@
201  
202 + # -- Insure Shared Objects Libs
203 + $(shlibname)_picInsure.$(SharedSuffix) : $(SsharedlibInsureobjs)
204 +        $(SharedCCTool)
205 +
206 + $(shlibname)_Insure.$(SharedSuffix) : $(SsharedlibInsureobjs)
207 +        @mv $< $(librarystore)/$@
208 +
209   # -- Standard Archive Libs
210   $(arlibname).$(ArchiveSuffix) : $(Sarchivelibobjs)
211          $(ArchiveCCTool)
212 <        @mv $@ $(librarystore)
212 >        @mv $@ $(librarystore)/$@
213  
214   # -- Debug Archive Libs
215   $(arlibname)_d.$(ArchiveSuffix) : $(Sarchivelibdebugobjs)
216          $(ArchiveCCTool)
217 <        @mv $@ $(librarystore)
217 >        @mv $@ $(librarystore)/$@
218 >
219 > # -- Insure Archive libs
220 > $(arlibname)_Insure.$(ArchiveSuffix) : $(SarchivelibInsureobjs)
221 >        $(ArchiveCCTool)
222 >        @mv $@ $(librarystore)/$@
223  
224   # -- Dependencies
225   dependencies.mk: $(files)
226          @$(DependencyCCTool)
227          @$(TOOL_HOME)/DependencyMangler $@
228 +
229 + %.dep:
230 +        @$(DependencyCCTool)
231 +        @$(TOOL_HOME)/DependencyMangler $@

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines