#
#  Makefile.fpc to create and group units needed for
#  tests for all targets
#

[target]
units=erroru

[install]
fpcpackage=y

[default]
fpcdir=../..


[rules]
.PHONY: rtl fcl clean

DUMMYINSTALLDIR=$(BASEDIR)/tmp
INSTALLOPT=INSTALL_PREFIX=$(DUMMYINSTALLDIR) INSTALL_UNITDIR=$(BASEDIR)

ifndef USEUNITDIR

rtl:
        $(MAKE) -C ../../rtl all "OPT=$(OPT) -n"
        $(MAKE) -C ../../rtl install $(INSTALLOPT)

fcl:
	$(MAKE) -C ../../packages/base all "OPT=$(OPT) -n"
        $(MAKE) -C ../../fcl all "OPT=$(OPT) -n"
        $(MAKE) -C ../../fcl install $(INSTALLOPT)

clean : cleanall
#        $(MAKE) -C ../../rtl clean
#        $(MAKE) -C ../../fcl clean
	$(DELTREE) $(DUMMYINSTALLDIR)

else

rtl:
        $(COPY) $(USEUNITDIR)/* .
        $(ECHO) Copied > $(FPCMADE)

fcl: rtl

clean : cleanall
	$(DELTREE) $(DUMMYINSTALLDIR)

endif



erroru$(PPUEXT): erroru.pp rtl fcl

