home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-03-29 | 8.9 KB | 217 lines |
- # Top-level MiscKit Makefile Version 1.2.2
- #
- # 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.
-
- # Warning: do not use a tilde in ROOT: it must be absolute!
- ROOT =
- INSTALLROOT = $(ROOT)/LocalDeveloper
-
- NAME = MiscKit
- AUDIOALERTS = YES # Anything but "YES" will shut them up.
-
- # Put the architectures that you want on this line. For the main library,
- # right now you will have to also modify the line in the Makefile (Source
- # directory) to get the library to have the same architectures. Eventually
- # this flag will be used by that Makefile as well.
- ARCHITECTURES = m68k i386
-
- 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 and doesn't require links in
- # the Headers directory like the MiscFindPanel project does.
- 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
- 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
- # 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
-
- # These are a special case and need to be dealt with in a special way in
- # the install target. Look there and note how they are handled!
- LINKED_HEADERS = MiscSearchText.h MiscTBMK.h SearchableText.h regexpr.h
-
- include Makefiles/MiscKit.version # grabs the version number
-
- help:
- @echo ""
- @echo "************ Welcome to the MiscKit! ************"
- @echo ""
- @echo "The following Makefile targets are available:"
- @echo " make install -- build and install the MiscKit"
- @echo " make lib -- build the MiscKit library"
- @echo " make bundles -- build the MiscKit bundle projects"
- @echo " make palettes -- build the MiscKit palette projects"
- @echo " make examples -- build the MiscKit example epplications"
- @echo " make all -- build all four of the above targets"
- @echo " make uninstall -- remove the MiscKit installation"
- @echo " make distclean -- clean the MiscKit 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 MiscKit license as it"
- @echo "appears in License.rtf."
- @echo ""
- @echo "The MiscKit Version $(FULL_VERSION) (C) 1994 by Don Yacktman"
- @echo ""
-
- all: lib bundles examples palettes
-
- lib:
- @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 ;
-
- 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 MiscKit ************"
- @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 $(LINKED_HEADERS) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (rm -rf $(HEADER_INSTALL)/misckit/$$i ; ) \
- done ;
- for i in $(PALETTES_WITH_LIBS) none ; do \
- if [ $$i = none ] ; then continue; fi; \
- (cd Palettes/$$i/*.subproj; cp *.h $(HEADER_INSTALL)/misckit; ) \
- done ;
- # Note that if you are handling linked headers, you'll need a special copy
- # here to copy the header to the destination header directory! This is
- # NOT set up automatically above via the targets
- (cd Projects/MiscFindPanel/SearchCategories; \
- tar -cf - *.h | (cd $(HEADER_INSTALL)/misckit; tar -xf - ;))
- (cd Projects/MiscFindPanel/MiscFindPanel; \
- tar -cf - S*.h | (cd $(HEADER_INSTALL)/misckit; tar -xf - ;))
- # build the precomp header -- ***** need to use ARCHITECTURES here!
- (cd $(HEADER_INSTALL)/misckit; cc -O -g -Wall -ObjC -precomp -arch i386\
- -arch m68k 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 - ;))
- # SearchBench is a link, so we need to treat it special
- # @rm $(EXAMPLE_SRC_INSTALL)/SearchBench
- # @(cd Projects/MiscFindPanel; tar -chf - SearchBench | \
- # (cd $(EXAMPLE_SRC_INSTALL); tar -xf - ;))
- @if test $(AUDIOALERTS) = YES; then sndplay Makefiles/MiscFinish.snd; fi
-
- uninstall:
- @echo "************ Uninstalling MiscKit ************"
- 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~
-