2 # TopLevel Makefile for the Paradyn (and DynInstAPI) system.
4 # $Id: Makefile,v 1.32 1999/04/27 16:02:22 nash 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 = util igen thread visi hist rtinst
26 visiClients/tclVisi visiClients/barchart \
27 visiClients/tableVisi visiClients/phaseTable \
29 subSystems = $(ParadynD) $(ParadynFE) $(ParadynVC)
30 dynInstAPI = util dyninstAPI_RT dyninstAPI dyninstAPI/tests
32 # "Paradyn" itself is just the list of all Paradyn components
33 Paradyn = $(basicComps) $(subSystems)
35 # "fullSystem" is the list of all Paradyn & DynInstAPI components to build:
36 # set DONT_BUILD_PARADYN or DONT_BUILD_DYNINST in make.config.local if desired
37 ifndef DONT_BUILD_PARADYN
38 fullSystem += $(Paradyn)
41 ifndef DONT_BUILD_DYNINST
42 fullSystem += $(dynInstAPI)
43 Build_list += dynInstAPI
46 # Note that the first rule listed ("all") is what gets made by default,
47 # i.e., if make is given no arguments. Don't add other targets before all!
51 # This rule makes most of the normal recursive stuff. Just about any
52 # target can be passed down to the lower-level Makefiles by listing it
56 +@for subsystem in $(fullSystem); do \
57 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
58 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
64 # Check that the main installation directories, etc., are ready for a build,
65 # creating them if they don't already exist!
68 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST); do \
69 if [ -d $$installdir ]; then \
70 echo "Installation directory $$installdir exists..."; \
73 echo "Creating installation directory $$installdir ...";\
74 mkdir -p $$installdir; \
77 @echo "Primary compiler for Paradyn build is:"
80 # The "make world" target is set up to build things in the "correct"
81 # order for a build from scratch. It builds and installs things in the
82 # "basicComps" list first, then builds and installs the remaining
83 # Paradyn "subSystems" (excluding the currently optional dynInstAPI).
84 # NB: "make world" has also been set up locally to build the dynInstAPI,
85 # however, this is optional and can be removed if desired.
87 # This make target doesn't go first in the Makefile, though, since we
88 # really only want to make "install" when it's specifically requested.
89 # Note that "world" doesn't do a "clean", since it's nice to be able
90 # to restart a compilation that fails without re-doing a lot of
94 @echo "Build of $(BUILD_ID) starting for $(PLATFORM)!"
95 ifdef DONT_BUILD_PARADYN
96 @echo "Build of Paradyn components skipped!"
98 ifdef DONT_BUILD_DYNINST
99 @echo "Build of DynInstAPI components skipped!"
103 +for target in $(Build_list); do \
104 ( $(MAKE) $$target ) || exit 1; \
106 @echo "Build of $(BUILD_ID) complete for $(PLATFORM)!"
108 # "make Paradyn" and "make dynInstAPI" are also useful and valid build targets!
110 Paradyn ParadynD ParadynFE ParadynVC dynInstAPI basicComps subSystems:
111 @echo "Building $@ ..."
113 +for subsystem in $($@); do \
114 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
115 if ( $(MAKE) -C $$subsystem/$(PLATFORM) all ); then \
116 $(MAKE) -C $$subsystem/$(PLATFORM) install; \
124 @echo "Build of $@ complete."
127 # This rule passes down the documentation-related make stuff to
128 # lower-level Makefiles in the individual "docs" directories.
131 +for subsystem in $(fullSystem); do \
132 if [ -f $$subsystem/docs/Makefile ]; then \
133 $(MAKE) -C $$subsystem/docs $@; \
140 # The "make nightly" target is what should get run automatically every
141 # night. It uses "make world" to build things in the right order for
142 # a build from scratch.
144 # Note that "nightly" should only be run on the primary build site,
145 # and does things like building documentation that don't need to be
146 # built for each different architecture. Other "non-primary" build
147 # sites that run each night should just run "make clean world".
155 chmod 644 /p/paradyn/man/man?/*