2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.41 2000/07/28 20:40:35 hollings 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 igen thread visi rtinst
23 ParadynD = pdutil igen rtinst paradynd
24 ParadynFE = pdutil igen thread paradyn
26 visiClients/tclVisi visiClients/barchart \
27 visiClients/tableVisi visiClients/phaseTable \
28 visiClients/histVisi visiClients/terrain
29 subSystems = $(ParadynD) $(ParadynFE) $(ParadynVC)
30 DyninstAPI = dyninstAPI_RT dyninstAPI dyner dyninstAPI/tests
32 # threadComps are temporary SPARC/Solaris-only thread-aware components
33 threadComps = rtinst/multi-thread-aware paradynd/multi-thread-aware
35 # "Paradyn" itself is just the list of all Paradyn components
36 Paradyn = $(basicComps) $(subSystems)
38 # "fullSystem" is the list of all Paradyn & DyninstAPI components to build:
39 # set DONT_BUILD_PARADYN or DONT_BUILD_DYNINST in make.config.local if desired
40 ifndef DONT_BUILD_PARADYN
41 fullSystem += $(Paradyn)
43 ifndef DONT_BUILD_PD_MT
44 fullSystem += $(threadComps)
45 Build_list += threadComps
48 ifndef DONT_BUILD_DYNINST
49 fullSystem += $(DyninstAPI)
50 Build_list += DyninstAPI
53 # Note that the first rule listed ("all") is what gets made by default,
54 # i.e., if make is given no arguments. Don't add other targets before all!
58 # This rule makes most of the normal recursive stuff. Just about any
59 # target can be passed down to the lower-level Makefiles by listing it
63 +@for subsystem in $(fullSystem); do \
64 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
65 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
71 # Check that the main installation directories, etc., are ready for a build,
72 # creating them if they don't already exist!
75 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST); do \
76 if [ -d $$installdir ]; then \
77 echo "Installation directory $$installdir exists..."; \
80 echo "Creating installation directory $$installdir ...";\
81 mkdir -p $$installdir; \
84 @echo "Primary compiler for Paradyn build is:"
87 # The "make world" target is set up to build things in the "correct"
88 # order for a build from scratch. It builds and installs things in the
89 # "basicComps" list first, then builds and installs the remaining
90 # Paradyn "subSystems" (excluding the currently optional DyninstAPI).
91 # NB: "make world" has also been set up locally to build the DyninstAPI,
92 # however, this is optional and can be removed if desired.
94 # This make target doesn't go first in the Makefile, though, since we
95 # really only want to make "install" when it's specifically requested.
96 # Note that "world" doesn't do a "clean", since it's nice to be able
97 # to restart a compilation that fails without re-doing a lot of
101 @echo "Build of $(BUILD_ID) starting for $(PLATFORM)!"
102 ifdef DONT_BUILD_PARADYN
103 @echo "Build of Paradyn components skipped!"
105 ifdef DONT_BUILD_PD_MT
106 @echo "Build of ParadynMT components skipped!"
108 ifdef DONT_BUILD_DYNINST
109 @echo "Build of DyninstAPI components skipped!"
113 +for target in $(Build_list); do \
114 ( $(MAKE) $$target ) || exit 1; \
116 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
118 # "make Paradyn" and "make DyninstAPI" are also useful and valid build targets!
120 Paradyn ParadynD ParadynFE ParadynVC DyninstAPI basicComps subSystems threadComps:
121 @echo "Building $@ ..."
123 +for subsystem in $($@); do \
124 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
125 if ( $(MAKE) -C $$subsystem/$(PLATFORM) all ); then \
126 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
134 @echo "Build of $@ complete."
137 # This rule passes down the documentation-related make stuff to
138 # lower-level Makefiles in the individual "docs" directories.
141 +for subsystem in $(fullSystem); do \
142 if [ -f $$subsystem/docs/Makefile ]; then \
143 $(MAKE) -C $$subsystem/docs $@; \
150 # The "make nightly" target is what should get run automatically every
151 # night. It uses "make world" to build things in the right order for
152 # a build from scratch.
154 # Note that "nightly" should only be run on the primary build site,
155 # and does things like building documentation that don't need to be
156 # built for each different architecture. Other "non-primary" build
157 # sites that run each night should just run "make clean world".
165 chmod 644 /p/paradyn/man/man?/*