2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.95 2008/10/03 21:12:39 legendre Exp $
8 # Include additional local definitions (if available)
9 include ./make.config.local
10 # Include the make configuration specification (site configuration options)
13 BUILD_ID = "$(SUITE_NAME) v$(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM)"
15 allSubdirs_noinstall =
16 allCoreSubdirs = dyninstAPI_RT common dyninstAPI symtabAPI dynutil instructionAPI parseAPI
17 allSubdirs = $(allCoreSubdirs) parseThat testsuite valueAdded/sharedMem depGraphAPI stackwalk proccontrol
19 # We're not building the new test suite on all platforms yet
22 # Note that the first rule listed ("all") is what gets made by default,
23 # i.e., if make is given no arguments. Don't add other targets before all!
27 # This rule makes most of the normal recursive stuff. Just about any
28 # target can be passed down to the lower-level Makefiles by listing it
32 +@for subsystem in $(fullSystem); do \
33 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
34 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
41 +@for subsystem in $(allSubdirs); do \
42 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
43 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
50 +@for subsystem in $(fullSystem); do \
51 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
52 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
53 elif [ -f $$subsystem/Makefile ]; then \
54 $(MAKE) -C $$subsystem install; \
60 # Check that the main installation directories, etc., are ready for a build,
61 # creating them if they don't already exist! Also touch make.config.local
65 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST) $(INCLUDE_DEST); do \
66 if [ -d $$installdir ]; then \
67 echo "Installation directory $$installdir exists..."; \
70 echo "Creating installation directory $$installdir ...";\
71 mkdir -p $$installdir; \
75 +@echo "Primary compiler for Paradyn build is:"
76 +@if [ `basename $(CXX)` = "xlC" ]; then \
78 elif [ `basename $(CXX)` = "insure" ]; then \
86 # The "make world" target is set up to build things in the "correct"
87 # order for a build from scratch. It builds and installs things in the
88 # "basicComps" list first, then builds and installs the remaining
89 # Paradyn "subSystems" (excluding the currently optional DyninstAPI).
90 # NB: "make world" has also been set up locally to build the DyninstAPI,
91 # however, this is optional and can be removed if desired.
93 # This make target doesn't go first in the Makefile, though, since we
94 # really only want to make "install" when it's specifically requested.
95 # Note that "world" doesn't do a "clean", since it's nice to be able
96 # to restart a compilation that fails without re-doing a lot of
100 @echo "Build of $(BUILD_ID) on $(PLATFORM) for $(DEFAULT_COMPONENT): $(fullSystem)"
103 $(MAKE) $(fullSystem)
104 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
106 # "make Paradyn" and "make DyninstAPI" are also useful and valid build targets!
108 DyninstAPI SymtabAPI StackwalkerAPI basicComps subSystems testsuites InstructionAPI ValueAdded DepGraphAPI ParseAPI DataflowAPI ProcControlAPI:
110 @echo "Build of $@ complete."
113 # Low-level directory-targets (used in the sets defined above)
114 # Explicit specification of these rules permits better parallelization
115 # than building subsystems using a for loop
117 .PHONY: $(allSubdirs) $(allSubdirs_noinstall)
120 @if [ -f $@/$(PLATFORM)/Makefile ]; then \
121 $(MAKE) -C $@/$(PLATFORM); \
122 elif [ -f $@/Makefile ]; then \
125 echo $@ has no Makefile; \
129 $(allSubdirs_noinstall):
130 +@if [ -f $@/$(PLATFORM)/Makefile ]; then \
131 $(MAKE) -C $@/$(PLATFORM); \
132 elif [ -f $@/Makefile ]; then \
135 echo $@ has no Makefile; \
139 # Generate targets of the form install_<target> for all directories in
140 # allSubdirs_noinstall
141 allSubdirs_explicitInstall = $(patsubst %,install_%,$(allSubdirs_noinstall))
142 coreSubdirs_explicitInstall = $(patsubst %,install_%,$(allCoreSubdirs))
144 $(allSubdirs_explicitInstall): install_%: %
145 +@if [ -f $(@:install_%=%)/$(PLATFORM)/Makefile ]; then \
146 $(MAKE) -C $(@:install_%=%)/$(PLATFORM) install; \
147 elif [ -f $(@:install_%=%)/Makefile ]; then \
148 $(MAKE) -C $(@:install_%=%) install; \
150 echo $(@:install_%=%) has no Makefile; \
155 $(coreSubdirs_explicitInstall): install_%: %
156 +@if [ -f $(@:install_%=%)/$(PLATFORM)/Makefile ]; then \
157 $(MAKE) -C $(@:install_%=%)/$(PLATFORM) install; \
158 elif [ -f $(@:install_%=%)/Makefile ]; then \
159 $(MAKE) -C $(@:install_%=%) install; \
161 echo $(@:install_%=%) has no Makefiles; \
164 # dependencies -- keep parallel make from building out of order
165 symtabAPI igen: common
166 stackwalk: symtabAPI dynutil
167 dyninstAPI: symtabAPI instructionAPI parseAPI common dynutil
168 instructionAPI: common dynutil
169 symtabAPI dyninstAPI: dynutil
170 dyner codeCoverage: dyninstAPI
171 parseThat: $(coreSubdirs_explicitInstall)
172 proccontrol: common dynutil
173 parseAPI: symtabAPI instructionAPI common dynutil
174 #depGraphAPI: instructionAPI $(coreSubdirs_explicitInstall)
175 # depGraphAPI: instructionAPI dyninstAPI
177 # This rule passes down the documentation-related make stuff to
178 # lower-level Makefiles in the individual "docs" directories.
181 +for subsystem in $(fullSystem); do \
182 if [ -f $$subsystem/docs/Makefile ]; then \
183 $(MAKE) -C $$subsystem/docs $@; \
190 # The "make nightly" target is what should get run automatically every
191 # night. It uses "make world" to build things in the right order for
192 # a build from scratch.
194 # Note that "nightly" should only be run on the primary build site,
195 # and does things like building documentation that don't need to be
196 # built for each different architecture. Other "non-primary" build
197 # sites that run each night should just run "make clean world".
201 $(MAKE) DyninstAPI ValueAdded
203 # Used for UW nightly builds
204 nightly: all ValueAdded
205 $(MAKE) -C testsuite/$(PLATFORM) all
210 ## $(MAKE) DyninstAPI
212 # $(MAKE) install-man
213 # chmod 644 /p/paradyn/man/man?/*