#
#  Makefile for FPK Pascal for Linux units.
#  December 16, 1996    Michael Van Canneyt
#

# You can configure here...

ifndef LIBINSTALLDIR
# Uncomment this if you want to set the installation directory here. 
# Otherwise it takes the one from the toplevel Makefile.
LIBINSTALLDIR = /usr/lib/ppc/0.6.5/linuxunits
endif 

# The compiler and its options can be set here. If they are set here, they
# override the ones in the units' Makefiles.
ifndef PP
PP=ppc386
endif

ifndef PPOPTS
PPOPTS= -w -q
endif

# End of configurable section...

UNITS = linux crt printer getopts
export PP PPOPTS LATEX2HTML LATEX2HTMLOPTS

help: 
	@echo 'Possible targets : '
	@echo 'units   : will make all units. These are :'
	@for f in $(UNITS); do echo '           ' $$f ; done
	@echo 'tests   : Will make all tests.'
	@echo 'all     : Will make both units and tests.'
	@echo 'install : Will install everything in (currently):'
	@echo '         ' $(INSTALLDIR)
	@echo 'clean   : Will clean up the mess.'

units: 
	@for f in $(UNITS); do cd $$f; $(MAKE) unit; cd .. ; done

tests: 
	@for f in $(UNITS); do cd $$f; $(MAKE) test; cd .. ; done

all:
	@for f in $(UNITS); do cd $$f; $(MAKE) all; cd .. ; done

clean:
	@for f in $(UNITS); do cd $$f; $(MAKE) clean; cd .. ; done

install:
	@for f in $(UNITS); do cd $$f; $(MAKE) install; cd .. ; done
