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) |
111 |
|
%_d.o : %.f |
112 |
|
$(FC) -c $(CPPFLAGS) $(FFLAGS) $(FCDebugFlag) $< -o $@ |
113 |
|
|
114 |
+ |
# -- Executables |
115 |
+ |
%.exe : %.cpp |
116 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
117 |
+ |
|
118 |
+ |
%.exe : %.cc |
119 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
120 |
+ |
|
121 |
+ |
%.exe : %.C |
122 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
123 |
+ |
|
124 |
+ |
%.exe : %.F |
125 |
+ |
$(FC) $(CPPFLAGS) $(FFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
126 |
+ |
|
127 |
+ |
%.exe : %.f |
128 |
+ |
$(FC) $(CPPFLAGS) $(FFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) |
129 |
+ |
|
130 |
+ |
# -- Debug Exexcutables |
131 |
+ |
#LDLIBS_D:=$(shell $(TOOL_HOME)/LibTypeExpand $(LDLIBS) "_d") |
132 |
+ |
%_d.exe : %.cpp |
133 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ \ $(LDLIBS_D) |
134 |
+ |
|
135 |
+ |
%_d.exe : %.cc |
136 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D) |
137 |
+ |
|
138 |
+ |
%_d.exe : %.C |
139 |
+ |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXXDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D) |
140 |
+ |
|
141 |
+ |
%_d.exe : %.F |
142 |
+ |
$(FC) $(CPPFLAGS) $(FFLAGS_D) $(FCDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D) |
143 |
+ |
|
144 |
+ |
%_d.exe : %.f |
145 |
+ |
$(FC) $(CPPFLAGS) $(FFLAGS_D) $(FCDebugFlag) $(LDFLAGS) $< -o $@ $(LDLIBS_D) |
146 |
+ |
|
147 |
+ |
|
148 |
|
# Some nice generic target names for the user |
149 |
|
|
150 |
|
shared : $(shlibname).$(SharedSuffix) |
165 |
|
$(shlibname)_picd.$(SharedSuffix) : $(Ssharedlibdebugobjs) |
166 |
|
$(SharedCCTool) |
167 |
|
|
168 |
< |
$(shlibname)_picd.$(SharedSuffix) : $(Ssharedlibdebugobjs) |
168 |
> |
$(shlibname)_d.$(SharedSuffix) : $(Ssharedlibdebugobjs) |
169 |
|
@mv $< $(librarystore)/$@ |
170 |
|
|
171 |
|
# -- Standard Archive Libs |