ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.15
Committed: Thu Apr 1 17:28:45 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: V0_6
Changes since 1.14: +1 -0 lines
Log Message:
Correct debug files

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     #
7     # Make sure nobody tries to run this directly through gmake
8     #
9     ifndef DefaultMakefile
10     all: exit
11     endif
12    
13 williamc 1.14 # -- storage of libraries
14     librarystore:=$(LOCALTOP)/$(INTlib)
15     vpath %.$(SharedSuffix) $(librarystore):$(RELEASETOP)/$(INTlib)
16     vpath %.$(ArchiveSuffix) $(librarystore):$(RELEASETOP)/$(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     #
47     # get build requirements Class
48     #
49     ifdef DefaultBuildFile
50     include ${DefaultBuildFile}
51     endif
52    
53 williamc 1.9 #
54     # Site settings
55     #
56     clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
57     include $(clientmakefile)
58 williamc 1.1
59     #
60     # get build targets
61     #
62 williamc 1.9 include ${TOOL_HOME}/compilers.mk
63 williamc 1.1 include ${TOOL_HOME}/toolrules.mk
64    
65 williamc 1.9
66 williamc 1.1 #
67     # -- Some tool setups which dont yet have a home
68     #
69     CPPFLAGS += $(INCLUDEPATH)
70    
71    
72     #
73     # now add our includepath
74     #
75     INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc}
76    
77 williamc 1.5 #
78     # Dependency information
79     #
80 williamc 1.9 -include dependencies.mk
81 williamc 1.5
82 williamc 1.1 #
83     # Process Subdirs
84     #
85     ifdef SUBDIRS
86 williamc 1.12 $(SUBDIRS)::
87 williamc 1.1 @echo ------- Building ---- $@ -----------
88 williamc 1.8 @cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build
89 williamc 1.1 endif
90    
91     #
92     # clientmakefile creation
93     #
94 williamc 1.11 $(clientmakefile): $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile
95 williamc 1.1 @$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
96    
97     HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
98    
99     #
100     #
101     # -- Some error trapping and debug targets
102     #
103    
104     dummy:
105    
106    
107     help:
108     @echo "Available Targets"
109     @echo "-----------------"
110     @cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
111     grep -v ':=' | grep -v 'vpath'
112    
113     exit:
114     @echo "Please Use the orcabuild script. Do not use gmake directly."
115     @exit 1
116    
117     echo_%:
118     @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
119    
120     #
121     # clean targets
122     #
123    
124     # make sure the variables will be set before rm -r by ensuring that
125     # it has come through the wrapper script
126    
127     ifdef DefaultMakefile
128 williamc 1.10 clean::
129 williamc 1.1 @echo Cleaning working folder $(workdir)
130 williamc 1.13 @rm -rf $(LOCALTOP)/$(workdir)/.* $(LOCALTOP)/$(workdir)/*
131 williamc 1.1
132     very_clean:
133     @echo Cleaning all working folders in $(INTwork)
134     @cd $(LOCALTOP)/$(INTwork)
135     @rm -rf $(LOCALTOP)/$(INTwork)/*.o
136     endif