mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-07 11:20:32 +01:00
that has only gcc.exe, but no cc1.exe and other support files * fix passing of arguments for win32 git-svn-id: trunk@494 -
87 lines
1.7 KiB
Makefile
87 lines
1.7 KiB
Makefile
#
|
|
# Makefile.fpc for Free Pascal units, which participates in the tests
|
|
#
|
|
|
|
[target]
|
|
|
|
[install]
|
|
fpcpackage=y
|
|
|
|
[clean]
|
|
units = erroru popuperr ptest
|
|
|
|
[compiler]
|
|
targetdir=$(FULL_TARGET)
|
|
|
|
[default]
|
|
fpcdir=../..
|
|
|
|
[rules]
|
|
.PHONY: rtl extra all clean cleanrtl clean_ctest
|
|
|
|
#############################
|
|
# RTL
|
|
#
|
|
|
|
DUMMYINSTALLDIR=$(BASEDIR)/tmp
|
|
INSTALLOPT=INSTALL_PREFIX=$(DUMMYINSTALLDIR) INSTALL_UNITDIR=$(BASEDIR)/$(COMPILER_TARGETDIR)
|
|
|
|
rtl-stamp.$(FULL_TARGET):
|
|
$(MAKE) -C ../../rtl all 'OPT=$(OPT) -n'
|
|
$(DELTREE) $(COMPILER_TARGETDIR)
|
|
$(MAKE) -C ../../rtl install $(INSTALLOPT)
|
|
$(ECHO) Compiled > rtl-stamp.$(FULL_TARGET)
|
|
|
|
cleanrtl:
|
|
$(DELTREE) $(COMPILER_TARGETDIR)
|
|
$(DELTREE) $(DUMMYINSTALLDIR)
|
|
-$(DEL) rtl-stamp.$(FULL_TARGET)
|
|
|
|
rtl : rtl-stamp.$(FULL_TARGET)
|
|
|
|
|
|
#############################
|
|
# Extra units
|
|
#
|
|
|
|
|
|
TESTOPT=-n -FE$(COMPILER_TARGETDIR) -T$(OS_TARGET) $(OPT)
|
|
ifneq ($(BINUTILSPREFIX),)
|
|
override TESTOPT+=-XP$(BINUTILSPREFIX) -Xc
|
|
endif
|
|
TESTCOMPILER=$(FPC) $(TESTOPT)
|
|
|
|
erroru$(PPUEXT) : erroru.pp
|
|
$(TESTCOMPILER) erroru.pp
|
|
|
|
ptest$(PPUEXT) : ../test/cg/ptest.pp
|
|
$(TESTCOMPILER) ../test/cg/ptest.pp
|
|
|
|
popuperr$(PPUEXT) : popuperr.pp
|
|
$(TESTCOMPILER) popuperr.pp
|
|
|
|
ifdef CCOMPILER
|
|
ctest: ../test/cg/obj/ctest.c
|
|
$(CCOMPILER) -c -o ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o ../test/cg/obj/ctest.c
|
|
else
|
|
ctest:
|
|
@$(ECHO) "No C compiler found"
|
|
@exit 1
|
|
endif
|
|
|
|
|
|
extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT)
|
|
|
|
|
|
|
|
#############################
|
|
# Main rules
|
|
#
|
|
|
|
all : rtl extra
|
|
|
|
clean : cleanrtl cleanall
|
|
|
|
clean_ctest :
|
|
-$(DEL) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o
|