ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.1
Committed: Mon Mar 1 10:37:54 1999 UTC (26 years, 2 months ago) by williamc
Branch: MAIN
Log Message:
Initial setup

File Contents

# User Rev Content
1 williamc 1.1 #
2     # Preliminaries
3     #
4    
5     #
6     # Make sure nobody tries to run this directly through gmake
7     #
8     ifndef DefaultMakefile
9     all: exit
10     endif
11    
12    
13     #
14     # Pointing to file storage locations for the various types
15     #
16     # -- src code and unspecified types
17     VPATH:=$(LOCALTOP)/$(ClassDir):$(RELEASETOP)/$(ClassDir)
18     # -- .o files will be kept in the working directory
19     vpath %.o $(LOCALTOP)/$(workdir):$(RELEASETOP)/$(workdir)
20    
21     #
22     ifdef ReqDependencies
23     always:$(LOCALTOP)/$(workdir)/PackageReqs
24     $(LOCALTOP)/$(workdir)/PackageReqs::$(ReqDependencies)
25     $(TOOL_HOME)/BuildPackageReqs $@ $?
26     endif
27    
28     #
29     # Get local mods
30     #
31     ifdef LatestBuildFile
32     include ${LatestBuildFile}
33     endif
34     #
35     # get build requirements Class
36     #
37     ifdef DefaultBuildFile
38     include ${DefaultBuildFile}
39     endif
40    
41    
42     #
43     # get build targets
44     #
45     include ${TOOL_HOME}/toolrules.mk
46    
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     #
65     # Process Subdirs
66     #
67     ifdef SUBDIRS
68     $(SUBDIRS)::
69     @echo ------- Building ---- $@ -----------
70     cd $(LOCALTOP)/$(THISDIR)/$@; $(TOOL_HOME)/scram build
71     endif
72    
73     #
74     # clientmakefile creation
75     #
76     $(clientmakefile): $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(projdeps) $(TOOL_HOME)/ProcessSiteFile
77     @$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
78    
79     HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
80    
81     #
82     #
83     # -- Some error trapping and debug targets
84     #
85    
86     dummy:
87    
88    
89     help:
90     @echo "Available Targets"
91     @echo "-----------------"
92     @cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
93     grep -v ':=' | grep -v 'vpath'
94    
95     exit:
96     @echo "Please Use the orcabuild script. Do not use gmake directly."
97     @exit 1
98    
99     echo_%:
100     @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
101    
102     #
103     # clean targets
104     #
105    
106     # make sure the variables will be set before rm -r by ensuring that
107     # it has come through the wrapper script
108    
109     ifdef DefaultMakefile
110     clean:
111     @echo Cleaning working folder $(workdir)
112     @rm -f $(LOCALTOP)/$(workdir)/*
113    
114     very_clean:
115     @echo Cleaning all working folders in $(INTwork)
116     @cd $(LOCALTOP)/$(INTwork)
117     @rm -rf $(LOCALTOP)/$(INTwork)/*.o
118     endif