浏览代码

* Converted fpmkunit and the packages it depends on to fpmake building.
Hash, paszlib, fcl-process and fpmkunit itself are build using
fpmkunit_bootstrap. The fpmkunit-Makefile.fpc still contains dependencies
on hash,paszlib and fcl-process because the packages depending on fpmkunit
needs those. For fpmkunit itself those dependencies are ignored by directly
setting the unit-search path to the rtl-unit search path.

git-svn-id: trunk@20115 -

joost 13 年之前
父节点
当前提交
4bb05b21ed

+ 5 - 0
.gitattributes

@@ -2236,6 +2236,7 @@ packages/fcl-passrc/tests/testpassrc.lpi svneol=native#text/plain
 packages/fcl-passrc/tests/testpassrc.lpr svneol=native#text/plain
 packages/fcl-passrc/tests/testpassrc.lpr svneol=native#text/plain
 packages/fcl-process/Makefile svneol=native#text/plain
 packages/fcl-process/Makefile svneol=native#text/plain
 packages/fcl-process/Makefile.fpc svneol=native#text/plain
 packages/fcl-process/Makefile.fpc svneol=native#text/plain
+packages/fcl-process/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-process/fpmake.pp svneol=native#text/plain
 packages/fcl-process/fpmake.pp svneol=native#text/plain
 packages/fcl-process/src/dbugintf.pp svneol=native#text/plain
 packages/fcl-process/src/dbugintf.pp svneol=native#text/plain
 packages/fcl-process/src/dbugmsg.pp svneol=native#text/plain
 packages/fcl-process/src/dbugmsg.pp svneol=native#text/plain
@@ -2782,6 +2783,7 @@ packages/fpmake_add.inc svneol=native#text/plain
 packages/fpmake_proc.inc svneol=native#text/plain
 packages/fpmake_proc.inc svneol=native#text/plain
 packages/fpmkunit/Makefile svneol=native#text/plain
 packages/fpmkunit/Makefile svneol=native#text/plain
 packages/fpmkunit/Makefile.fpc svneol=native#text/plain
 packages/fpmkunit/Makefile.fpc svneol=native#text/plain
+packages/fpmkunit/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain
 packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain
 packages/fpmkunit/fpmake.pp svneol=native#text/plain
 packages/fpmkunit/fpmake.pp svneol=native#text/plain
 packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
 packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
@@ -3667,6 +3669,7 @@ packages/gtk2/src/pango/pangoutils.pas svneol=native#text/plain
 packages/gtk2/src/pangocairo/pangocairo.pas svneol=native#text/plain
 packages/gtk2/src/pangocairo/pangocairo.pas svneol=native#text/plain
 packages/hash/Makefile svneol=native#text/plain
 packages/hash/Makefile svneol=native#text/plain
 packages/hash/Makefile.fpc svneol=native#text/plain
 packages/hash/Makefile.fpc svneol=native#text/plain
+packages/hash/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/hash/examples/Makefile svneol=native#text/plain
 packages/hash/examples/Makefile svneol=native#text/plain
 packages/hash/examples/Makefile.fpc svneol=native#text/plain
 packages/hash/examples/Makefile.fpc svneol=native#text/plain
 packages/hash/examples/crctest.pas svneol=native#text/plain
 packages/hash/examples/crctest.pas svneol=native#text/plain
@@ -5677,6 +5680,7 @@ packages/pasjpeg/src/jutils.pas svneol=native#text/plain
 packages/pasjpeg/src/pasjpeg.pas svneol=native#text/plain
 packages/pasjpeg/src/pasjpeg.pas svneol=native#text/plain
 packages/paszlib/Makefile svneol=native#text/plain
 packages/paszlib/Makefile svneol=native#text/plain
 packages/paszlib/Makefile.fpc svneol=native#text/plain
 packages/paszlib/Makefile.fpc svneol=native#text/plain
+packages/paszlib/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/paszlib/examples/Makefile svneol=native#text/plain
 packages/paszlib/examples/Makefile svneol=native#text/plain
 packages/paszlib/examples/Makefile.fpc svneol=native#text/plain
 packages/paszlib/examples/Makefile.fpc svneol=native#text/plain
 packages/paszlib/examples/example.pas svneol=native#text/plain
 packages/paszlib/examples/example.pas svneol=native#text/plain
@@ -6578,6 +6582,7 @@ packages/uuid/src/libuuid.pp svneol=native#text/plain
 packages/uuid/src/macuuid.pp svneol=native#text/plain
 packages/uuid/src/macuuid.pp svneol=native#text/plain
 packages/winceunits/Makefile svneol=native#text/plain
 packages/winceunits/Makefile svneol=native#text/plain
 packages/winceunits/Makefile.fpc svneol=native#text/plain
 packages/winceunits/Makefile.fpc svneol=native#text/plain
+packages/winceunits/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/winceunits/fpmake.pp svneol=native#text/plain
 packages/winceunits/fpmake.pp svneol=native#text/plain
 packages/winceunits/src/aygshell.pp svneol=native#text/plain
 packages/winceunits/src/aygshell.pp svneol=native#text/plain
 packages/winceunits/src/bt_api.pp svneol=native#text/plain
 packages/winceunits/src/bt_api.pp svneol=native#text/plain

+ 21 - 8
packages/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/14]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/17]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -9468,14 +9468,27 @@ ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 include fpcmake.loc
 endif
 endif
 fpmkunit_bootstrap:
 fpmkunit_bootstrap:
-ifdef CROSSCOMPILE
 	$(MAKE) -C fpmkunit bootstrap
 	$(MAKE) -C fpmkunit bootstrap
-endif
 fpmkunit_all: fpmkunit_bootstrap fcl-process_all paszlib_all
 fpmkunit_all: fpmkunit_bootstrap fcl-process_all paszlib_all
 fpmkunit_debug: fpmkunit_bootstrap fcl-process_debug paszlib_debug
 fpmkunit_debug: fpmkunit_bootstrap fcl-process_debug paszlib_debug
 fpmkunit_smart: fpmkunit_bootstrap fcl-process_smart paszlib_smart
 fpmkunit_smart: fpmkunit_bootstrap fcl-process_smart paszlib_smart
 fpmkunit_release: fpmkunit_bootstrap fcl-process_release paszlib_release
 fpmkunit_release: fpmkunit_bootstrap fcl-process_release paszlib_release
 fpmkunit_shared: fpmkunit_bootstrap fcl-process_shared paszlib_shared
 fpmkunit_shared: fpmkunit_bootstrap fcl-process_shared paszlib_shared
+hash_all: fpmkunit_bootstrap
+hash_shared: fpmkunit_bootstrap
+hash_smart: fpmkunit_bootstrap
+hash_debug: fpmkunit_bootstrap
+hash_release: fpmkunit_bootstrap
+paszlib_all: hash_all fpmkunit_bootstrap
+paszlib_shared: hash_shared fpmkunit_bootstrap
+paszlib_smart: hash_smart fpmkunit_bootstrap
+paszlib_debug: hash_debug fpmkunit_bootstrap
+paszlib_release: hash_release fpmkunit_bootstrap
+fcl-process_all: fpmkunit_bootstrap
+fcl-process_shared: fpmkunit_bootstrap
+fcl-process_smart: fpmkunit_bootstrap
+fcl-process_debug: fpmkunit_bootstrap
+fcl-process_release: fpmkunit_bootstrap
 ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
 ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
 fcl-base_all: fpmkunit_all univint_all paszlib_all
 fcl-base_all: fpmkunit_all univint_all paszlib_all
 fcl-base_debug: fpmkunit_debug univint_debug paszlib_debug
 fcl-base_debug: fpmkunit_debug univint_debug paszlib_debug
@@ -9706,11 +9719,6 @@ libpng_shared: zlib_shared
 libpng_smart: zlib_smart
 libpng_smart: zlib_smart
 libpng_debug: zlib_debug
 libpng_debug: zlib_debug
 libpng_release: zlib_release
 libpng_release: zlib_release
-paszlib_all: hash_all
-paszlib_shared: hash_shared
-paszlib_smart: hash_smart
-paszlib_debug: hash_debug
-paszlib_release: hash_release
 ifneq ($(findstring $(OS_TARGET),linux darwin iphonesim freebsd openbsd netbsd solaris),)
 ifneq ($(findstring $(OS_TARGET),linux darwin iphonesim freebsd openbsd netbsd solaris),)
 sdl_all: pthreads_all x11_all fpmkunit_all
 sdl_all: pthreads_all x11_all fpmkunit_all
 sdl_shared: pthreads_shared x11_shared fpmkunit_shared
 sdl_shared: pthreads_shared x11_shared fpmkunit_shared
@@ -10126,3 +10134,8 @@ winceunits_shared: fpmkunit_shared
 winceunits_smart: fpmkunit_smart
 winceunits_smart: fpmkunit_smart
 winceunits_debug: fpmkunit_debug
 winceunits_debug: fpmkunit_debug
 winceunits_release: fpmkunit_release
 winceunits_release: fpmkunit_release
+hash_all: fpmkunit_bootstrap
+hash_shared: fpmkunit_bootstrap
+hash_smart: fpmkunit_bootstrap
+hash_debug: fpmkunit_bootstrap
+hash_release: fpmkunit_bootstrap

+ 23 - 8
packages/Makefile.fpc

@@ -75,15 +75,31 @@ fpcdir=..
 
 
 [rules]
 [rules]
 fpmkunit_bootstrap:
 fpmkunit_bootstrap:
-ifdef CROSSCOMPILE
 	$(MAKE) -C fpmkunit bootstrap
 	$(MAKE) -C fpmkunit bootstrap
-endif
 fpmkunit_all: fpmkunit_bootstrap fcl-process_all paszlib_all
 fpmkunit_all: fpmkunit_bootstrap fcl-process_all paszlib_all
 fpmkunit_debug: fpmkunit_bootstrap fcl-process_debug paszlib_debug
 fpmkunit_debug: fpmkunit_bootstrap fcl-process_debug paszlib_debug
 fpmkunit_smart: fpmkunit_bootstrap fcl-process_smart paszlib_smart
 fpmkunit_smart: fpmkunit_bootstrap fcl-process_smart paszlib_smart
 fpmkunit_release: fpmkunit_bootstrap fcl-process_release paszlib_release
 fpmkunit_release: fpmkunit_bootstrap fcl-process_release paszlib_release
 fpmkunit_shared: fpmkunit_bootstrap fcl-process_shared paszlib_shared
 fpmkunit_shared: fpmkunit_bootstrap fcl-process_shared paszlib_shared
 
 
+hash_all: fpmkunit_bootstrap
+hash_shared: fpmkunit_bootstrap
+hash_smart: fpmkunit_bootstrap
+hash_debug: fpmkunit_bootstrap
+hash_release: fpmkunit_bootstrap
+
+paszlib_all: hash_all fpmkunit_bootstrap
+paszlib_shared: hash_shared fpmkunit_bootstrap
+paszlib_smart: hash_smart fpmkunit_bootstrap
+paszlib_debug: hash_debug fpmkunit_bootstrap
+paszlib_release: hash_release fpmkunit_bootstrap
+
+fcl-process_all: fpmkunit_bootstrap
+fcl-process_shared: fpmkunit_bootstrap
+fcl-process_smart: fpmkunit_bootstrap
+fcl-process_debug: fpmkunit_bootstrap
+fcl-process_release: fpmkunit_bootstrap
+
 ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
 ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
 fcl-base_all: fpmkunit_all univint_all paszlib_all
 fcl-base_all: fpmkunit_all univint_all paszlib_all
 fcl-base_debug: fpmkunit_debug univint_debug paszlib_debug
 fcl-base_debug: fpmkunit_debug univint_debug paszlib_debug
@@ -344,12 +360,6 @@ libpng_smart: zlib_smart
 libpng_debug: zlib_debug
 libpng_debug: zlib_debug
 libpng_release: zlib_release
 libpng_release: zlib_release
 
 
-paszlib_all: hash_all
-paszlib_shared: hash_shared
-paszlib_smart: hash_smart
-paszlib_debug: hash_debug
-paszlib_release: hash_release
-
 ifneq ($(findstring $(OS_TARGET),linux darwin iphonesim freebsd openbsd netbsd solaris),)
 ifneq ($(findstring $(OS_TARGET),linux darwin iphonesim freebsd openbsd netbsd solaris),)
 sdl_all: pthreads_all x11_all fpmkunit_all
 sdl_all: pthreads_all x11_all fpmkunit_all
 sdl_shared: pthreads_shared x11_shared fpmkunit_shared
 sdl_shared: pthreads_shared x11_shared fpmkunit_shared
@@ -848,3 +858,8 @@ winceunits_smart: fpmkunit_smart
 winceunits_debug: fpmkunit_debug
 winceunits_debug: fpmkunit_debug
 winceunits_release: fpmkunit_release
 winceunits_release: fpmkunit_release
 
 
+hash_all: fpmkunit_bootstrap
+hash_shared: fpmkunit_bootstrap
+hash_smart: fpmkunit_bootstrap
+hash_debug: fpmkunit_bootstrap
+hash_release: fpmkunit_bootstrap

文件差异内容过多而无法显示
+ 37 - 938
packages/fcl-process/Makefile


+ 99 - 45
packages/fcl-process/Makefile.fpc

@@ -1,55 +1,13 @@
 #
 #
-#   Makefile.fpc for Free Component Library
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=fcl-process
 name=fcl-process
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=pipes process
-units_beos=simpleipc dbugmsg dbugintf pipesipc
-units_haiku=simpleipc dbugmsg dbugintf pipesipc
-units_freebsd=simpleipc dbugmsg dbugintf pipesipc
-units_darwin=simpleipc dbugmsg dbugintf pipesipc
-units_iphonesim=simpleipc dbugmsg dbugintf pipesipc
-units_solaris=simpleipc dbugmsg dbugintf pipesipc
-units_netbsd=simpleipc dbugmsg dbugintf pipesipc
-units_openbsd=simpleipc dbugmsg dbugintf pipesipc
-units_linux=simpleipc dbugmsg dbugintf pipesipc
-units_win32=simpleipc dbugmsg dbugintf
-units_win64=simpleipc dbugmsg dbugintf
-units_wince=simpleipc dbugmsg dbugintf
-units_qnx=simpleipc dbugmsg dbugintf pipesipc
-units_os2=simpleipc dbugmsg dbugintf
-units_emx=simpleipc dbugmsg dbugintf
-rsts=process simpleipc
-
-[compiler]
-options=-S2h
-includedir=src/$(OS_TARGET) src
-includedir_linux=src/unix src/dummy
-includedir_freebsd=src/unix src/dummy
-includedir_darwin=src/unix src/dummy
-includedir_iphonesim=src/unix src/dummy
-includedir_netbsd=src/unix src/dummy
-includedir_openbsd=src/unix src/dummy
-includedir_solaris=src/unix src/dummy
-includedir_qnx=src/unix src/dummy
-includedir_beos=src/unix src/dummy
-includedir_haiku=src/unix src/dummy
-includedir_emx=src/os2 src/dummy
-includedir_win32=src/win src/dummy
-includedir_win64=src/win src/dummy
-includedir_wince=src/wince src/dummy
-includedir_go32v2=src/dummy
-includedir_os2=src/os2 src/dummy
-includedir_morphos=src/dummy
-includedir_amiga=src/dummy
-includedir_netware=src/dummy
-includedir_netwlibc=src/dummy
-includedir_gba=src/dummy
-sourcedir=src/$(OS_TARGET) src
+[require]
+packages=rtl
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -57,5 +15,101 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+# Adding a dependency on fpmkunit is not possbile due to an infinite loop. So
+# the fpmkunit-searchpath is added here:
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+        $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
+else
+UNITDIR_FPMKUNIT=
+endif
+endif
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
+endif
+ifdef UNITDIR_FPMAKE_FPMKUNIT
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
+endif
+
+
 [rules]
 [rules]
 .NOTPARALLEL:
 .NOTPARALLEL:
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
+smart:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:	
+else
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:	
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+

+ 61 - 0
packages/fcl-process/Makefile.fpc.fpcmake

@@ -0,0 +1,61 @@
+#
+#   Makefile.fpc for Free Component Library
+#
+
+[package]
+name=fcl-process
+version=2.7.1
+
+[target]
+units=pipes process
+units_beos=simpleipc dbugmsg dbugintf pipesipc
+units_haiku=simpleipc dbugmsg dbugintf pipesipc
+units_freebsd=simpleipc dbugmsg dbugintf pipesipc
+units_darwin=simpleipc dbugmsg dbugintf pipesipc
+units_iphonesim=simpleipc dbugmsg dbugintf pipesipc
+units_solaris=simpleipc dbugmsg dbugintf pipesipc
+units_netbsd=simpleipc dbugmsg dbugintf pipesipc
+units_openbsd=simpleipc dbugmsg dbugintf pipesipc
+units_linux=simpleipc dbugmsg dbugintf pipesipc
+units_win32=simpleipc dbugmsg dbugintf
+units_win64=simpleipc dbugmsg dbugintf
+units_wince=simpleipc dbugmsg dbugintf
+units_qnx=simpleipc dbugmsg dbugintf pipesipc
+units_os2=simpleipc dbugmsg dbugintf
+units_emx=simpleipc dbugmsg dbugintf
+rsts=process simpleipc
+
+[compiler]
+options=-S2h
+includedir=src/$(OS_TARGET) src
+includedir_linux=src/unix src/dummy
+includedir_freebsd=src/unix src/dummy
+includedir_darwin=src/unix src/dummy
+includedir_iphonesim=src/unix src/dummy
+includedir_netbsd=src/unix src/dummy
+includedir_openbsd=src/unix src/dummy
+includedir_solaris=src/unix src/dummy
+includedir_qnx=src/unix src/dummy
+includedir_beos=src/unix src/dummy
+includedir_haiku=src/unix src/dummy
+includedir_emx=src/os2 src/dummy
+includedir_win32=src/win src/dummy
+includedir_win64=src/win src/dummy
+includedir_wince=src/wince src/dummy
+includedir_go32v2=src/dummy
+includedir_os2=src/os2 src/dummy
+includedir_morphos=src/dummy
+includedir_amiga=src/dummy
+includedir_netware=src/dummy
+includedir_netwlibc=src/dummy
+includedir_gba=src/dummy
+sourcedir=src/$(OS_TARGET) src
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

文件差异内容过多而无法显示
+ 96 - 644
packages/fpmkunit/Makefile


+ 94 - 13
packages/fpmkunit/Makefile.fpc

@@ -1,30 +1,64 @@
 #
 #
-#   Makefile.fpc for fppkg
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=fpmkunit
 name=fpmkunit
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=fpmkunit
+[require]
+packages=rtl paszlib fcl-process hash
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[require]
-packages=paszlib fcl-process
-
-[compiler]
-sourcedir=src
-includedir=src
-
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
 [prerules]
 [prerules]
+#Defines for bootstrapping
 TARGET_UNITDIRBS=units_bs/$(SOURCESUFFIX)
 TARGET_UNITDIRBS=units_bs/$(SOURCESUFFIX)
 CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/fpmkunit.ppu units_bs/$(SOURCESUFFIX)/fpmkunit.rst units_bs/$(SOURCESUFFIX)/fpmkunit.o
 CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/fpmkunit.ppu units_bs/$(SOURCESUFFIX)/fpmkunit.rst units_bs/$(SOURCESUFFIX)/fpmkunit.o
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/adler.ppu units_bs/$(SOURCESUFFIX)/adler.o units_bs/$(SOURCESUFFIX)/crc.o units_bs/$(SOURCESUFFIX)/crc.ppu
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/gzio.ppu units_bs/$(SOURCESUFFIX)/gzio.o units_bs/$(SOURCESUFFIX)/infblock.o units_bs/$(SOURCESUFFIX)/infblock.ppu
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/infcodes.ppu units_bs/$(SOURCESUFFIX)/infcodes.o units_bs/$(SOURCESUFFIX)/inffast.o units_bs/$(SOURCESUFFIX)/inffast.ppu
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/inftrees.ppu units_bs/$(SOURCESUFFIX)/inftrees.o units_bs/$(SOURCESUFFIX)/infutil.o units_bs/$(SOURCESUFFIX)/infutil.ppu
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/pipes.ppu units_bs/$(SOURCESUFFIX)/pipes.o units_bs/$(SOURCESUFFIX)/process.o units_bs/$(SOURCESUFFIX)/process.ppu units_bs/$(SOURCESUFFIX)/process.rst
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/trees.ppu units_bs/$(SOURCESUFFIX)/trees.o units_bs/$(SOURCESUFFIX)/zbase.o units_bs/$(SOURCESUFFIX)/zbase.ppu units_bs/$(SOURCESUFFIX)/zbase.rst
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/zdeflate.ppu units_bs/$(SOURCESUFFIX)/zdeflate.o units_bs/$(SOURCESUFFIX)/zinflate.o units_bs/$(SOURCESUFFIX)/zinflate.ppu
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/zipper.ppu units_bs/$(SOURCESUFFIX)/zipper.o units_bs/$(SOURCESUFFIX)/zipper.rst units_bs/$(SOURCESUFFIX)/zstream.o units_bs/$(SOURCESUFFIX)/zstream.ppu units_bs/$(SOURCESUFFIX)/zstream.rst
+# Set NO_UNIT_PROCESS on hosts that do not support the process unit
+ifneq ($(findstring $(OS_SOURCE),os2 go32v2),)
+NO_UNIT_PROCESS=1
+endif
+ifdef NO_UNIT_PROCESS
+UNIT_PROCESS=-dNO_UNIT_PROCESS
+else
+UNIT_PROCESS=-Fu../fcl-process/src -Fi../fcl-process/isrc/dummy -Fi../fcl-process/isrc/$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),win32 win64),)
+UNIT_PROCESS+=-Fi../fcl-process/src/win
+endif
+ifneq ($(findstring $(OS_SOURCE),linux freebsd darwin iphonesim netbsd openbsd solaris),)
+UNIT_PROCESS+=-Fi../fcl-process/src/unix
+endif
+ifneq ($(findstring $(OS_SOURCE),os2 emx),)
+UNIT_PROCESS+=-Fi../fcl-process/src/os2
+endif
+endif
+ifdef NO_UNIT_ZIPPER
+UNIT_ZIPPER=-dNO_UNIT_ZIPPER
+else
+UNIT_ZIPPER=-Fu../paszlib/src -Fu../hash/src -Fi../paszlib/src
+endif
+# End of bootstrap-code
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 
 [rules]
 [rules]
 .NOTPARALLEL:
 .NOTPARALLEL:
@@ -32,7 +66,54 @@ CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/fpmkunit.ppu units_bs/$(SOURCESUFFIX)/fpmk
 $(TARGET_UNITDIRBS):
 $(TARGET_UNITDIRBS):
 	$(MKDIRTREE) $(TARGET_UNITDIRBS)
 	$(MKDIRTREE) $(TARGET_UNITDIRBS)
 bootstrap:	$(TARGET_UNITDIRBS)
 bootstrap:	$(TARGET_UNITDIRBS)
-	$(FPCFPMAKE) src/fpmkunit.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) -dNO_UNIT_PROCESS -dNO_UNIT_ZIPPER -FU$(TARGET_UNITDIRBS)	
-cleanall:	fpc_cleanall
+	$(FPCFPMAKE) src/fpmkunit.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) -FU$(TARGET_UNITDIRBS) $(UNIT_ZIPPER) $(UNIT_PROCESS)
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(UNITDIR_FPMAKE_RTL)) $(FPCMAKEOPT) -Fu$(TARGET_UNITDIRBS)
+all:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
+smart:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:	
 	-$(DELTREE) units_bs
 	-$(DELTREE) units_bs
-	
+else
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+	-$(DELTREE) units_bs
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+	-$(DELTREE) units_bs
+else
+distclean:	
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+	-$(DELTREE) units_bs
+endif
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+

+ 38 - 0
packages/fpmkunit/Makefile.fpc.fpcmake

@@ -0,0 +1,38 @@
+#
+#   Makefile.fpc for fppkg
+#
+
+[package]
+name=fpmkunit
+version=2.7.1
+
+[target]
+units=fpmkunit
+
+[install]
+fpcpackage=y
+
+[require]
+packages=paszlib fcl-process
+
+[compiler]
+sourcedir=src
+includedir=src
+
+[default]
+fpcdir=../..
+
+[prerules]
+TARGET_UNITDIRBS=units_bs/$(SOURCESUFFIX)
+CLEAN_FILES+=units_bs/$(SOURCESUFFIX)/fpmkunit.ppu units_bs/$(SOURCESUFFIX)/fpmkunit.rst units_bs/$(SOURCESUFFIX)/fpmkunit.o
+
+[rules]
+.NOTPARALLEL:
+
+$(TARGET_UNITDIRBS):
+	$(MKDIRTREE) $(TARGET_UNITDIRBS)
+bootstrap:	$(TARGET_UNITDIRBS)
+	$(FPCFPMAKE) src/fpmkunit.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) -dNO_UNIT_PROCESS -dNO_UNIT_ZIPPER -FU$(TARGET_UNITDIRBS)	
+cleanall:	fpc_cleanall
+	-$(DELTREE) units_bs
+	

+ 85 - 933
packages/hash/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/12/04]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/17]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -294,574 +294,51 @@ endif
 endif
 endif
 override PACKAGE_NAME=hash
 override PACKAGE_NAME=hash
 override PACKAGE_VERSION=2.7.1
 override PACKAGE_VERSION=2.7.1
-ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=md5 crc ntlm sha1 uuid  unixcrypt
-endif
-ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_EXAMPLEDIRS+=examples
-endif
-override INSTALL_FPCPACKAGE=y
-ifeq ($(FULL_TARGET),i386-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-override COMPILER_SOURCEDIR+=src
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-override COMPILER_SOURCEDIR+=src
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
 endif
 endif
-ifeq ($(FULL_TARGET),arm-embedded)
-override COMPILER_SOURCEDIR+=src
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
 endif
 endif
-ifeq ($(FULL_TARGET),arm-symbian)
-override COMPILER_SOURCEDIR+=src
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
 endif
 endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-override COMPILER_SOURCEDIR+=src
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
 endif
 endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-override COMPILER_SOURCEDIR+=src
 endif
 endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-override COMPILER_SOURCEDIR+=src
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
 endif
 endif
-ifeq ($(FULL_TARGET),avr-embedded)
-override COMPILER_SOURCEDIR+=src
+else
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
+else
+UNITDIR_FPMKUNIT=
 endif
 endif
-ifeq ($(FULL_TARGET),armeb-linux)
-override COMPILER_SOURCEDIR+=src
 endif
 endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-override COMPILER_SOURCEDIR+=src
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
 endif
 endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-override COMPILER_SOURCEDIR+=src
+ifdef UNITDIR_FPMAKE_FPMKUNIT
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
 endif
 endif
+override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
 endif
@@ -1446,25 +923,6 @@ DATESTR:=$(shell $(DATE) +%Y%m%d)
 else
 else
 DATESTR=
 DATESTR=
 endif
 endif
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
 ZIPOPT=-9
 ZIPOPT=-9
 ZIPEXT=.zip
 ZIPEXT=.zip
 ifeq ($(USETAR),bz2)
 ifeq ($(USETAR),bz2)
@@ -1474,7 +932,7 @@ else
 TAROPT=vz
 TAROPT=vz
 TAREXT=.tar.gz
 TAREXT=.tar.gz
 endif
 endif
-override REQUIRE_PACKAGES=rtl 
+override REQUIRE_PACKAGES=rtl
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -1718,12 +1176,16 @@ endif
 ifndef CROSSBOOTSTRAP
 ifndef CROSSBOOTSTRAP
 ifneq ($(BINUTILSPREFIX),)
 ifneq ($(BINUTILSPREFIX),)
 override FPCOPT+=-XP$(BINUTILSPREFIX)
 override FPCOPT+=-XP$(BINUTILSPREFIX)
-override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
 endif
 endif
 ifneq ($(BINUTILSPREFIX),)
 ifneq ($(BINUTILSPREFIX),)
 override FPCOPT+=-Xr$(RLINKPATH)
 override FPCOPT+=-Xr$(RLINKPATH)
 endif
 endif
 endif
 endif
+ifndef CROSSCOMPILE
+ifneq ($(BINUTILSPREFIX),)
+override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
+endif
+endif
 ifdef UNITDIR
 ifdef UNITDIR
 override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
 override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
 endif
 endif
@@ -1857,113 +1319,10 @@ EXECPPAS:=@$(PPAS)
 endif
 endif
 endif
 endif
 endif
 endif
-.PHONY: fpc_units
-ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
-override ALLTARGET+=fpc_units
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
-override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
-override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
-endif
-fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
 ifdef TARGET_RSTS
 ifdef TARGET_RSTS
 override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
 override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
 override CLEANRSTFILES+=$(RSTFILES)
 override CLEANRSTFILES+=$(RSTFILES)
 endif
 endif
-.PHONY: fpc_examples
-ifneq ($(TARGET_EXAMPLES),)
-HASEXAMPLES=1
-override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
-override EXAMPLEDBGFILES:=$(addsuffix $(EXEDBGEXT),$(TARGET_EXAMPLES))
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-override CLEANEXEDBGFILES+=$(EXAMPLEDBGFILES)
-ifeq ($(OS_TARGET),os2)
-override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
-endif
-ifeq ($(OS_TARGET),emx)
-override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
-endif
-endif
-ifneq ($(TARGET_EXAMPLEDIRS),)
-HASEXAMPLES=1
-endif
-fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
-.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
-$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
-	@$(ECHOREDIR) Compiled > $(FPCMADE)
-fpc_all: $(FPCMADE)
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-fpc_debug:
-	$(MAKE) all DEBUG=1
-fpc_release:
-	$(MAKE) all RELEASE=1
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
-$(COMPILER_UNITTARGETDIR):
-	$(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
-$(COMPILER_TARGETDIR):
-	$(MKDIRTREE) $(COMPILER_TARGETDIR)
-%$(PPUEXT): %.pp
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(PPUEXT): %.pas
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.pp
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.pas
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.lpr
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.dpr
-	$(COMPILER) $<
-	$(EXECPPAS)
-%.res: %.rc
-	windres -i $< -o $@
-vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %.inc $(COMPILER_INCLUDEDIR)
-vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
-vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
-.PHONY: fpc_shared
-override INSTALLTARGET+=fpc_shared_install
-ifndef SHARED_LIBVERSION
-SHARED_LIBVERSION=$(FPC_VERSION)
-endif
-ifndef SHARED_LIBNAME
-SHARED_LIBNAME=$(PACKAGE_NAME)
-endif
-ifndef SHARED_FULLNAME
-SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
-endif
-ifndef SHARED_LIBUNITS
-SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
-override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
-endif
-fpc_shared:
-ifdef HASSHAREDLIB
-	$(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
-ifneq ($(SHARED_BUILD),n)
-	$(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
-endif
-else
-	@$(ECHO) Shared Libraries not supported
-endif
-fpc_shared_install:
-ifneq ($(SHARED_BUILD),n)
-ifneq ($(SHARED_LIBUNITS),)
-ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
-	$(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
-endif
-endif
-endif
 .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
 .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
 ifdef INSTALL_UNITS
 ifdef INSTALL_UNITS
 override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
 override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
@@ -1987,9 +1346,6 @@ endif
 fpc_install: all $(INSTALLTARGET)
 fpc_install: all $(INSTALLTARGET)
 ifdef INSTALLEXEFILES
 ifdef INSTALLEXEFILES
 	$(MKDIR) $(INSTALL_BINDIR)
 	$(MKDIR) $(INSTALL_BINDIR)
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
 	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
 	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
 endif
 endif
 ifdef INSTALL_CREATEPACKAGEFPC
 ifdef INSTALL_CREATEPACKAGEFPC
@@ -2248,7 +1604,6 @@ fpc_baseinfo:
 	@$(ECHO)  Date...... $(DATE)
 	@$(ECHO)  Date...... $(DATE)
 	@$(ECHO)  FPCMake... $(FPCMAKE)
 	@$(ECHO)  FPCMake... $(FPCMAKE)
 	@$(ECHO)  PPUMove... $(PPUMOVE)
 	@$(ECHO)  PPUMove... $(PPUMOVE)
-	@$(ECHO)  Upx....... $(UPXPROG)
 	@$(ECHO)  Zip....... $(ZIPPROG)
 	@$(ECHO)  Zip....... $(ZIPPROG)
 	@$(ECHO)
 	@$(ECHO)
 	@$(ECHO)  == Object info ==
 	@$(ECHO)  == Object info ==
@@ -2305,262 +1660,59 @@ endif
 fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
 fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
 fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
 fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
 fpc_makefiles: fpc_makefile fpc_makefile_dirs
 fpc_makefiles: fpc_makefile fpc_makefile_dirs
-ifeq ($(FULL_TARGET),i386-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-TARGET_EXAMPLEDIRS_EXAMPLES=1
-endif
-ifdef TARGET_EXAMPLEDIRS_EXAMPLES
-examples_all:
-	$(MAKE) -C examples all
-examples_debug:
-	$(MAKE) -C examples debug
-examples_smart:
-	$(MAKE) -C examples smart
-examples_release:
-	$(MAKE) -C examples release
-examples_units:
-	$(MAKE) -C examples units
-examples_examples:
-	$(MAKE) -C examples examples
-examples_shared:
-	$(MAKE) -C examples shared
-examples_install:
-	$(MAKE) -C examples install
-examples_sourceinstall:
-	$(MAKE) -C examples sourceinstall
-examples_exampleinstall:
-	$(MAKE) -C examples exampleinstall
-examples_distinstall:
-	$(MAKE) -C examples distinstall
-examples_zipinstall:
-	$(MAKE) -C examples zipinstall
-examples_zipsourceinstall:
-	$(MAKE) -C examples zipsourceinstall
-examples_zipexampleinstall:
-	$(MAKE) -C examples zipexampleinstall
-examples_zipdistinstall:
-	$(MAKE) -C examples zipdistinstall
-examples_clean:
-	$(MAKE) -C examples clean
-examples_distclean:
-	$(MAKE) -C examples distclean
-examples_cleanall:
-	$(MAKE) -C examples cleanall
-examples_info:
-	$(MAKE) -C examples info
-examples_makefiles:
-	$(MAKE) -C examples makefiles
+units:
 examples:
 examples:
-	$(MAKE) -C examples all
-.PHONY: examples_all examples_debug examples_smart examples_release examples_units examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples_makefiles examples
-endif
-all: fpc_all
-debug: fpc_debug
-smart: fpc_smart
-release: fpc_release
-units: fpc_units
-examples: fpc_examples
-shared: fpc_shared
-install: fpc_install
+shared:
 sourceinstall: fpc_sourceinstall
 sourceinstall: fpc_sourceinstall
 exampleinstall: fpc_exampleinstall
 exampleinstall: fpc_exampleinstall
-distinstall: fpc_distinstall
 zipinstall: fpc_zipinstall
 zipinstall: fpc_zipinstall
 zipsourceinstall: fpc_zipsourceinstall
 zipsourceinstall: fpc_zipsourceinstall
 zipexampleinstall: fpc_zipexampleinstall
 zipexampleinstall: fpc_zipexampleinstall
 zipdistinstall: fpc_zipdistinstall
 zipdistinstall: fpc_zipdistinstall
-clean: fpc_clean $(addsuffix _clean,$(TARGET_EXAMPLEDIRS))
-distclean: fpc_distclean
-cleanall: fpc_cleanall
+cleanall:
 info: fpc_info
 info: fpc_info
 makefiles: fpc_makefiles
 makefiles: fpc_makefiles
-.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+.PHONY: units examples shared sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall cleanall info makefiles
 ifneq ($(wildcard fpcmake.loc),)
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 include fpcmake.loc
 endif
 endif
 .NOTPARALLEL:
 .NOTPARALLEL:
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
+smart:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:	
+else
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:	
+ifdef inUnix
+	{ $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+	$(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif

+ 99 - 8
packages/hash/Makefile.fpc

@@ -1,24 +1,115 @@
 #
 #
-#   Makefile.fpc for MD5 checksum.
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=hash
 name=hash
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=md5 crc ntlm sha1 uuid
-units_linux=unixcrypt
-exampledirs=examples
+[require]
+packages=rtl
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-sourcedir=src
-
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+# Adding a dependency on fpmkunit is not possbile due to an infinite loop. So
+# the fpmkunit-searchpath is added here:
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+        $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
+else
+UNITDIR_FPMKUNIT=
+endif
+endif
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
+endif
+ifdef UNITDIR_FPMAKE_FPMKUNIT
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
+endif
+
+
 [rules]
 [rules]
 .NOTPARALLEL:
 .NOTPARALLEL:
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
+smart:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:	
+else
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:	
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+

+ 24 - 0
packages/hash/Makefile.fpc.fpcmake

@@ -0,0 +1,24 @@
+#
+#   Makefile.fpc for MD5 checksum.
+#
+
+[package]
+name=hash
+version=2.7.1
+
+[target]
+units=md5 crc ntlm sha1 uuid
+units_linux=unixcrypt
+exampledirs=examples
+
+[install]
+fpcpackage=y
+
+[compiler]
+sourcedir=src
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

文件差异内容过多而无法显示
+ 37 - 831
packages/paszlib/Makefile


+ 97 - 10
packages/paszlib/Makefile.fpc

@@ -1,5 +1,5 @@
 #
 #
-#   Makefile.fpc for PasZLib
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
@@ -7,22 +7,109 @@ name=paszlib
 version=2.7.1
 version=2.7.1
 
 
 [require]
 [require]
-packages=hash
-
-[target]
-units=paszlib zip unzip zipper 
-implicitunits=adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr ziputils zstream
-exampledirs=examples
+packages=rtl
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-sourcedir=src
-
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+# Adding a dependency on fpmkunit is not possbile due to an infinite loop. So
+# the fpmkunit-searchpath is added here:
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
+else
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
+endif
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+        $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
+else
+UNITDIR_FPMKUNIT=
+endif
+endif
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
+endif
+ifdef UNITDIR_FPMAKE_FPMKUNIT
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
+endif
+
+
 [rules]
 [rules]
 .NOTPARALLEL:
 .NOTPARALLEL:
 
 
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
+smart:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:	
+else
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:	
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+

+ 28 - 0
packages/paszlib/Makefile.fpc.fpcmake

@@ -0,0 +1,28 @@
+#
+#   Makefile.fpc for PasZLib
+#
+
+[package]
+name=paszlib
+version=2.7.1
+
+[require]
+packages=hash
+
+[target]
+units=paszlib zip unzip zipper 
+implicitunits=adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr ziputils zstream
+exampledirs=examples
+
+[install]
+fpcpackage=y
+
+[compiler]
+sourcedir=src
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+

+ 40 - 0
packages/winceunits/Makefile.fpc.fpcmake

@@ -0,0 +1,40 @@
+#
+#   Makefile.fpc for WinCE Units
+#
+
+[package]
+name=winceunits
+version=2.7.1
+
+[target]
+units_wince=comobj buildwinceunits
+implicitunits_wince=aygshell commctrl commdlg iphlpapi notify oleauto power shellapi simmgr tapi \
+                    gpsapi todaycmn windbase cesync gx winioctl msgqueue pm service htmlctrl \
+                    sipapi cpl bt_api bt_sdp bthapi bthutil pimstore ril sms ws2bth keybd nled \
+                    phone connmgr devload devmgmt mmreg mmsystem msacm wininet ras raserror \
+                    sip projects wap tsp extapi imm \
+                    activex ole2 comconst rapitypes tlhelp32
+
+units_win32=rapi cesync rapitypes
+
+rsts=comconst
+
+[install]
+buildunit=buildwinceunits
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+options=-Ur
+sourcedir=src
+
+[prerules]
+WINDIR=../winunits-base/src
+
+[rules]
+.NOTPARALLEL:
+
+comobj$(PPUEXT) : $(WINDIR)/comobj.pp $(WINDIR)/activex.pp
+        $(COMPILER) $(WINDIR)/comobj.pp

部分文件因为文件数量过多而无法显示