1 |
|
# |
2 |
|
# Preliminaries |
3 |
|
# |
4 |
+ |
LIBDIR=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH) $(PRIORITY_LIBDIR) |
5 |
+ |
|
6 |
+ |
CXXFLAGS+=$(CXXUSERFLAGS) |
7 |
|
|
8 |
|
# |
9 |
|
# Make sure nobody tries to run this directly through gmake |
13 |
|
endif |
14 |
|
|
15 |
|
|
16 |
+ |
# -- storage of libraries |
17 |
+ |
librarystore:=$(LOCALTOP)/$(INTlib) |
18 |
+ |
|
19 |
+ |
libsavaillocal=$(notdir $(wildcard $(librarystore)/*)) |
20 |
+ |
libsavailbase=$(notdir $(wildcard $(RELEASETOP)/$(INTlib)/*)) |
21 |
+ |
libsavail=$(sort $(libsavailbase) $(libsavaillocal)) |
22 |
+ |
libslocal=$(foreach var,$(lib),$(filter lib$(var).a, $(libsavail))) |
23 |
+ |
libslocal_I=$(foreach var,$(lib_I),$(filter lib$(var).a, $(libsavail))) |
24 |
+ |
libslocal_d=$(foreach var,$(lib_d),$(filter lib$(var).a, $(libsavail))) |
25 |
+ |
|
26 |
|
# |
27 |
|
# Pointing to file storage locations for the various types |
28 |
|
# |
34 |
|
# |
35 |
|
ifdef ReqDependencies |
36 |
|
always:$(LOCALTOP)/$(workdir)/PackageReqs |
37 |
< |
$(LOCALTOP)/$(workdir)/PackageReqs::$(ReqDependencies) |
37 |
> |
$(LOCALTOP)/$(workdir)/PackageReqs:$(ReqDependencies) |
38 |
|
$(TOOL_HOME)/BuildPackageReqs $@ $? |
39 |
|
endif |
40 |
|
|
41 |
+ |
|
42 |
|
# |
43 |
|
# Get local mods |
44 |
|
# |
45 |
|
ifdef LatestBuildFile |
46 |
|
include ${LatestBuildFile} |
47 |
|
endif |
48 |
+ |
|
49 |
|
# |
50 |
|
# get build requirements Class |
51 |
|
# |
53 |
|
include ${DefaultBuildFile} |
54 |
|
endif |
55 |
|
|
56 |
+ |
# |
57 |
+ |
# Site settings |
58 |
+ |
# |
59 |
+ |
clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile |
60 |
+ |
include $(clientmakefile) |
61 |
|
|
62 |
|
# |
63 |
|
# get build targets |
64 |
|
# |
65 |
+ |
include ${TOOL_HOME}/compilers.mk |
66 |
|
include ${TOOL_HOME}/toolrules.mk |
67 |
|
|
68 |
|
|
69 |
|
# |
70 |
|
# -- Some tool setups which dont yet have a home |
71 |
|
# |
72 |
< |
CPPFLAGS += $(INCLUDEPATH) |
72 |
> |
CPPFLAGS += $(addprefix -I,$(PRIORITY_INCLUDE)) $(INCLUDEPATH) |
73 |
|
|
53 |
– |
# |
54 |
– |
# Site settings |
55 |
– |
# |
56 |
– |
clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile |
57 |
– |
include $(clientmakefile) |
74 |
|
|
75 |
|
# |
76 |
|
# now add our includepath |
77 |
|
# |
78 |
|
INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc} |
79 |
|
|
80 |
+ |
# |
81 |
+ |
# Dependency information |
82 |
+ |
# |
83 |
+ |
-include dependencies.mk |
84 |
+ |
|
85 |
+ |
dependencies.mk :: $(clientmakefile) |
86 |
|
# |
87 |
|
# Process Subdirs |
88 |
|
# |
89 |
|
ifdef SUBDIRS |
90 |
|
$(SUBDIRS):: |
91 |
|
@echo ------- Building ---- $@ ----------- |
92 |
< |
cd $(LOCALTOP)/$(THISDIR)/$@; $(TOOL_HOME)/scram build |
92 |
> |
@if [ -d $(LOCALTOP)/$(ClassDir)/$@ ]; then \ |
93 |
> |
cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build; \ |
94 |
> |
else echo SCRAM Warning : $@ does not exist; \ |
95 |
> |
fi |
96 |
|
endif |
97 |
|
|
73 |
– |
# |
74 |
– |
# clientmakefile creation |
75 |
– |
# |
76 |
– |
$(clientmakefile):: $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile |
77 |
– |
@$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps) |
98 |
|
|
99 |
|
HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk |
100 |
|
|
120 |
|
@echo "$(subst echo_,,$@) = $($(subst echo_,,$@))" |
121 |
|
|
122 |
|
# |
123 |
+ |
# Other non-critical targets |
124 |
+ |
# |
125 |
+ |
|
126 |
+ |
TAGS: |
127 |
+ |
etags -o TAGS $(files) $(binfiles) |
128 |
+ |
|
129 |
+ |
tags: |
130 |
+ |
ctags -o tags $(files) $(binfiles) |
131 |
+ |
|
132 |
+ |
# |
133 |
+ |
# |
134 |
|
# clean targets |
135 |
|
# |
136 |
|
|
138 |
|
# it has come through the wrapper script |
139 |
|
|
140 |
|
ifdef DefaultMakefile |
141 |
< |
clean: |
141 |
> |
clean:: |
142 |
|
@echo Cleaning working folder $(workdir) |
143 |
< |
@rm -f $(LOCALTOP)/$(workdir)/* |
143 |
> |
ifdef LOCALTOP |
144 |
> |
ifdef workdir |
145 |
> |
@rm -rf $(LOCALTOP)/$(workdir)/* |
146 |
> |
endif |
147 |
> |
endif |
148 |
|
|
149 |
|
very_clean: |
150 |
|
@echo Cleaning all working folders in $(INTwork) |
151 |
|
@cd $(LOCALTOP)/$(INTwork) |
152 |
< |
@rm -rf $(LOCALTOP)/$(INTwork)/*.o |
152 |
> |
ifdef LOCALTOP |
153 |
> |
ifdef workdir |
154 |
> |
@rm -rf $(LOCALTOP)/$(INTwork)/* |
155 |
> |
endif |
156 |
> |
endif |
157 |
|
endif |