2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.49 2001/10/30 23:10:01 gaburici 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
32 #DyninstAPI = dyninstAPI_RT dyninstAPI dyninstAPI/tests
34 # threadComps are temporary SPARC/Solaris-only thread-aware components
35 threadComps = rtinst/multi-thread-aware paradynd/multi-thread-aware
37 # "fullSystem" is the list of all Paradyn & DyninstAPI components to build:
38 # set DONT_BUILD_PARADYN or DONT_BUILD_DYNINST in make.config.local if desired
39 ifndef DONT_BUILD_PARADYN
40 fullSystem += $(basicComps)
41 Build_list += basicComps
43 fullSystem += $(ParadynFE)
44 Build_list += ParadynFE
46 ifndef DONT_BUILD_DAEMON
47 fullSystem += $(ParadynD)
48 Build_list += ParadynD
50 ifndef DONT_BUILD_VISIS
51 fullSystem += $(ParadynVC)
52 Build_list += ParadynVC
54 ifndef DONT_BUILD_PD_MT
55 fullSystem += $(threadComps)
56 Build_list += threadComps
60 ifndef DONT_BUILD_DYNINST
61 fullSystem += $(DyninstAPI)
62 Build_list += DyninstAPI
65 # Note that the first rule listed ("all") is what gets made by default,
66 # i.e., if make is given no arguments. Don't add other targets before all!
70 # This rule makes most of the normal recursive stuff. Just about any
71 # target can be passed down to the lower-level Makefiles by listing it
75 +@for subsystem in $(fullSystem); do \
76 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
77 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
83 # Check that the main installation directories, etc., are ready for a build,
84 # creating them if they don't already exist!
87 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST); do \
88 if [ -d $$installdir ]; then \
89 echo "Installation directory $$installdir exists..."; \
92 echo "Creating installation directory $$installdir ...";\
93 mkdir -p $$installdir; \
96 @echo "Primary compiler for Paradyn build is:"
99 # The "make world" target is set up to build things in the "correct"
100 # order for a build from scratch. It builds and installs things in the
101 # "basicComps" list first, then builds and installs the remaining
102 # Paradyn "subSystems" (excluding the currently optional DyninstAPI).
103 # NB: "make world" has also been set up locally to build the DyninstAPI,
104 # however, this is optional and can be removed if desired.
106 # This make target doesn't go first in the Makefile, though, since we
107 # really only want to make "install" when it's specifically requested.
108 # Note that "world" doesn't do a "clean", since it's nice to be able
109 # to restart a compilation that fails without re-doing a lot of
113 @echo "Build of $(BUILD_ID) starting for $(PLATFORM)!"
114 ifdef DONT_BUILD_PARADYN
115 @echo "Build of Paradyn components skipped!"
118 @echo "Build of Paradyn front-end components skipped!"
120 ifdef DONT_BUILD_DAEMON
121 @echo "Build of Paradyn daemon components skipped!"
123 ifdef DONT_BUILD_VISIS
124 @echo "Build of Paradyn visi client components skipped!"
126 ifdef DONT_BUILD_PD_MT
127 @echo "Build of ParadynMT components skipped!"
129 ifdef DONT_BUILD_DYNINST
130 @echo "Build of DyninstAPI components skipped!"
134 +for target in $(Build_list); do \
135 ( $(MAKE) $$target ) || exit 1; \
137 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
139 # "make Paradyn" and "make DyninstAPI" are also useful and valid build targets!
141 Paradyn ParadynD ParadynFE ParadynVC DyninstAPI basicComps subSystems threadComps:
142 @echo "Building $@ ..."
144 +for subsystem in $($@); do \
145 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
146 if ( $(MAKE) -C $$subsystem/$(PLATFORM) all ); then \
147 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
155 @echo "Build of $@ complete."
158 # This rule passes down the documentation-related make stuff to
159 # lower-level Makefiles in the individual "docs" directories.
162 +for subsystem in $(fullSystem); do \
163 if [ -f $$subsystem/docs/Makefile ]; then \
164 $(MAKE) -C $$subsystem/docs $@; \
171 # The "make nightly" target is what should get run automatically every
172 # night. It uses "make world" to build things in the right order for
173 # a build from scratch.
175 # Note that "nightly" should only be run on the primary build site,
176 # and does things like building documentation that don't need to be
177 # built for each different architecture. Other "non-primary" build
178 # sites that run each night should just run "make clean world".
186 chmod 644 /p/paradyn/man/man?/*