ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.10
Committed: Fri Mar 26 18:10:36 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: V0_4, V0_3
Changes since 1.9: +1 -1 lines
Log Message:
Binary Dependencies now work

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