
#
# Portable Object Compiler (c) 1996, 97. All Rights Reserved.
#

CD=cd
RM=rm
@SET_MAKE@
MKDIR=mkdir
TAR=@TAR@
TARARGS=@TARARGS@
INSTALLDIR=@INSTALLDIR@

default : compiler

compiler : objcrt objpak oclib objc

objcrt ::
	$(CD) src; $(CD) objcrt; $(MAKE)

objpak ::
	$(CD) src; $(CD) objpak; $(MAKE)

oclib ::
	$(CD) src; $(CD) oclib;  $(MAKE)

objc ::
	$(CD) src; $(CD) objc;   $(MAKE)

cakit ::
	$(CD) src; $(CD) cakit;  $(MAKE)

shlib ::
	$(CD) src; $(CD) objcrt; $(MAKE) shlib
	$(CD) src; $(CD) objpak; $(MAKE) shlib

bootstrap :
	-$(CD) src; $(CD) objcrt; $(MAKE) bootstrap
	-$(CD) src; $(CD) objpak; $(MAKE) bootstrap
	-$(CD) src; $(CD) objc;   $(MAKE) bootstrap
	-$(CD) src; $(CD) cakit;  $(MAKE) bootstrap

#
# tags file (vi -t isEqual , for example, brings you to isEqual)
# control-] for a classname also works.
#

tags :
	gawk -f ctags.awk src/objcrt/*.m src/objpak/*.m src/oclib/*.m > tags

#
# UNIX install.
#

install : bootstrap
	test -d $(INSTALLDIR) || $(MKDIR) $(INSTALLDIR)
	$(TAR) cf - $(TARARGS) bin lib man include | ( $(CD) ${INSTALLDIR}; $(TAR) xvf - $(TARARGS))

cleantmp :
	-$(CD) src; $(CD) objcrt; $(MAKE) cleantmp
	-$(CD) src; $(CD) objpak; $(MAKE) cleantmp
	-$(CD) src; $(CD) oclib;  $(MAKE) cleantmp
	-$(CD) src; $(CD) objc;   $(MAKE) cleantmp
	-$(CD) src; $(CD) cakit;  $(MAKE) cleantmp
	-$(CD) examples;          $(MAKE) cleantmp
	-$(CD) words;             $(MAKE) cleantmp

clean :
	-$(CD) src; $(CD) objcrt; $(MAKE) clean
	-$(CD) src; $(CD) objpak; $(MAKE) clean
	-$(CD) src; $(CD) oclib;  $(MAKE) clean
	-$(CD) src; $(CD) objc;   $(MAKE) clean
	-$(CD) src; $(CD) cakit;  $(MAKE) clean
	-$(CD) examples;          $(MAKE) clean
	-$(CD) words;             $(MAKE) clean

distclean :
	-$(RM) Makefile makeLibs tags
	-$(RM) config.h config.cache config.log config.status
	-$(CD) src; $(CD) objcrt; $(MAKE) distclean
	-$(CD) src; $(CD) objpak; $(MAKE) distclean
	-$(CD) src; $(CD) oclib;  $(MAKE) distclean
	-$(CD) src; $(CD) objc;   $(MAKE) distclean
	-$(CD) src; $(CD) cakit;  $(MAKE) distclean
	-$(CD) examples;          $(MAKE) distclean
	-$(CD) words;             $(MAKE) distclean



