Browse Source

Regenerate all rtl Makefile's after last change to fpcmake.ini

Pierre Muller 3 days ago
parent
commit
cd48bd17fe

+ 6 - 1
rtl/Makefile

@@ -1734,9 +1734,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
+ifdef FPCMAKENEW
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
 	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
 	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/aix/Makefile

@@ -1958,9 +1958,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/amiga/Makefile

@@ -1985,9 +1985,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/aros/Makefile

@@ -2000,9 +2000,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/atari/Makefile

@@ -1955,9 +1955,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/beos/Makefile

@@ -1964,9 +1964,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/darwin/Makefile

@@ -2078,9 +2078,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/dragonfly/Makefile

@@ -1972,9 +1972,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/embedded/Makefile

@@ -2374,9 +2374,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/emx/Makefile

@@ -1964,9 +1964,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/freebsd/Makefile

@@ -2014,9 +2014,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/freertos/Makefile

@@ -2050,9 +2050,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/gba/Makefile

@@ -1953,9 +1953,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/go32v2/Makefile

@@ -1966,9 +1966,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/haiku/Makefile

@@ -1996,9 +1996,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/human68k/Makefile

@@ -1955,9 +1955,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/java/Makefile

@@ -1926,9 +1926,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/linux/Makefile

@@ -2573,9 +2573,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/macos/Makefile

@@ -1944,9 +1944,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/morphos/Makefile

@@ -1927,9 +1927,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/msdos/Makefile

@@ -1958,9 +1958,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/msxdos/Makefile

@@ -1928,9 +1928,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/nativent/Makefile

@@ -1934,9 +1934,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/nds/Makefile

@@ -1956,9 +1956,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/netbsd/Makefile

@@ -2066,9 +2066,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/netware/Makefile

@@ -1971,9 +1971,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/netwlibc/Makefile

@@ -1959,9 +1959,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/openbsd/Makefile

@@ -1999,9 +1999,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/os2/Makefile

@@ -1963,9 +1963,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/palmos/Makefile

@@ -1966,9 +1966,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/ps1/Makefile

@@ -1924,9 +1924,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 19 - 3
rtl/qnx/Makefile

@@ -2768,6 +2768,7 @@ STATICLIBPREFIX=libp
 IMPORTLIBPREFIX=libimp
 IMPORTLIBPREFIX=libimp
 RSTEXT=.rsj
 RSTEXT=.rsj
 EXEDBGEXT=.dbg
 EXEDBGEXT=.dbg
+ALL_EXEEXT=.exe
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 STATICLIBPREFIX=
 STATICLIBPREFIX=
 SHORTSUFFIX=v1
 SHORTSUFFIX=v1
@@ -2864,6 +2865,7 @@ ifeq ($(OS_TARGET),atari)
 EXEEXT=.ttp
 EXEEXT=.ttp
 SHORTSUFFIX=ata
 SHORTSUFFIX=ata
 endif
 endif
+ALL_EXEEXT+=.ttp
 ifeq ($(OS_TARGET),beos)
 ifeq ($(OS_TARGET),beos)
 BATCHEXT=.sh
 BATCHEXT=.sh
 EXEEXT=
 EXEEXT=
@@ -2890,6 +2892,7 @@ STATICLIBPREFIX=
 SHORTSUFFIX=nw
 SHORTSUFFIX=nw
 IMPORTLIBPREFIX=imp
 IMPORTLIBPREFIX=imp
 endif
 endif
+ALL_EXEEXT+=.nlm
 ifeq ($(OS_TARGET),netwlibc)
 ifeq ($(OS_TARGET),netwlibc)
 EXEEXT=.nlm
 EXEEXT=.nlm
 STATICLIBPREFIX=
 STATICLIBPREFIX=
@@ -2915,6 +2918,7 @@ EXEEXT=.gba
 SHAREDLIBEXT=.so
 SHAREDLIBEXT=.so
 SHORTSUFFIX=gba
 SHORTSUFFIX=gba
 endif
 endif
+ALL_EXEEXT+=.gba
 ifeq ($(OS_TARGET),symbian)
 ifeq ($(OS_TARGET),symbian)
 SHAREDLIBEXT=.dll
 SHAREDLIBEXT=.dll
 SHORTSUFFIX=symbian
 SHORTSUFFIX=symbian
@@ -2928,6 +2932,7 @@ EXEEXT=.dol
 SHAREDLIBEXT=.so
 SHAREDLIBEXT=.so
 SHORTSUFFIX=wii
 SHORTSUFFIX=wii
 endif
 endif
+ALL_EXEEXT+=.dol
 ifeq ($(OS_TARGET),aix)
 ifeq ($(OS_TARGET),aix)
 BATCHEXT=.sh
 BATCHEXT=.sh
 EXEEXT=
 EXEEXT=
@@ -2970,6 +2975,7 @@ OEXT=.rel
 endif
 endif
 SHORTSUFFIX=emb
 SHORTSUFFIX=emb
 endif
 endif
+ALL_EXEEXT+=.bin
 ifeq ($(OS_TARGET),win16)
 ifeq ($(OS_TARGET),win16)
 STATICLIBPREFIX=
 STATICLIBPREFIX=
 STATICLIBEXT=.a
 STATICLIBEXT=.a
@@ -2982,6 +2988,7 @@ endif
 ifeq ($(OS_TARGET),wasip1)
 ifeq ($(OS_TARGET),wasip1)
 EXEEXT=.wasm
 EXEEXT=.wasm
 endif
 endif
+ALL_EXEEXT+=.wasm
 ifeq ($(OS_TARGET),wasip1threads)
 ifeq ($(OS_TARGET),wasip1threads)
 EXEEXT=.wasm
 EXEEXT=.wasm
 endif
 endif
@@ -3575,6 +3582,10 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
+ifdef FPCMAKENEW
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
 	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
 	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
 	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
@@ -3582,6 +3593,7 @@ endif
 endif
 endif
 endif
 endif
 endif
 endif
+endif
 ifdef INSTALLPPUFILES
 ifdef INSTALLPPUFILES
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
 	$(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
@@ -3620,6 +3632,7 @@ override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
 endif
 endif
 ifdef CLEAN_PROGRAMS
 ifdef CLEAN_PROGRAMS
 override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
 override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
+override ALL_CLEANEXEFILES+=$(foreach lEXEEXT,$(ALL_EXEEXT),$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(lEXEEXT), $(CLEAN_PROGRAMS))))
 override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
 override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
 endif
 endif
 ifdef CLEAN_UNITS
 ifdef CLEAN_UNITS
@@ -3658,12 +3671,15 @@ ifdef LIB_NAME
 	-$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
 	-$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
 endif
 endif
 	-$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
 	-$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
-	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
+	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res symbol_order*.fpc
 	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
 	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
 fpc_cleanall: $(CLEANTARGET)
 fpc_cleanall: $(CLEANTARGET)
 ifdef CLEANEXEFILES
 ifdef CLEANEXEFILES
 	-$(DEL) $(CLEANEXEFILES)
 	-$(DEL) $(CLEANEXEFILES)
 endif
 endif
+ifdef ALL_CLEANEXEFILES
+	-$(DEL) $(ALL_CLEANEXEFILES)
+endif
 ifdef COMPILER_UNITTARGETDIR
 ifdef COMPILER_UNITTARGETDIR
 ifdef CLEANPPUFILES
 ifdef CLEANPPUFILES
 	-$(DEL) $(CLEANPPUFILES)
 	-$(DEL) $(CLEANPPUFILES)
@@ -3685,8 +3701,8 @@ ifneq ($(PPUEXT),.ppu)
 	-$(DEL) *.o *.ppu *.a
 	-$(DEL) *.o *.ppu *.a
 endif
 endif
 	-$(DELTREE) *$(SMARTEXT)
 	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) fpcmade.* Package.fpc *.fpm
-	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
+	-$(DEL) fpcmade.* Package*.fpc *.fpm
+	-$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res symbol_order*.fpc
 	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
 	-$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
 ifdef AOUTEXT
 ifdef AOUTEXT
 	-$(DEL) *$(AOUTEXT)
 	-$(DEL) *$(AOUTEXT)

+ 7 - 2
rtl/sinclairql/Makefile

@@ -1955,9 +1955,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/solaris/Makefile

@@ -1971,9 +1971,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/symbian/Makefile

@@ -1949,9 +1949,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/wasip1/Makefile

@@ -1935,9 +1935,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/wasip1threads/Makefile

@@ -1935,9 +1935,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/wasip2/Makefile

@@ -1931,9 +1931,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/watcom/Makefile

@@ -1962,9 +1962,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/wii/Makefile

@@ -1925,9 +1925,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/win16/Makefile

@@ -1961,9 +1961,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/win32/Makefile

@@ -1972,9 +1972,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/win64/Makefile

@@ -1993,9 +1993,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/wince/Makefile

@@ -1951,9 +1951,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif

+ 7 - 2
rtl/zxspectrum/Makefile

@@ -1924,9 +1924,14 @@ ifdef INSTALL_CREATEPACKAGEFPC
 ifdef FPCMAKE
 ifdef FPCMAKE
 ifdef PACKAGE_VERSION
 ifdef PACKAGE_VERSION
 ifneq ($(wildcard Makefile.fpc),)
 ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -o Package-$(TARGETSUFFIX).fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ifdef FPCMAKENEW
 	$(MKDIR) $(INSTALL_UNITDIR)
 	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package-$(TARGETSUFFIX).fpc $(INSTALL_UNITDIR)/Package.fpc
+	$(FPCMAKENEW) -o $(INSTALL_UNITDIR)/Package.fpc -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+else
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
 endif
 endif
 endif
 endif
 endif
 endif