2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.86 2008/01/24 11:20:42 jaw 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 # "basicComps" is the list of components which need to be built first
16 # with "make world", since they are used building the rest of the system.
18 # "subSystems" is the list of all other pieces which should be built
21 # "DyninstAPI" is the list of additional API components (optional).
23 basicComps = igen mrnet pdutil
24 ParadynD = pdutil igen mrnet sharedMem rtinst dyninstAPI dyninstAPI_RT paradynd
25 ParadynFE = pdthread paradyn
27 visiClients/tclVisi visiClients/barchart \
28 visiClients/tableVisi visiClients/phaseTable \
29 visiClients/histVisi visiClients/terrain \
32 subSystems = $(basicComps) $(ParadynD) $(ParadynFE) $(ParadynVC)
33 SymtabAPI = ready common symtabAPI
34 DyninstAPI = ready common symtabAPI dyninstAPI_RT dyninstAPI dyninstAPI/tests testsuite dyner codeCoverage
36 allSubdirs = $(basicComps) $(subSystems) common symtabAPI dyninstAPI dyninstAPI_RT dyninstAPI/tests testsuite dyner codeCoverage
38 # Only include the newtestsuite directory for i386 Linux. It's not ready yet
40 ifeq ($(PLATFORM),i386-unknown-linux2.4)
41 DyninstAPI += newtestsuite
42 allSubdirs += newtestsuite
45 # "fullSystem" is the list of all Paradyn & DyninstAPI components to build:
46 # set DONT_BUILD_PARADYN or DONT_BUILD_DYNINST in make.config.local if desired
47 ifndef DONT_BUILD_PARADYN
48 fullSystem += $(basicComps)
49 Build_list += basicComps
51 fullSystem += $(ParadynFE)
52 Build_list += ParadynFE
54 ifndef DONT_BUILD_DAEMON
55 fullSystem += $(ParadynD)
56 Build_list += ParadynD
58 ifndef DONT_BUILD_VISIS
59 fullSystem += $(ParadynVC)
60 Build_list += ParadynVC
64 ifndef DONT_BUILD_DYNINST
65 fullSystem += $(DyninstAPI)
66 Build_list += DyninstAPI
69 # Note that the first rule listed ("all") is what gets made by default,
70 # i.e., if make is given no arguments. Don't add other targets before all!
74 # This rule makes most of the normal recursive stuff. Just about any
75 # target can be passed down to the lower-level Makefiles by listing it
78 clean depend distclean:
79 +@for subsystem in $(fullSystem); do \
80 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
81 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
88 +@for subsystem in $(fullSystem); do \
89 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
90 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
96 # Check that the main installation directories, etc., are ready for a build,
97 # creating them if they don't already exist! Also touch make.config.local
101 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST); do \
102 if [ -d $$installdir ]; then \
103 echo "Installation directory $$installdir exists..."; \
106 echo "Creating installation directory $$installdir ...";\
107 mkdir -p $$installdir; \
111 +@if [ ! -f make.config.local ]; then \
112 touch make.config.local; \
115 +@echo "Primary compiler for Paradyn build is:"
116 +@if [ `basename $(CXX)` = "xlC" ]; then \
118 elif [ `basename $(CXX)` = "insure" ]; then \
125 # The "make world" target is set up to build things in the "correct"
126 # order for a build from scratch. It builds and installs things in the
127 # "basicComps" list first, then builds and installs the remaining
128 # Paradyn "subSystems" (excluding the currently optional DyninstAPI).
129 # NB: "make world" has also been set up locally to build the DyninstAPI,
130 # however, this is optional and can be removed if desired.
132 # This make target doesn't go first in the Makefile, though, since we
133 # really only want to make "install" when it's specifically requested.
134 # Note that "world" doesn't do a "clean", since it's nice to be able
135 # to restart a compilation that fails without re-doing a lot of
139 @echo "Build of $(BUILD_ID) starting for $(PLATFORM)!"
140 ifdef DONT_BUILD_PARADYN
141 @echo "Build of Paradyn components skipped!"
144 @echo "Build of Paradyn front-end components skipped!"
146 ifdef DONT_BUILD_DAEMON
147 @echo "Build of Paradyn daemon components skipped!"
149 ifdef DONT_BUILD_VISIS
150 @echo "Build of Paradyn visi client components skipped!"
152 ifdef DONT_BUILD_PD_MT
153 @echo "Build of ParadynMT components skipped!"
155 ifdef DONT_BUILD_DYNINST
156 @echo "Build of DyninstAPI components skipped!"
160 $(MAKE) $(fullSystem)
161 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
163 # "make Paradyn" and "make DyninstAPI" are also useful and valid build targets!
165 Paradyn ParadynD ParadynFE ParadynVC DyninstAPI SymtabAPI basicComps subSystems:
167 @echo "Build of $@ complete."
170 # Low-level directory-targets (used in the sets defined above)
171 # Explicit specification of these rules permits better parallelization
172 # than building subsystems using a for loop
174 .PHONY: $(allSubdirs)
177 @echo "Building in $@ ... "
178 $(MAKE) -C $@/$(PLATFORM)
179 $(MAKE) -C $@/$(PLATFORM) install
181 # dependencies -- keep parallel make from building out of order
182 symtabAPI igen: common
183 dyninstAPI: symtabAPI
184 paradynd: pdutil dyninstAPI
185 paradyn: pdutil pdthread
189 visiClients/tclVisi: visi
190 visiClients/barchart: visi
191 visiClients/tableVisi: visi
192 visiClients/phaseTable: visi
193 visiClients/histVisi: visi
194 visiClients/terrain: visi
195 visiClients/termWin: visi mrnet pdthread
196 dyner codeCoverage dyninstAPI/tests testsuite newtestsuite: dyninstAPI
197 rtinst: igen dyninstAPI_RT
199 # This rule passes down the documentation-related make stuff to
200 # lower-level Makefiles in the individual "docs" directories.
203 +for subsystem in $(fullSystem); do \
204 if [ -f $$subsystem/docs/Makefile ]; then \
205 $(MAKE) -C $$subsystem/docs $@; \
212 # The "make nightly" target is what should get run automatically every
213 # night. It uses "make world" to build things in the right order for
214 # a build from scratch.
216 # Note that "nightly" should only be run on the primary build site,
217 # and does things like building documentation that don't need to be
218 # built for each different architecture. Other "non-primary" build
219 # sites that run each night should just run "make clean world".
231 chmod 644 /p/paradyn/man/man?/*