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 |
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 |
|
# ------------------------------------------------------------------------- |
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) |
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) |
174 |
> |
#%_Insure.exe : |
175 |
> |
# $(Insure) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D) |
176 |
|
|
177 |
|
# -- Executables |
178 |
< |
%.exe : %.o |
179 |
< |
$(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
178 |
> |
#%.exe : |
179 |
> |
# $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
180 |
|
|
181 |
|
# ------------------------------------------------------------------------- |
182 |
|
|
238 |
|
dependencies.mk: $(files) |
239 |
|
@$(DependencyCCTool) |
240 |
|
@$(TOOL_HOME)/DependencyMangler $@ |
241 |
+ |
|
242 |
+ |
%.dep: |
243 |
+ |
@$(DependencyCCTool) |
244 |
+ |
@$(TOOL_HOME)/DependencyMangler $@ |
245 |
+ |
|