2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.47 2001/04/26 19:41:27 wxd Exp $
7 # Include the make configuration specification (site configuration options)
9 # Include additional local (re-)definitions (if available)
10 -include ./make.config.local
12 BUILD_ID = "$(SUITE_NAME) v$(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM)"
14 # "basicComps" is the list of components which need to be built first
15 # with "make world", since they are used building the rest of the system.
17 # "subSystems" is the list of all other pieces which should be built
20 # "DyninstAPI" is the list of additional API components (optional).
22 basicComps = pdutil pdutilOld igen
23 ParadynD = rtinst paradynd
24 ParadynFE = thread paradyn
26 visiClients/tclVisi visiClients/barchart \
27 visiClients/tableVisi visiClients/phaseTable \
28 visiClients/histVisi visiClients/terrain \
30 subSystems = $(ParadynD) $(ParadynFE) $(ParadynVC)
31 DyninstAPI = dyninstAPI_RT dyninstAPI dyner dyninstAPI/tests
33 # threadComps are temporary SPARC/Solaris-only thread-aware components
34 threadComps = rtinst/multi-thread-aware paradynd/multi-thread-aware
36 # "fullSystem" is the list of all Paradyn & DyninstAPI components to build:
37 # set DONT_BUILD_PARADYN or DONT_BUILD_DYNINST in make.config.local if desired
38 ifndef DONT_BUILD_PARADYN
39 fullSystem += $(basicComps)
40 Build_list += basicComps
42 fullSystem += $(ParadynFE)
43 Build_list += ParadynFE
45 ifndef DONT_BUILD_DAEMON
46 fullSystem += $(ParadynD)
47 Build_list += ParadynD
49 ifndef DONT_BUILD_VISIS
50 fullSystem += $(ParadynVC)
51 Build_list += ParadynVC
53 ifndef DONT_BUILD_PD_MT
54 fullSystem += $(threadComps)
55 Build_list += threadComps
59 ifndef DONT_BUILD_DYNINST
60 fullSystem += $(DyninstAPI)
61 Build_list += DyninstAPI
64 # Note that the first rule listed ("all") is what gets made by default,
65 # i.e., if make is given no arguments. Don't add other targets before all!
69 # This rule makes most of the normal recursive stuff. Just about any
70 # target can be passed down to the lower-level Makefiles by listing it
74 +@for subsystem in $(fullSystem); do \
75 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
76 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
82 # Check that the main installation directories, etc., are ready for a build,
83 # creating them if they don't already exist!
86 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST); do \
87 if [ -d $$installdir ]; then \
88 echo "Installation directory $$installdir exists..."; \
91 echo "Creating installation directory $$installdir ...";\
92 mkdir -p $$installdir; \
95 @echo "Primary compiler for Paradyn build is:"
98 # The "make world" target is set up to build things in the "correct"
99 # order for a build from scratch. It builds and installs things in the
100 # "basicComps" list first, then builds and installs the remaining
101 # Paradyn "subSystems" (excluding the currently optional DyninstAPI).
102 # NB: "make world" has also been set up locally to build the DyninstAPI,
103 # however, this is optional and can be removed if desired.
105 # This make target doesn't go first in the Makefile, though, since we
106 # really only want to make "install" when it's specifically requested.
107 # Note that "world" doesn't do a "clean", since it's nice to be able
108 # to restart a compilation that fails without re-doing a lot of
112 @echo "Build of $(BUILD_ID) starting for $(PLATFORM)!"
113 ifdef DONT_BUILD_PARADYN
114 @echo "Build of Paradyn components skipped!"
117 @echo "Build of Paradyn front-end components skipped!"
119 ifdef DONT_BUILD_DAEMON
120 @echo "Build of Paradyn daemon components skipped!"
122 ifdef DONT_BUILD_VISIS
123 @echo "Build of Paradyn visi client components skipped!"
125 ifdef DONT_BUILD_PD_MT
126 @echo "Build of ParadynMT components skipped!"
128 ifdef DONT_BUILD_DYNINST
129 @echo "Build of DyninstAPI components skipped!"
133 +for target in $(Build_list); do \
134 ( $(MAKE) $$target ) || exit 1; \
136 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
138 # "make Paradyn" and "make DyninstAPI" are also useful and valid build targets!
140 Paradyn ParadynD ParadynFE ParadynVC DyninstAPI basicComps subSystems threadComps:
141 @echo "Building $@ ..."
143 +for subsystem in $($@); do \
144 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
145 if ( $(MAKE) -C $$subsystem/$(PLATFORM) all ); then \
146 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
154 @echo "Build of $@ complete."
157 # This rule passes down the documentation-related make stuff to
158 # lower-level Makefiles in the individual "docs" directories.
161 +for subsystem in $(fullSystem); do \
162 if [ -f $$subsystem/docs/Makefile ]; then \
163 $(MAKE) -C $$subsystem/docs $@; \
170 # The "make nightly" target is what should get run automatically every
171 # night. It uses "make world" to build things in the right order for
172 # a build from scratch.
174 # Note that "nightly" should only be run on the primary build site,
175 # and does things like building documentation that don't need to be
176 # built for each different architecture. Other "non-primary" build
177 # sites that run each night should just run "make clean world".
185 chmod 644 /p/paradyn/man/man?/*