Add dotted rules for embedded specific heapmgr and consoleio units

This commit is contained in:
Pierre Muller 2023-08-08 01:07:19 +02:00
parent d0103704a6
commit 037bbf006d
2 changed files with 51 additions and 28 deletions

View File

@ -894,6 +894,7 @@ SYSINIT_UNITS=
CPU_SPECIFIC_COMMON_UNITS=$(SYSUTILSUNIT) $(MATHUNIT) $(CLASSESUNIT) \
$(FGLUNIT) $(MACPASUNIT) $(TYPINFOUNIT) $(TYPESUNIT) \
$(RTLCONSTSUNIT) $(GETOPTSUNIT) $(LINEINFOUNIT)
SYSUTILS_DEPS_OS=$(HEAPMGRUNIT)$(PPUEXT)
ifeq ($(ARCH),aarch64)
CPU_UNITS=raspi3 mmio mailbox raspiuart gpio
CPU_UNITS_DEFINED=1
@ -1055,55 +1056,55 @@ endif
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph
ifeq ($(CPU_OS_TARGET),i386-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),m68k-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),powerpc-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),sparc-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),x86_64-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),arm-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),powerpc64-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),avr-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),armeb-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),mipsel-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),i8086-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),aarch64-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),wasm32-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),riscv32-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),riscv64-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),xtensa-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),z80-embedded)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
override TARGET_UNITS+=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) $(STRINGSUNIT) $(SORTBASEUNIT) $(DOSUNIT) $(CTYPESUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(SYSCONSTUNIT)
endif
ifeq ($(CPU_OS_TARGET),i386-embedded)
override TARGET_LOADERS+=$(LOADERS)
@ -2742,9 +2743,9 @@ SYSUTILS_DEPS=$(SYSUTILSDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/$(SYSUTILSUNIT)
$(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) $(SYSCONSTUNIT)$(PPUEXT) \
$(SYSUTILS_DEPS_OS) $(SYSUTILS_DEPS_CPU)
sysutils$(PPUEXT) : $(SYSUTILS_DEPS)
$(COMPILER) -Fi$(OBJPASDIR)/$(SYSUTILSUNIT) $<
$(COMPILER) -Fi$(OBJPASDIR)/sysutils $<
System.SysUtils$(PPUEXT) : $(NSINC)/System.SysUtils.pp $(SYSUTILS_DEPS)
$(COMPILER) $(SYSUTILS_OPT) -Fi$(OBJPASDIR)/sysutils $<
$(COMPILER) $(SYSUTILS_OPT) -Fi$(OBJPASDIR)/sysutils -Fi$(SYSUTILSDIR) $<
CLASSES_DEPS=$(CLASSESDIR)/classes.pp $(wildcard $(OBJPASDIR)/$(CLASSESUNIT)/*.inc) \
$(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) \
$(SYSUTILSUNIT)$(PPUEXT) $(TYPINFOUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) \
@ -3180,10 +3181,18 @@ SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS) $(INC)/softfpu.pp
FPC_SYSTEM_OPT=@system.cfg
startup$(OEXT) : $(CPU_TARGET)/startup.s
$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)startup$(OEXT) $(CPU_TARGET)/startup.s -mabi=32 -march=pic32mx -mtune=pic32mx -W -EL -msym32
consoleio$(PPUEXT) : consoleio.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $<
heapmgr$(PPUEXT) : heapmgr.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $<
CONSOLEIO_DEPS= consoleio.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
$(CONSOLEIO_DEPS_OS) $(CONSOLEIO_DEPS_CPU)
consoleio$(PPUEXT) : $(CONSOLEIO_DEPS)
$(COMPILER) $(CONSOLEIO_OPT) $<
EmbeddedApi.ConsoleIO$(PPUEXT) : $(NS)/embedded/EmbeddedApi.ConsoleIO.pp $(CONSOLEIO_DEPS)
$(COMPILER) $(CONSOLEIO_OPT) $<
HEAPMGR_DEPS= heapmgr.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
$(HEAPMGR_DEPS_OS) $(HEAPMGR_DEPS_CPU)
heapmgr$(PPUEXT) : $(HEAPMGR_DEPS)
$(COMPILER) $(HEAPMGR_OPT) $<
EmbeddedApi.HeapMGR$(PPUEXT) : $(NS)/embedded/EmbeddedApi.HeapMGR.pp $(HEAPMGR_DEPS)
$(COMPILER) $(HEAPMGR_OPT) $<
define CPU_UNITS_RULE
ifeq ($(ARCH),avr)
$(1)$(PPUEXT): $(ARCH)/$(1).pp intrinsics$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)

View File

@ -12,7 +12,7 @@ loaders=$(LOADERS)
# not all targets include enough features to build all units so
# the common units which are not compiled for all CPUs are stored in
# CPU_SPECIFIC_COMMON_UNITS
units=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas heapmgr consoleio $(CPU_SPECIFIC_COMMON_UNITS) \
units=$(SYSTEMUNIT) $(CPU_UNITS) uuchar objpas iso7185 extpas $(HEAPMGRUNIT) $(CONSOLEIOUNIT) $(CPU_SPECIFIC_COMMON_UNITS) \
# macpas iso7185 strings
$(STRINGSUNIT) \
$(SORTBASEUNIT) \
@ -71,6 +71,7 @@ CPU_SPECIFIC_COMMON_UNITS=$(SYSUTILSUNIT) $(MATHUNIT) $(CLASSESUNIT) \
$(FGLUNIT) $(MACPASUNIT) $(TYPINFOUNIT) $(TYPESUNIT) \
$(RTLCONSTSUNIT) $(GETOPTSUNIT) $(LINEINFOUNIT)
SYSUTILS_DEPS_OS=$(HEAPMGRUNIT)$(PPUEXT)
ifeq ($(ARCH),aarch64)
CPU_UNITS=raspi3 mmio mailbox raspiuart gpio
@ -277,11 +278,24 @@ startup$(OEXT) : $(CPU_TARGET)/startup.s
# Base Units (System, strings, os-dependent-base-unit)
#
consoleio$(PPUEXT) : consoleio.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $<
CONSOLEIO_DEPS= consoleio.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
$(CONSOLEIO_DEPS_OS) $(CONSOLEIO_DEPS_CPU)
consoleio$(PPUEXT) : $(CONSOLEIO_DEPS)
$(COMPILER) $(CONSOLEIO_OPT) $<
EmbeddedApi.ConsoleIO$(PPUEXT) : $(NS)/embedded/EmbeddedApi.ConsoleIO.pp $(CONSOLEIO_DEPS)
$(COMPILER) $(CONSOLEIO_OPT) $<
HEAPMGR_DEPS= heapmgr.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
$(HEAPMGR_DEPS_OS) $(HEAPMGR_DEPS_CPU)
heapmgr$(PPUEXT) : $(HEAPMGR_DEPS)
$(COMPILER) $(HEAPMGR_OPT) $<
EmbeddedApi.HeapMGR$(PPUEXT) : $(NS)/embedded/EmbeddedApi.HeapMGR.pp $(HEAPMGR_DEPS)
$(COMPILER) $(HEAPMGR_OPT) $<
heapmgr$(PPUEXT) : heapmgr.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $<
#
# Unit specific rules