ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.17.2.12
Committed: Wed Oct 6 08:31:01 1999 UTC (25 years, 7 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_9_40
Changes since 1.17.2.11: +4 -0 lines
Log Message:
Seperate groups in project configuration

File Contents

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