ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.3
Committed: Fri Mar 19 13:59:32 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
Changes since 1.2: +2 -1 lines
Log Message:
Add LIBDIR for locally built libs

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