home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-06-18 | 9.9 KB | 236 lines |
- # Top-level MiscKit Makefile Version 1.2.6
- # Originally By Mike Ferris as Part of MOKit
- # Modified by Don Yacktman for use by the MiscKit, by permission
- # Copyright (C) 1994, by Don Yacktman, all rights reserved.
-
- #########################################################################
- # Here are things that you can safely configure... #
- # 1. Where the MiscKit is installed #
- # 2. Whether or not the audio alerts are played #
- # 3. Whether or not the README is forced upon you #
- # 4. Which target architectures which are compiled #
- #########################################################################
-
- # Change root to somewhere in your account if you can't install to
- # /LocalDeveloper... Warning: do not use a ~ in ROOT; it must be absolute!
- ROOT =
-
- # Go ahead and change these to suit your taste--and patience.
- AUDIOALERTS = YES # Anything but "YES" will shut them up.
- SHOWREADME = YES # Anything but "YES" will supress automatic opening...
-
- # Below, uncomment the architectures that you want. Make sure your compiler
- # actually supports the selected architectures for it to work!
- # Comment out any that aren't useful to you or your compiler won't support.
- MOTOROLA_ARCH = m68k # Motorola (680x0) architecture
- INTEL_ARCH = i386 # Intel x86 architecture
- HP_ARCH = #hppa # PA-RISC architecture
- SPARC_ARCH = #sparc # SPARC architecture
- POWER_ARCH = #m98k # Power PC architecture. Yeah, this is wishful thinking!
- OTHER_ARCH = # Add other architectures here. Alpha? We can hope...
-
- #########################################################################
- # Don't mess with anything beyond this line or you might mess something #
- # up beyond all hope of the gods and man. Unless, of course, you #
- # actually do know what you're doing...which may be the case... #
- #########################################################################
-
- ARCHITECTURES = $(MOTOROLA_ARCH) $(INTEL_ARCH) $(HP_ARCH) \
- $(SPARC_ARCH) $(POWER_ARCH) $(OTHER_ARCH)
- ARCHIFY = /usr/lib/arch_tool -archify_list
- ARCH_FLAGS = `$(ARCHIFY) $(ARCHITECTURES)`
-
- NAME = MiscKit
- INSTALLROOT = $(ROOT)/LocalDeveloper
- DOC_INSTALL = $(INSTALLROOT)/Documentation/$(NAME)
- LIB_INSTALL = $(INSTALLROOT)/Libraries
- HEADER_INSTALL = $(INSTALLROOT)/Headers
- PALETTE_INSTALL = $(INSTALLROOT)/Palettes
- EXAMPLE_SRC_INSTALL = $(INSTALLROOT)/Examples/$(NAME)
- OLD_LIB_INSTALL = $(ROOT)/usr/local/lib
-
- # These next six targets are all that should need to be modified in
- # order to add new MiscKit resources, as long as the resource has the
- # proper Misc* prefix naming convention.
- BUNDLES = MiscFindPanel
- SUBLIBRARIES = MiscInspectorKit MiscSwapKit
- # Each of PALETTES_WITH_LIBS should only have a single .subproj!
- PALETTES_WITH_LIBS = MiscClockPalette MiscProgressPalette MiscDragViews \
- MiscThreeStateButton MiscArrowButtonPalette MiscColorWells \
- MiscValueFieldPalette MiscCircularSlider MiscLogSliderPalette\
- MiscCalendarPalette MiscSoundPalette MiscTeePalette
- PALETTES = $(PALETTES_WITH_LIBS) MiscCoolButtons MiscString
- # Examples that test the MiscKit but don't install to /LocalDeveloper/Examples
- TESTAPP_EXAMPLES = MiscLockFile MiscLogFile MiscPriorityQueue MiscString \
- DragViewTest MiscStringRegex TestExplodingMenus
- # Examples that test the MiscKit and do install to /LocalDeveloper/Examples
- EXAMPLEAPP_EXAMPLES = MiscStringService TreeView SearchBench TinyTerm \
- receiptfilter MiscTree_Browser
- # Example stuff that installs to /LocalDeveloper/Examples but doesn't compile
- EXAMPLEOTHERS = Interfaces DocTemplates
-
- include Makefiles/$(NAME).version # grabs the version number
-
- help:
- @echo ""
- @echo "************ Welcome to the $(NAME)! ************"
- @echo ""
- @echo "The following Makefile targets are available:"
- @echo " make install -- build and install the $(NAME)"
- @echo " make lib -- build the $(NAME) library"
- @echo " make bundles -- build the $(NAME) bundle projects"
- @echo " make palettes -- build the $(NAME) palette projects"
- @echo " make examples -- build the $(NAME) example applications"
- @echo " make debug -- build the $(NAME) debugging libraries"
- @echo " make all -- build all five of the above targets"
- @echo " make uninstall -- remove the $(NAME) installation"
- @echo " make distclean -- clean the $(NAME) to a pristine distribution"
- @echo " make help -- print what you see right now"
- @echo ""
- @echo "Don't forget to read the README.rtf file to catch any last"
- @echo "minute gotchas! Before installing, you should check to see"
- @echo "that you agree with the terms of the $(NAME) license as it"
- @echo "appears in License.rtf."
- @echo ""
- @echo "The $(NAME) Version $(FULL_VERSION) (C) 1994 by Don Yacktman"
- @echo ""
- @echo "Current Makefile configuration is to compile the following"
- @echo "architectures: $(ARCHITECTURES)"
-
- all: lib bundles examples palettes debug
-
- lib:
- @(if test $(SHOWREADME) = YES; then open README.rtf; fi)&
- @(if test $(AUDIOALERTS) = YES; then sndplay Makefiles/MiscBuild.snd; fi)&
- @echo "************ Library ************"
- @(cd Source; make all "TARGET_ARCHS=$(ARCHITECTURES)"; )
- @for i in $(SUBLIBRARIES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i sub-library" ; \
- (cd Source/$$i; make all "TARGET_ARCHS=$(ARCHITECTURES)"; mv *.a ..) ; \
- done ;
-
- debug:
- @echo "************ Debug Library ************"
- @(cd Source; make debug "TARGET_ARCHS=$(ARCHITECTURES)"; )
- @for i in $(SUBLIBRARIES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i sub-library" ; \
- (cd Source/$$i; make debug "TARGET_ARCHS=$(ARCHITECTURES)"; mv *.a ..) ; \
- done ;
-
- bundles:
- @echo "************ Bundles ************"
- @for i in $(BUNDLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i class bundle" ; \
- (cd Bundles/$$i; make "TARGET_ARCHS=$(ARCHITECTURES)"; ) ; \
- done ;
-
- examples: lib bundles
- @echo "************ Examples ************"
- @for i in $(TESTAPP_EXAMPLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i test app" ; \
- (cd Examples/$$i; make "TARGET_ARCHS=$(ARCHITECTURES)"; ) ; \
- done ;
- @for i in $(EXAMPLEAPP_EXAMPLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i example app" ; \
- (cd Examples/$$i; make "TARGET_ARCHS=$(ARCHITECTURES)"; ) ; \
- done ;
-
- palettes: bundles
- @echo "************ Palettes ************"
- @for i in $(PALETTES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- echo "*** Making $$i palette" ; \
- (cd Palettes/$$i; make "TARGET_ARCHS=$(ARCHITECTURES)"; ) ; \
- done ;
-
- install: lib palettes
- @echo "************ Installing $(NAME) ************"
- @echo "*** Installing libraries to $(LIB_INSTALL)"
- mkdirs $(LIB_INSTALL) $(OLD_LIB_INSTALL)
- (cd Source; tar -cf - lib*.a | (cd $(LIB_INSTALL); tar -xf - ;))
- (cd $(OLD_LIB_INSTALL); rm -rf lib*misckit*.a ; \
- ln -s $(LIB_INSTALL)/libMiscKit.a libmisckit.a; \
- ln -s $(LIB_INSTALL)/libMiscKit_g.a libmisckit_g.a; \
- ln -s $(LIB_INSTALL)/libMiscKit.a libdaymisckit.a; \
- ln -s $(LIB_INSTALL)/libMiscKit_g.a libdaymisckit_g.a; )
- for i in $(PALETTES_WITH_LIBS) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Palettes/$$i; tar -cf - *.a | \
- (cd $(LIB_INSTALL); tar -xf - ;)) ; \
- done ;
- @echo "*** Installing headers to $(HEADER_INSTALL)"
- mkdirs $(HEADER_INSTALL)
- (cd Headers; tar -cf - * | (cd $(HEADER_INSTALL); tar -xf - ;))
- for i in $(PALETTES_WITH_LIBS) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Palettes/$$i/*.subproj; cp *.h $(HEADER_INSTALL)/misckit; ) \
- done ;
- # build the precomp header
- (cd $(HEADER_INSTALL)/misckit; cc -O -g -Wall -ObjC -I$(HEADER_INSTALL) \
- -precomp $(ARCH_FLAGS) misckit.h -o misckit.p)
- @echo "*** Installing documentation to $(DOC_INSTALL)"
- rm -rf $(DOC_INSTALL)
- mkdirs $(DOC_INSTALL)
- (cd Documentation; tar -cf - * .??* | (cd $(DOC_INSTALL); tar -xf - ;))
- @echo "*** Building index for documentation ***
- ixbuild -cs $(DOC_INSTALL)
- @echo "*** Installing palettes to $(PALETTE_INSTALL)"
- mkdirs $(PALETTE_INSTALL)
- # this is inefficient speed-wise, but makes for smaller palettes than the
- # tar method because it strips them. Installs only happen once, and the
- # saved space is significant, so we'll take the hit.
- for i in $(PALETTES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Palettes/$$i; make install INSTALLDIR=$(PALETTE_INSTALL) \
- "TARGET_ARCHS=$(ARCHITECTURES)"; ) \
- done ;
- @echo "*** Installing example source code to $(EXAMPLE_SRC_INSTALL)"
- mkdirs $(EXAMPLE_SRC_INSTALL)
- (cd Examples; tar -chf - $(EXAMPLEAPP_EXAMPLES) $(EXAMPLEOTHERS) .??* | \
- (cd $(EXAMPLE_SRC_INSTALL); tar -xf - ;))
- @(if test $(AUDIOALERTS) = YES; then sndplay Makefiles/MiscFinish.snd; fi)&
-
- uninstall:
- @echo "************ Uninstalling $(NAME) ************"
- rm -rf $(LIB_INSTALL)/libMisc*.a $(OLD_LIB_INSTALL)/lib*misckit*.a \
- $(HEADER_INSTALL)/misckit \
- $(HEADER_INSTALL)/daymisckit \
- $(HEADER_INSTALL)/ExtendedApp.h \
- $(PALETTE_INSTALL)/Misc*.palette \
- $(DOC_INSTALL) $(EXAMPLE_SRC_INSTALL)
-
- distclean:
- @echo "************ Cleaning for distribution ************"
- @(cd Source; make clean; )
- @for i in $(SUBLIBRARIES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Source/$$i; make clean; ) \
- done ;
- @(cd Headers/misckit; rm -rf *.p; )
- @for i in $(BUNDLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Bundles/$$i; make clean; ) \
- done ;
- @for i in $(PALETTES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Palettes/$$i; make clean; ) \
- done ;
- @for i in $(TESTAPP_EXAMPLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Examples/$$i; make clean; ) \
- done ;
- @for i in $(EXAMPLEAPP_EXAMPLES) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Examples/$$i; make clean; ) \
- done ;
- # get rid of those pesky .dir3_0.wmd files, but keep the top level one.
- @cp .dir3_0.wmd .dir3_0.wmd~
- find ./ -name .dir3_0.wmd -print | xargs rm -f
- @cp .dir3_0.wmd~ .dir3_0.wmd
- @rm .dir3_0.wmd~
-