ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.17.2.7
Committed: Tue Sep 14 13:52:42 1999 UTC (25 years, 8 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31
Changes since 1.17.2.6: +1 -1 lines
Log Message:
Add CXXUSERFLAGS

File Contents

# User Rev Content
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 williamc 1.17.2.7 CXXFLAGS+=$(CXXUSERFLAGS)
7 williamc 1.17.2.6
8 williamc 1.1 #
9     # Make sure nobody tries to run this directly through gmake
10     #
11     ifndef DefaultMakefile
12     all: exit
13     endif
14    
15 williamc 1.14 # -- storage of libraries
16     librarystore:=$(LOCALTOP)/$(INTlib)
17 williamc 1.15
18 williamc 1.14 libsavaillocal=$(notdir $(wildcard $(librarystore)/*))
19     libsavailbase=$(notdir $(wildcard $(RELEASETOP)/$(INTlib)/*))
20     libsavail=$(sort $(libsavailbase) $(libsavaillocal))
21     libslocal=$(foreach var,$(lib),$(filter lib$(var).a, $(libsavail)))
22     libslocal_I=$(foreach var,$(lib_I),$(filter lib$(var).a, $(libsavail)))
23     libslocal_d=$(foreach var,$(lib_d),$(filter lib$(var).a, $(libsavail)))
24 williamc 1.1
25     #
26     # Pointing to file storage locations for the various types
27     #
28     # -- src code and unspecified types
29     VPATH:=$(LOCALTOP)/$(ClassDir):$(RELEASETOP)/$(ClassDir)
30     # -- .o files will be kept in the working directory
31     vpath %.o $(LOCALTOP)/$(workdir):$(RELEASETOP)/$(workdir)
32    
33     #
34     ifdef ReqDependencies
35     always:$(LOCALTOP)/$(workdir)/PackageReqs
36 williamc 1.11 $(LOCALTOP)/$(workdir)/PackageReqs:$(ReqDependencies)
37 williamc 1.1 $(TOOL_HOME)/BuildPackageReqs $@ $?
38     endif
39    
40     #
41     # Get local mods
42     #
43     ifdef LatestBuildFile
44     include ${LatestBuildFile}
45     endif
46 williamc 1.17.2.2
47 williamc 1.1 #
48     # get build requirements Class
49     #
50     ifdef DefaultBuildFile
51     include ${DefaultBuildFile}
52     endif
53    
54 williamc 1.9 #
55     # Site settings
56     #
57     clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
58 williamc 1.17 -include $(clientmakefile)
59 williamc 1.1
60     #
61     # get build targets
62     #
63 williamc 1.9 include ${TOOL_HOME}/compilers.mk
64 williamc 1.1 include ${TOOL_HOME}/toolrules.mk
65    
66 williamc 1.9
67 williamc 1.1 #
68     # -- Some tool setups which dont yet have a home
69     #
70     CPPFLAGS += $(INCLUDEPATH)
71    
72    
73     #
74     # now add our includepath
75     #
76     INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc}
77    
78 williamc 1.5 #
79     # Dependency information
80     #
81 williamc 1.9 -include dependencies.mk
82 williamc 1.5
83 williamc 1.1 #
84     # Process Subdirs
85     #
86     ifdef SUBDIRS
87 williamc 1.12 $(SUBDIRS)::
88 williamc 1.1 @echo ------- Building ---- $@ -----------
89 williamc 1.17.2.3 @if [ -d $(LOCALTOP)/$(ClassDir)/$@ ]; then \
90 williamc 1.17.2.2 cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build; \
91 williamc 1.17.2.3 else echo SCRAM Warning : $@ does not exist; \
92 williamc 1.17.2.2 fi
93 williamc 1.1 endif
94    
95     #
96     # clientmakefile creation
97     #
98 williamc 1.11 $(clientmakefile): $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile
99 williamc 1.1 @$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
100    
101     HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
102    
103     #
104     #
105     # -- Some error trapping and debug targets
106     #
107    
108     dummy:
109    
110    
111     help:
112     @echo "Available Targets"
113     @echo "-----------------"
114     @cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
115     grep -v ':=' | grep -v 'vpath'
116    
117     exit:
118     @echo "Please Use the orcabuild script. Do not use gmake directly."
119     @exit 1
120    
121     echo_%:
122     @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
123    
124     #
125 williamc 1.17.2.5 # Other non-critical targets
126     #
127    
128     TAGS:
129     etags -o TAGS $(files) $(binfiles)
130    
131     tags:
132     ctags -o tags $(files) $(binfiles)
133    
134     #
135     #
136 williamc 1.1 # clean targets
137     #
138    
139     # make sure the variables will be set before rm -r by ensuring that
140     # it has come through the wrapper script
141    
142     ifdef DefaultMakefile
143 williamc 1.10 clean::
144 williamc 1.1 @echo Cleaning working folder $(workdir)
145 williamc 1.17.2.1 ifdef LOCALTOP
146     ifdef workdir
147 williamc 1.17.2.4 @rm -rf $(LOCALTOP)/$(workdir)/*
148 williamc 1.17.2.1 endif
149     endif
150 williamc 1.1
151     very_clean:
152     @echo Cleaning all working folders in $(INTwork)
153     @cd $(LOCALTOP)/$(INTwork)
154 williamc 1.17.2.1 ifdef LOCALTOP
155     ifdef workdir
156 williamc 1.1 @rm -rf $(LOCALTOP)/$(INTwork)/*.o
157 williamc 1.17.2.1 endif
158     endif
159 williamc 1.1 endif