1 |
williamc |
1.1 |
#
|
2 |
|
|
# Preliminaries
|
3 |
|
|
#
|
4 |
williamc |
1.3 |
LIBDIR:=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH)
|
5 |
williamc |
1.1 |
|
6 |
|
|
#
|
7 |
|
|
# Make sure nobody tries to run this directly through gmake
|
8 |
|
|
#
|
9 |
|
|
ifndef DefaultMakefile
|
10 |
|
|
all: exit
|
11 |
|
|
endif
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
#
|
15 |
|
|
# Pointing to file storage locations for the various types
|
16 |
|
|
#
|
17 |
|
|
# -- src code and unspecified types
|
18 |
|
|
VPATH:=$(LOCALTOP)/$(ClassDir):$(RELEASETOP)/$(ClassDir)
|
19 |
|
|
# -- .o files will be kept in the working directory
|
20 |
|
|
vpath %.o $(LOCALTOP)/$(workdir):$(RELEASETOP)/$(workdir)
|
21 |
|
|
|
22 |
|
|
#
|
23 |
|
|
ifdef ReqDependencies
|
24 |
|
|
always:$(LOCALTOP)/$(workdir)/PackageReqs
|
25 |
|
|
$(LOCALTOP)/$(workdir)/PackageReqs::$(ReqDependencies)
|
26 |
|
|
$(TOOL_HOME)/BuildPackageReqs $@ $?
|
27 |
|
|
endif
|
28 |
|
|
|
29 |
|
|
#
|
30 |
|
|
# Get local mods
|
31 |
|
|
#
|
32 |
|
|
ifdef LatestBuildFile
|
33 |
|
|
include ${LatestBuildFile}
|
34 |
|
|
endif
|
35 |
|
|
#
|
36 |
|
|
# get build requirements Class
|
37 |
|
|
#
|
38 |
|
|
ifdef DefaultBuildFile
|
39 |
|
|
include ${DefaultBuildFile}
|
40 |
|
|
endif
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
#
|
44 |
|
|
# get build targets
|
45 |
|
|
#
|
46 |
|
|
include ${TOOL_HOME}/toolrules.mk
|
47 |
|
|
|
48 |
|
|
#
|
49 |
|
|
# -- Some tool setups which dont yet have a home
|
50 |
|
|
#
|
51 |
|
|
CPPFLAGS += $(INCLUDEPATH)
|
52 |
|
|
|
53 |
|
|
#
|
54 |
|
|
# Site settings
|
55 |
|
|
#
|
56 |
|
|
clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
|
57 |
|
|
include $(clientmakefile)
|
58 |
|
|
|
59 |
|
|
#
|
60 |
|
|
# now add our includepath
|
61 |
|
|
#
|
62 |
|
|
INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc}
|
63 |
|
|
|
64 |
williamc |
1.5 |
#
|
65 |
|
|
# Dependency information
|
66 |
|
|
#
|
67 |
|
|
include dependencies.mk
|
68 |
|
|
|
69 |
williamc |
1.1 |
#
|
70 |
|
|
# Process Subdirs
|
71 |
|
|
#
|
72 |
|
|
ifdef SUBDIRS
|
73 |
|
|
$(SUBDIRS)::
|
74 |
|
|
@echo ------- Building ---- $@ -----------
|
75 |
williamc |
1.8 |
@cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build
|
76 |
williamc |
1.1 |
endif
|
77 |
|
|
|
78 |
|
|
#
|
79 |
|
|
# clientmakefile creation
|
80 |
|
|
#
|
81 |
williamc |
1.2 |
$(clientmakefile):: $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile
|
82 |
williamc |
1.1 |
@$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
|
83 |
|
|
|
84 |
|
|
HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
|
85 |
|
|
|
86 |
|
|
#
|
87 |
|
|
#
|
88 |
|
|
# -- Some error trapping and debug targets
|
89 |
|
|
#
|
90 |
|
|
|
91 |
|
|
dummy:
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
help:
|
95 |
|
|
@echo "Available Targets"
|
96 |
|
|
@echo "-----------------"
|
97 |
|
|
@cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
|
98 |
|
|
grep -v ':=' | grep -v 'vpath'
|
99 |
|
|
|
100 |
|
|
exit:
|
101 |
|
|
@echo "Please Use the orcabuild script. Do not use gmake directly."
|
102 |
|
|
@exit 1
|
103 |
|
|
|
104 |
|
|
echo_%:
|
105 |
|
|
@echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
|
106 |
|
|
|
107 |
|
|
#
|
108 |
|
|
# clean targets
|
109 |
|
|
#
|
110 |
|
|
|
111 |
|
|
# make sure the variables will be set before rm -r by ensuring that
|
112 |
|
|
# it has come through the wrapper script
|
113 |
|
|
|
114 |
|
|
ifdef DefaultMakefile
|
115 |
|
|
clean:
|
116 |
|
|
@echo Cleaning working folder $(workdir)
|
117 |
williamc |
1.5 |
@rm -rf $(LOCALTOP)/$(workdir)/*
|
118 |
williamc |
1.1 |
|
119 |
|
|
very_clean:
|
120 |
|
|
@echo Cleaning all working folders in $(INTwork)
|
121 |
|
|
@cd $(LOCALTOP)/$(INTwork)
|
122 |
|
|
@rm -rf $(LOCALTOP)/$(INTwork)/*.o
|
123 |
|
|
endif
|