Browse Source

* Changed more packages to fpmake building

git-svn-id: trunk@20089 -
joost 13 years ago
parent
commit
68d9066200
54 changed files with 5036 additions and 12359 deletions
  1. 17 0
      .gitattributes
  2. 91 21
      packages/Makefile
  3. 106 21
      packages/Makefile.fpc
  4. 260 649
      packages/cocoaint/Makefile
  5. 59 14
      packages/cocoaint/Makefile.fpc
  6. 31 0
      packages/cocoaint/Makefile.fpc.fpcmake
  7. 9 857
      packages/fpgtk/Makefile
  8. 59 9
      packages/fpgtk/Makefile.fpc
  9. 26 0
      packages/fpgtk/Makefile.fpc.fpcmake
  10. 8 1166
      packages/gdbint/Makefile
  11. 44 161
      packages/gdbint/Makefile.fpc
  12. 193 0
      packages/gdbint/Makefile.fpc.fpcmake
  13. 261 587
      packages/objcrtl/Makefile
  14. 60 7
      packages/objcrtl/Makefile.fpc
  15. 23 0
      packages/objcrtl/Makefile.fpc.fpcmake
  16. 8 976
      packages/opengl/Makefile
  17. 59 25
      packages/opengl/Makefile.fpc
  18. 42 0
      packages/opengl/Makefile.fpc.fpcmake
  19. 261 644
      packages/opengles/Makefile
  20. 60 18
      packages/opengles/Makefile.fpc
  21. 34 0
      packages/opengles/Makefile.fpc.fpcmake
  22. 260 586
      packages/openssl/Makefile
  23. 59 6
      packages/openssl/Makefile.fpc
  24. 23 0
      packages/openssl/Makefile.fpc.fpcmake
  25. 261 807
      packages/os2units/Makefile
  26. 58 10
      packages/os2units/Makefile.fpc
  27. 28 0
      packages/os2units/Makefile.fpc.fpcmake
  28. 260 586
      packages/palmunits/Makefile
  29. 59 20
      packages/palmunits/Makefile.fpc
  30. 37 0
      packages/palmunits/Makefile.fpc.fpcmake
  31. 260 775
      packages/pasjpeg/Makefile
  32. 60 14
      packages/pasjpeg/Makefile.fpc
  33. 30 0
      packages/pasjpeg/Makefile.fpc.fpcmake
  34. 260 586
      packages/pcap/Makefile
  35. 59 6
      packages/pcap/Makefile.fpc
  36. 23 0
      packages/pcap/Makefile.fpc.fpcmake
  37. 9 771
      packages/ptc/Makefile
  38. 61 22
      packages/ptc/Makefile.fpc
  39. 37 0
      packages/ptc/Makefile.fpc.fpcmake
  40. 412 370
      packages/pxlib/Makefile
  41. 60 23
      packages/pxlib/Makefile.fpc
  42. 39 0
      packages/pxlib/Makefile.fpc.fpcmake
  43. 261 776
      packages/rexx/Makefile
  44. 59 8
      packages/rexx/Makefile.fpc
  45. 25 0
      packages/rexx/Makefile.fpc.fpcmake
  46. 1 192
      packages/univint/Makefile
  47. 59 107
      packages/univint/Makefile.fpc
  48. 124 0
      packages/univint/Makefile.fpc.fpcmake
  49. 9 933
      packages/unixutil/Makefile
  50. 59 11
      packages/unixutil/Makefile.fpc
  51. 28 0
      packages/unixutil/Makefile.fpc.fpcmake
  52. 260 586
      packages/unzip/Makefile
  53. 60 9
      packages/unzip/Makefile.fpc
  54. 25 0
      packages/unzip/Makefile.fpc.fpcmake

+ 17 - 0
.gitattributes

@@ -1025,6 +1025,7 @@ packages/chm/src/paslzx.pas svneol=native#text/plain
 packages/chm/src/paslzxcomp.pas svneol=native#text/plain
 packages/chm/src/paslzxcomp.pas svneol=native#text/plain
 packages/cocoaint/Makefile svneol=native#text/plain
 packages/cocoaint/Makefile svneol=native#text/plain
 packages/cocoaint/Makefile.fpc svneol=native#text/plain
 packages/cocoaint/Makefile.fpc svneol=native#text/plain
+packages/cocoaint/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/cocoaint/fpmake.pp svneol=native#text/plain
 packages/cocoaint/fpmake.pp svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsCoredata.pas svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsCoredata.pas svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsQuartzcore.pas svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsQuartzcore.pas svneol=native#text/plain
@@ -2753,6 +2754,7 @@ packages/fftw/readme.txt svneol=native#text/plain
 packages/fftw/src/fftw_s.pas svneol=native#text/plain
 packages/fftw/src/fftw_s.pas svneol=native#text/plain
 packages/fpgtk/Makefile svneol=native#text/plain
 packages/fpgtk/Makefile svneol=native#text/plain
 packages/fpgtk/Makefile.fpc svneol=native#text/plain
 packages/fpgtk/Makefile.fpc svneol=native#text/plain
+packages/fpgtk/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fpgtk/examples/Makefile svneol=native#text/plain
 packages/fpgtk/examples/Makefile svneol=native#text/plain
 packages/fpgtk/examples/Makefile.fpc svneol=native#text/plain
 packages/fpgtk/examples/Makefile.fpc svneol=native#text/plain
 packages/fpgtk/examples/lister.pp svneol=native#text/plain
 packages/fpgtk/examples/lister.pp svneol=native#text/plain
@@ -2849,6 +2851,7 @@ packages/fv/src/views.pas svneol=native#text/plain
 packages/fv/src/w32smsg.inc svneol=native#text/plain
 packages/fv/src/w32smsg.inc svneol=native#text/plain
 packages/gdbint/Makefile svneol=native#text/plain
 packages/gdbint/Makefile svneol=native#text/plain
 packages/gdbint/Makefile.fpc svneol=native#text/plain
 packages/gdbint/Makefile.fpc svneol=native#text/plain
+packages/gdbint/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/gdbint/examples/mingw.pas svneol=native#text/plain
 packages/gdbint/examples/mingw.pas svneol=native#text/plain
 packages/gdbint/examples/symify.pp svneol=native#text/plain
 packages/gdbint/examples/symify.pp svneol=native#text/plain
 packages/gdbint/examples/testgdb.pp svneol=native#text/plain
 packages/gdbint/examples/testgdb.pp svneol=native#text/plain
@@ -5330,6 +5333,7 @@ packages/nvapi/fpmake.pp svneol=native#text/pascal
 packages/nvapi/src/nvapi.pas svneol=native#text/pascal
 packages/nvapi/src/nvapi.pas svneol=native#text/pascal
 packages/objcrtl/Makefile svneol=native#text/plain
 packages/objcrtl/Makefile svneol=native#text/plain
 packages/objcrtl/Makefile.fpc svneol=native#text/plain
 packages/objcrtl/Makefile.fpc svneol=native#text/plain
+packages/objcrtl/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/objcrtl/examples/objcrtltest.pas svneol=native#text/plain
 packages/objcrtl/examples/objcrtltest.pas svneol=native#text/plain
 packages/objcrtl/fpmake.pp svneol=native#text/plain
 packages/objcrtl/fpmake.pp svneol=native#text/plain
 packages/objcrtl/src/objcrtl.pas svneol=native#text/plain
 packages/objcrtl/src/objcrtl.pas svneol=native#text/plain
@@ -5380,6 +5384,7 @@ packages/opencl/src/cl.pp svneol=native#text/pascal
 packages/opencl/src/cl_gl.pp svneol=native#text/pascal
 packages/opencl/src/cl_gl.pp svneol=native#text/pascal
 packages/opengl/Makefile svneol=native#text/plain
 packages/opengl/Makefile svneol=native#text/plain
 packages/opengl/Makefile.fpc svneol=native#text/plain
 packages/opengl/Makefile.fpc svneol=native#text/plain
+packages/opengl/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/opengl/examples/Makefile svneol=native#text/plain
 packages/opengl/examples/Makefile svneol=native#text/plain
 packages/opengl/examples/Makefile.fpc svneol=native#text/plain
 packages/opengl/examples/Makefile.fpc svneol=native#text/plain
 packages/opengl/examples/bounce.pp svneol=native#text/plain
 packages/opengl/examples/bounce.pp svneol=native#text/plain
@@ -5402,6 +5407,7 @@ packages/opengl/src/tinygl.inc svneol=native#text/plain
 packages/opengl/src/tinyglh.inc svneol=native#text/plain
 packages/opengl/src/tinyglh.inc svneol=native#text/plain
 packages/opengles/Makefile svneol=native#text/plain
 packages/opengles/Makefile svneol=native#text/plain
 packages/opengles/Makefile.fpc svneol=native#text/plain
 packages/opengles/Makefile.fpc svneol=native#text/plain
+packages/opengles/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/opengles/examples/Makefile svneol=native#text/plain
 packages/opengles/examples/Makefile svneol=native#text/plain
 packages/opengles/examples/Makefile.fpc svneol=native#text/plain
 packages/opengles/examples/Makefile.fpc svneol=native#text/plain
 packages/opengles/examples/es2example1.pas svneol=native#text/pascal
 packages/opengles/examples/es2example1.pas svneol=native#text/pascal
@@ -5410,6 +5416,7 @@ packages/opengles/src/gles11.pp svneol=native#text/plain
 packages/opengles/src/gles20.pas svneol=native#text/pascal
 packages/opengles/src/gles20.pas svneol=native#text/pascal
 packages/openssl/Makefile svneol=native#text/plain
 packages/openssl/Makefile svneol=native#text/plain
 packages/openssl/Makefile.fpc svneol=native#text/plain
 packages/openssl/Makefile.fpc svneol=native#text/plain
+packages/openssl/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/openssl/examples/Makefile svneol=native#text/plain
 packages/openssl/examples/Makefile svneol=native#text/plain
 packages/openssl/examples/test1.pas svneol=native#text/plain
 packages/openssl/examples/test1.pas svneol=native#text/plain
 packages/openssl/fpmake.pp svneol=native#text/plain
 packages/openssl/fpmake.pp svneol=native#text/plain
@@ -5439,6 +5446,7 @@ packages/oracle/src/oro_interface.inc svneol=native#text/plain
 packages/oracle/src/ort.inc svneol=native#text/plain
 packages/oracle/src/ort.inc svneol=native#text/plain
 packages/os2units/Makefile svneol=native#text/plain
 packages/os2units/Makefile svneol=native#text/plain
 packages/os2units/Makefile.fpc svneol=native#text/plain
 packages/os2units/Makefile.fpc svneol=native#text/plain
+packages/os2units/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/os2units/examples/Makefile svneol=native#text/plain
 packages/os2units/examples/Makefile svneol=native#text/plain
 packages/os2units/examples/Makefile.fpc svneol=native#text/plain
 packages/os2units/examples/Makefile.fpc svneol=native#text/plain
 packages/os2units/examples/clktest.pas svneol=native#text/plain
 packages/os2units/examples/clktest.pas svneol=native#text/plain
@@ -5464,6 +5472,7 @@ packages/os2units/src/sw.pas svneol=native#text/plain
 packages/os2units/src/wpstk.pp svneol=native#text/plain
 packages/os2units/src/wpstk.pp svneol=native#text/plain
 packages/palmunits/Makefile svneol=native#text/plain
 packages/palmunits/Makefile svneol=native#text/plain
 packages/palmunits/Makefile.fpc svneol=native#text/plain
 packages/palmunits/Makefile.fpc svneol=native#text/plain
+packages/palmunits/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/palmunits/fpmake.pp svneol=native#text/plain
 packages/palmunits/fpmake.pp svneol=native#text/plain
 packages/palmunits/src/aboutbox.pp svneol=native#text/plain
 packages/palmunits/src/aboutbox.pp svneol=native#text/plain
 packages/palmunits/src/alarmmgr.pp svneol=native#text/plain
 packages/palmunits/src/alarmmgr.pp svneol=native#text/plain
@@ -5569,6 +5578,7 @@ packages/palmunits/src/vfsmgr.pp svneol=native#text/plain
 packages/palmunits/src/window.pp svneol=native#text/plain
 packages/palmunits/src/window.pp svneol=native#text/plain
 packages/pasjpeg/Makefile svneol=native#text/plain
 packages/pasjpeg/Makefile svneol=native#text/plain
 packages/pasjpeg/Makefile.fpc svneol=native#text/plain
 packages/pasjpeg/Makefile.fpc svneol=native#text/plain
+packages/pasjpeg/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/pasjpeg/examples/cderror.pas svneol=native#text/plain
 packages/pasjpeg/examples/cderror.pas svneol=native#text/plain
 packages/pasjpeg/examples/cdjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cdjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.pas svneol=native#text/plain
@@ -5698,6 +5708,7 @@ packages/paszlib/src/zstream.pp svneol=native#text/plain
 packages/paszlib/src/zuncompr.pas svneol=native#text/plain
 packages/paszlib/src/zuncompr.pas svneol=native#text/plain
 packages/pcap/Makefile svneol=native#text/plain
 packages/pcap/Makefile svneol=native#text/plain
 packages/pcap/Makefile.fpc svneol=native#text/plain
 packages/pcap/Makefile.fpc svneol=native#text/plain
+packages/pcap/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/pcap/fpmake.pp svneol=native#text/plain
 packages/pcap/fpmake.pp svneol=native#text/plain
 packages/pcap/src/pcap.pp svneol=native#text/plain
 packages/pcap/src/pcap.pp svneol=native#text/plain
 packages/postgres/Makefile svneol=native#text/plain
 packages/postgres/Makefile svneol=native#text/plain
@@ -5725,6 +5736,7 @@ packages/proj4/fpmake.pp svneol=native#text/plain
 packages/proj4/src/proj.pas svneol=native#text/plain
 packages/proj4/src/proj.pas svneol=native#text/plain
 packages/ptc/Makefile svneol=native#text/plain
 packages/ptc/Makefile svneol=native#text/plain
 packages/ptc/Makefile.fpc svneol=native#text/plain
 packages/ptc/Makefile.fpc svneol=native#text/plain
+packages/ptc/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/ptc/docs/AUTHORS.txt svneol=native#text/plain
 packages/ptc/docs/AUTHORS.txt svneol=native#text/plain
 packages/ptc/docs/CHANGES.txt svneol=native#text/plain
 packages/ptc/docs/CHANGES.txt svneol=native#text/plain
 packages/ptc/docs/INSTALL.txt svneol=native#text/plain
 packages/ptc/docs/INSTALL.txt svneol=native#text/plain
@@ -5942,6 +5954,7 @@ packages/pthreads/src/pthrlinux.inc svneol=native#text/plain
 packages/pthreads/src/pthrsnos.inc svneol=native#text/plain
 packages/pthreads/src/pthrsnos.inc svneol=native#text/plain
 packages/pxlib/Makefile svneol=native#text/plain
 packages/pxlib/Makefile svneol=native#text/plain
 packages/pxlib/Makefile.fpc svneol=native#text/plain
 packages/pxlib/Makefile.fpc svneol=native#text/plain
+packages/pxlib/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/pxlib/examples/Makefile svneol=native#text/plain
 packages/pxlib/examples/Makefile svneol=native#text/plain
 packages/pxlib/examples/Makefile.fpc svneol=native#text/plain
 packages/pxlib/examples/Makefile.fpc svneol=native#text/plain
 packages/pxlib/examples/ppxview.pp svneol=native#text/plain
 packages/pxlib/examples/ppxview.pp svneol=native#text/plain
@@ -5960,6 +5973,7 @@ packages/regexpr/src/regex.pp svneol=native#text/plain
 packages/regexpr/src/regexpr.pas svneol=native#text/pascal
 packages/regexpr/src/regexpr.pas svneol=native#text/pascal
 packages/rexx/Makefile svneol=native#text/plain
 packages/rexx/Makefile svneol=native#text/plain
 packages/rexx/Makefile.fpc svneol=native#text/plain
 packages/rexx/Makefile.fpc svneol=native#text/plain
+packages/rexx/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/rexx/examples/Makefile svneol=native#text/plain
 packages/rexx/examples/Makefile svneol=native#text/plain
 packages/rexx/examples/Makefile.fpc svneol=native#text/plain
 packages/rexx/examples/Makefile.fpc svneol=native#text/plain
 packages/rexx/examples/backward.fnc svneol=native#text/plain
 packages/rexx/examples/backward.fnc svneol=native#text/plain
@@ -6061,6 +6075,7 @@ packages/tcl/tests/tcl_demo.pp svneol=native#text/plain
 packages/tcl/tests/test.tcl svneol=native#text/plain
 packages/tcl/tests/test.tcl svneol=native#text/plain
 packages/univint/Makefile svneol=native#text/plain
 packages/univint/Makefile svneol=native#text/plain
 packages/univint/Makefile.fpc svneol=native#text/plain
 packages/univint/Makefile.fpc svneol=native#text/plain
+packages/univint/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/univint/examples/Makefile svneol=native#text/plain
 packages/univint/examples/Makefile svneol=native#text/plain
 packages/univint/examples/Makefile.fpc svneol=native#text/plain
 packages/univint/examples/Makefile.fpc svneol=native#text/plain
 packages/univint/examples/controldemo.pas svneol=native#text/plain
 packages/univint/examples/controldemo.pas svneol=native#text/plain
@@ -6517,10 +6532,12 @@ packages/univint/src/x509defs.pas svneol=native#text/plain
 packages/univint/src/xattr.pas svneol=native#text/plain
 packages/univint/src/xattr.pas svneol=native#text/plain
 packages/unixutil/Makefile svneol=native#text/plain
 packages/unixutil/Makefile svneol=native#text/plain
 packages/unixutil/Makefile.fpc svneol=native#text/plain
 packages/unixutil/Makefile.fpc svneol=native#text/plain
+packages/unixutil/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/unixutil/fpmake.pp svneol=native#text/plain
 packages/unixutil/fpmake.pp svneol=native#text/plain
 packages/unixutil/src/unixutils.pp svneol=native#text/plain
 packages/unixutil/src/unixutils.pp svneol=native#text/plain
 packages/unzip/Makefile svneol=native#text/plain
 packages/unzip/Makefile svneol=native#text/plain
 packages/unzip/Makefile.fpc svneol=native#text/plain
 packages/unzip/Makefile.fpc svneol=native#text/plain
+packages/unzip/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/unzip/fpmake.pp svneol=native#text/plain
 packages/unzip/fpmake.pp svneol=native#text/plain
 packages/unzip/src/unzip51g.pp svneol=native#text/plain
 packages/unzip/src/unzip51g.pp svneol=native#text/plain
 packages/unzip/src/unzipdll.pp svneol=native#text/plain
 packages/unzip/src/unzipdll.pp svneol=native#text/plain

+ 91 - 21
packages/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/13]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/14]
 #
 #
 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
@@ -9647,11 +9647,11 @@ chm_shared:  fcl-xml_shared fpmkunit_shared
 chm_smart:  fcl-xml_smart fpmkunit_smart
 chm_smart:  fcl-xml_smart fpmkunit_smart
 chm_debug:  fcl-xml_debug fpmkunit_debug
 chm_debug:  fcl-xml_debug fpmkunit_debug
 chm_release:  fcl-xml_release fpmkunit_release
 chm_release:  fcl-xml_release fpmkunit_release
-fpgtk_all: fcl-base_all gtk1_all
-fpgtk_shared: fcl-base_shared gtk1_shared
-fpgtk_smart: fcl-base_smart gtk1_smart
-fpgtk_debug: fcl-base_debug gtk1_debug
-fpgtk_release: fcl-base_release gtk1_release
+fpgtk_all: fcl-base_all gtk1_all fpmkunit_all
+fpgtk_shared: fcl-base_shared gtk1_shared fpmkunit_shared
+fpgtk_smart: fcl-base_smart gtk1_smart fpmkunit_smart
+fpgtk_debug: fcl-base_debug gtk1_debug fpmkunit_debug
+fpgtk_release: fcl-base_release gtk1_release fpmkunit_release
 ifeq ($(findstring $(OS_TARGET),go32v2),)
 ifeq ($(findstring $(OS_TARGET),go32v2),)
 graph_all: sdl_all
 graph_all: sdl_all
 graph_shared: sdl_shared
 graph_shared: sdl_shared
@@ -9717,33 +9717,43 @@ sdl_shared: pthreads_shared x11_shared fpmkunit_shared
 sdl_smart: pthreads_smart x11_smart fpmkunit_smart
 sdl_smart: pthreads_smart x11_smart fpmkunit_smart
 sdl_debug: pthreads_debug x11_debug fpmkunit_debug
 sdl_debug: pthreads_debug x11_debug fpmkunit_debug
 sdl_release: pthreads_release x11_release_release
 sdl_release: pthreads_release x11_release_release
-opengl_all: x11_all
-opengl_shared: x11_shared
-opengl_smart: x11_smart
-opengl_debug: x11_debug
-opengl_release: x11_release
-ptc_all: x11_all
-ptc_shared: x11_shared
-ptc_smart: x11_smart
-ptc_debug: x11_debug
-ptc_release: x11_release
+opengl_all: x11_all fpmkunit_all
+opengl_shared: x11_shared fpmkunit_shared
+opengl_smart: x11_smart fpmkunit_smart
+opengl_debug: x11_debug fpmkunit_debug
+opengl_release: x11_release fpmkunit_release
+ptc_all: x11_all fpmkunit_all
+ptc_shared: x11_shared fpmkunit_shared
+ptc_smart: x11_smart fpmkunit_smart
+ptc_debug: x11_debug fpmkunit_debug
+ptc_release: x11_release fpmkunit_release
 else
 else
 sdl_all: fpmkunit_all
 sdl_all: fpmkunit_all
 sdl_shared: fpmkunit_shared
 sdl_shared: fpmkunit_shared
 sdl_smart: fpmkunit_smart
 sdl_smart: fpmkunit_smart
 sdl_debug: fpmkunit_debug
 sdl_debug: fpmkunit_debug
 sdl_release: fpmkunit_release
 sdl_release: fpmkunit_release
+ptc_all: fpmkunit_all
+ptc_shared: fpmkunit_shared
+ptc_smart: fpmkunit_smart
+ptc_debug: fpmkunit_debug
+ptc_release: fpmkunit_release
+opengl_all: fpmkunit_all
+opengl_shared: fpmkunit_shared
+opengl_smart: fpmkunit_smart
+opengl_debug: fpmkunit_debug
+opengl_release: fpmkunit_release
 endif
 endif
 tcl_all: fcl-base_all fpmkunit_all
 tcl_all: fcl-base_all fpmkunit_all
 tcl_shared: fcl-base_shared fpmkunit_shared
 tcl_shared: fcl-base_shared fpmkunit_shared
 tcl_smart: fcl-base_smart fpmkunit_smart
 tcl_smart: fcl-base_smart fpmkunit_smart
 tcl_debug: fcl-base_debug fpmkunit_debug
 tcl_debug: fcl-base_debug fpmkunit_debug
 tcl_release: fcl-base_release fpmkunit_release
 tcl_release: fcl-base_release fpmkunit_release
-unixutil_all: libc_all fcl-base_all
-unixutil_shared: libc_shared fcl-base_shared
-unixutil_smart: libc_smart fcl-base_smart
-unixutil_debug: libc_debug fcl-base_debug
-unixutil_release: libc_release fcl-base_release
+unixutil_all: libc_all fcl-base_all fpmkunit_all
+unixutil_shared: libc_shared fcl-base_shared fpkmunit_shared
+unixutil_smart: libc_smart fcl-base_smart fpmkunit_smart
+unixutil_debug: libc_debug fcl-base_debug fpmkunit_debug
+unixutil_release: libc_release fcl-base_release fpmkunit_release
 winunits-base_all: fcl-registry_all fcl-base_all fpmkunit_all
 winunits-base_all: fcl-registry_all fcl-base_all fpmkunit_all
 winunits-base_shared: fcl-registry_shared fcl-base_shared fpmkunit_shared
 winunits-base_shared: fcl-registry_shared fcl-base_shared fpmkunit_shared
 winunits-base_smart: fcl-registry_smart fcl-base_smart fpmkunit_smart
 winunits-base_smart: fcl-registry_smart fcl-base_smart fpmkunit_smart
@@ -10051,3 +10061,63 @@ unzip_shared: fpmkunit_shared
 unzip_smart: fpmkunit_smart
 unzip_smart: fpmkunit_smart
 unzip_debug: fpmkunit_debug
 unzip_debug: fpmkunit_debug
 unzip_release: fpmkunit_release
 unzip_release: fpmkunit_release
+os2units_all: fpmkunit_all
+os2units_shared: fpmkunit_shared
+os2units_smart: fpmkunit_smart
+os2units_debug: fpmkunit_debug
+os2units_release: fpmkunit_release
+gdbint_all: fpmkunit_all
+gdbint_shared: fpmkunit_shared
+gdbint_smart: fpmkunit_smart
+gdbint_debug: fpmkunit_debug
+gdbint_release: fpmkunit_release
+univint_all: fpmkunit_all
+univint_shared: fpmkunit_shared
+univint_smart: fpmkunit_smart
+univint_debug: fpmkunit_debug
+univint_release: fpmkunit_release
+cocoaint_all: fpmkunit_all
+cocoaint_shared: fpmkunit_shared
+cocoaint_smart: fpmkunit_smart
+cocoaint_debug: fpmkunit_debug
+cocoaint_release: fpmkunit_release
+pcap_all: fpmkunit_all
+pcap_shared: fpmkunit_shared
+pcap_smart: fpmkunit_smart
+pcap_debug: fpmkunit_debug
+pcap_release: fpmkunit_release
+pasjpeg_all: fpmkunit_all
+pasjpeg_shared: fpmkunit_shared
+pasjpeg_smart: fpmkunit_smart
+pasjpeg_debug: fpmkunit_debug
+pasjpeg_release: fpmkunit_release
+palmunits_all: fpmkunit_all
+palmunits_shared: fpmkunit_shared
+palmunits_smart: fpmkunit_smart
+palmunits_debug: fpmkunit_debug
+palmunits_release: fpmkunit_release
+opengles_all: fpmkunit_all
+opengles_shared: fpmkunit_shared
+opengles_smart: fpmkunit_smart
+opengles_debug: fpmkunit_debug
+opengles_release: fpmkunit_release
+openssl_all: fpmkunit_all
+openssl_shared: fpmkunit_shared
+openssl_smart: fpmkunit_smart
+openssl_debug: fpmkunit_debug
+openssl_release: fpmkunit_release
+pxlib_all: fpmkunit_all
+pxlib_shared: fpmkunit_shared
+pxlib_smart: fpmkunit_smart
+pxlib_debug: fpmkunit_debug
+pxlib_release: fpmkunit_release
+rexx_all: fpmkunit_all
+rexx_shared: fpmkunit_shared
+rexx_smart: fpmkunit_smart
+rexx_debug: fpmkunit_debug
+rexx_release: fpmkunit_release
+objcrtl_all: fpmkunit_all
+objcrtl_shared: fpmkunit_shared
+objcrtl_smart: fpmkunit_smart
+objcrtl_debug: fpmkunit_debug
+objcrtl_release: fpmkunit_release

+ 106 - 21
packages/Makefile.fpc

@@ -276,11 +276,11 @@ chm_smart:  fcl-xml_smart fpmkunit_smart
 chm_debug:  fcl-xml_debug fpmkunit_debug
 chm_debug:  fcl-xml_debug fpmkunit_debug
 chm_release:  fcl-xml_release fpmkunit_release
 chm_release:  fcl-xml_release fpmkunit_release
 
 
-fpgtk_all: fcl-base_all gtk1_all
-fpgtk_shared: fcl-base_shared gtk1_shared
-fpgtk_smart: fcl-base_smart gtk1_smart
-fpgtk_debug: fcl-base_debug gtk1_debug
-fpgtk_release: fcl-base_release gtk1_release
+fpgtk_all: fcl-base_all gtk1_all fpmkunit_all
+fpgtk_shared: fcl-base_shared gtk1_shared fpmkunit_shared
+fpgtk_smart: fcl-base_smart gtk1_smart fpmkunit_smart
+fpgtk_debug: fcl-base_debug gtk1_debug fpmkunit_debug
+fpgtk_release: fcl-base_release gtk1_release fpmkunit_release
 
 
 ifeq ($(findstring $(OS_TARGET),go32v2),)
 ifeq ($(findstring $(OS_TARGET),go32v2),)
 graph_all: sdl_all
 graph_all: sdl_all
@@ -357,23 +357,36 @@ sdl_smart: pthreads_smart x11_smart fpmkunit_smart
 sdl_debug: pthreads_debug x11_debug fpmkunit_debug
 sdl_debug: pthreads_debug x11_debug fpmkunit_debug
 sdl_release: pthreads_release x11_release_release
 sdl_release: pthreads_release x11_release_release
 
 
-opengl_all: x11_all
-opengl_shared: x11_shared
-opengl_smart: x11_smart
-opengl_debug: x11_debug
-opengl_release: x11_release
-
-ptc_all: x11_all
-ptc_shared: x11_shared
-ptc_smart: x11_smart
-ptc_debug: x11_debug
-ptc_release: x11_release
+opengl_all: x11_all fpmkunit_all
+opengl_shared: x11_shared fpmkunit_shared
+opengl_smart: x11_smart fpmkunit_smart
+opengl_debug: x11_debug fpmkunit_debug
+opengl_release: x11_release fpmkunit_release
+
+ptc_all: x11_all fpmkunit_all
+ptc_shared: x11_shared fpmkunit_shared
+ptc_smart: x11_smart fpmkunit_smart
+ptc_debug: x11_debug fpmkunit_debug
+ptc_release: x11_release fpmkunit_release
 else
 else
 sdl_all: fpmkunit_all
 sdl_all: fpmkunit_all
 sdl_shared: fpmkunit_shared
 sdl_shared: fpmkunit_shared
 sdl_smart: fpmkunit_smart
 sdl_smart: fpmkunit_smart
 sdl_debug: fpmkunit_debug
 sdl_debug: fpmkunit_debug
 sdl_release: fpmkunit_release
 sdl_release: fpmkunit_release
+
+ptc_all: fpmkunit_all
+ptc_shared: fpmkunit_shared
+ptc_smart: fpmkunit_smart
+ptc_debug: fpmkunit_debug
+ptc_release: fpmkunit_release
+
+opengl_all: fpmkunit_all
+opengl_shared: fpmkunit_shared
+opengl_smart: fpmkunit_smart
+opengl_debug: fpmkunit_debug
+opengl_release: fpmkunit_release
+
 endif
 endif
 
 
 tcl_all: fcl-base_all fpmkunit_all
 tcl_all: fcl-base_all fpmkunit_all
@@ -382,11 +395,11 @@ tcl_smart: fcl-base_smart fpmkunit_smart
 tcl_debug: fcl-base_debug fpmkunit_debug
 tcl_debug: fcl-base_debug fpmkunit_debug
 tcl_release: fcl-base_release fpmkunit_release
 tcl_release: fcl-base_release fpmkunit_release
 
 
-unixutil_all: libc_all fcl-base_all
-unixutil_shared: libc_shared fcl-base_shared
-unixutil_smart: libc_smart fcl-base_smart
-unixutil_debug: libc_debug fcl-base_debug
-unixutil_release: libc_release fcl-base_release
+unixutil_all: libc_all fcl-base_all fpmkunit_all
+unixutil_shared: libc_shared fcl-base_shared fpkmunit_shared
+unixutil_smart: libc_smart fcl-base_smart fpmkunit_smart
+unixutil_debug: libc_debug fcl-base_debug fpmkunit_debug
+unixutil_release: libc_release fcl-base_release fpmkunit_release
 
 
 winunits-base_all: fcl-registry_all fcl-base_all fpmkunit_all
 winunits-base_all: fcl-registry_all fcl-base_all fpmkunit_all
 winunits-base_shared: fcl-registry_shared fcl-base_shared fpmkunit_shared
 winunits-base_shared: fcl-registry_shared fcl-base_shared fpmkunit_shared
@@ -757,3 +770,75 @@ unzip_smart: fpmkunit_smart
 unzip_debug: fpmkunit_debug
 unzip_debug: fpmkunit_debug
 unzip_release: fpmkunit_release
 unzip_release: fpmkunit_release
 
 
+os2units_all: fpmkunit_all
+os2units_shared: fpmkunit_shared
+os2units_smart: fpmkunit_smart
+os2units_debug: fpmkunit_debug
+os2units_release: fpmkunit_release
+
+gdbint_all: fpmkunit_all
+gdbint_shared: fpmkunit_shared
+gdbint_smart: fpmkunit_smart
+gdbint_debug: fpmkunit_debug
+gdbint_release: fpmkunit_release
+
+univint_all: fpmkunit_all
+univint_shared: fpmkunit_shared
+univint_smart: fpmkunit_smart
+univint_debug: fpmkunit_debug
+univint_release: fpmkunit_release
+
+cocoaint_all: fpmkunit_all
+cocoaint_shared: fpmkunit_shared
+cocoaint_smart: fpmkunit_smart
+cocoaint_debug: fpmkunit_debug
+cocoaint_release: fpmkunit_release
+
+pcap_all: fpmkunit_all
+pcap_shared: fpmkunit_shared
+pcap_smart: fpmkunit_smart
+pcap_debug: fpmkunit_debug
+pcap_release: fpmkunit_release
+
+pasjpeg_all: fpmkunit_all
+pasjpeg_shared: fpmkunit_shared
+pasjpeg_smart: fpmkunit_smart
+pasjpeg_debug: fpmkunit_debug
+pasjpeg_release: fpmkunit_release
+
+palmunits_all: fpmkunit_all
+palmunits_shared: fpmkunit_shared
+palmunits_smart: fpmkunit_smart
+palmunits_debug: fpmkunit_debug
+palmunits_release: fpmkunit_release
+
+opengles_all: fpmkunit_all
+opengles_shared: fpmkunit_shared
+opengles_smart: fpmkunit_smart
+opengles_debug: fpmkunit_debug
+opengles_release: fpmkunit_release
+
+openssl_all: fpmkunit_all
+openssl_shared: fpmkunit_shared
+openssl_smart: fpmkunit_smart
+openssl_debug: fpmkunit_debug
+openssl_release: fpmkunit_release
+
+pxlib_all: fpmkunit_all
+pxlib_shared: fpmkunit_shared
+pxlib_smart: fpmkunit_smart
+pxlib_debug: fpmkunit_debug
+pxlib_release: fpmkunit_release
+
+rexx_all: fpmkunit_all
+rexx_shared: fpmkunit_shared
+rexx_smart: fpmkunit_smart
+rexx_debug: fpmkunit_debug
+rexx_release: fpmkunit_release
+
+objcrtl_all: fpmkunit_all
+objcrtl_shared: fpmkunit_shared
+objcrtl_smart: fpmkunit_smart
+objcrtl_debug: fpmkunit_debug
+objcrtl_release: fpmkunit_release
+

File diff suppressed because it is too large
+ 260 - 649
packages/cocoaint/Makefile


+ 59 - 14
packages/cocoaint/Makefile.fpc

@@ -1,31 +1,76 @@
 #
 #
-#   Makefile.fpc for Apple Universal Interfaces for Free Pascal
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=cocoaint
 name=cocoaint
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=CocoaAll WebKit CoreData
-implicitunits=AnonClassDefinitionsQuartzcore AnonClassDefinitionsWebkit
-
-[libs]
-libversion=2.5.1
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-sourcedir=src
-
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[require]
-packages=univint
+[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)
 
 
 [rules]
 [rules]
-WebKit$(PPUEXT): CocoaAll$(PPUEXT)
+.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
 
 
-CoreData$(PPUEXT): CocoaAll$(PPUEXT)

+ 31 - 0
packages/cocoaint/Makefile.fpc.fpcmake

@@ -0,0 +1,31 @@
+#
+#   Makefile.fpc for Apple Universal Interfaces for Free Pascal
+#
+
+[package]
+name=cocoaint
+version=2.7.1
+
+[target]
+units=CocoaAll WebKit CoreData
+implicitunits=AnonClassDefinitionsQuartzcore AnonClassDefinitionsWebkit
+
+[libs]
+libversion=2.5.1
+
+[install]
+fpcpackage=y
+
+[compiler]
+sourcedir=src
+
+[default]
+fpcdir=../..
+
+[require]
+packages=univint
+
+[rules]
+WebKit$(PPUEXT): CocoaAll$(PPUEXT)
+
+CoreData$(PPUEXT): CocoaAll$(PPUEXT)

File diff suppressed because it is too large
+ 9 - 857
packages/fpgtk/Makefile


+ 59 - 9
packages/fpgtk/Makefile.fpc

@@ -1,16 +1,13 @@
 #
 #
-#   Makefile.fpc for fpgtk
+#   Makefile.fpc for running fpmake
 #
 #
-[require]
-packages=fcl-base gtk1
 
 
 [package]
 [package]
 name=fpgtk
 name=fpgtk
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=fpglib fpgtk fpgtkext
-rsts=fpgtk fpgtkext
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -18,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src src/editor src/def src/pgtk tests
+[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)
 
 
 [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
+

+ 26 - 0
packages/fpgtk/Makefile.fpc.fpcmake

@@ -0,0 +1,26 @@
+#
+#   Makefile.fpc for fpgtk
+#
+[require]
+packages=fcl-base gtk1
+
+[package]
+name=fpgtk
+version=2.7.1
+
+[target]
+units=fpglib fpgtk fpgtkext
+rsts=fpgtk fpgtkext
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src src/editor src/def src/pgtk tests
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 8 - 1166
packages/gdbint/Makefile


+ 44 - 161
packages/gdbint/Makefile.fpc

@@ -1,24 +1,13 @@
 #
 #
-#   Makefile.fpc for Free Pascal GDB Interface
+#   Makefile.fpc for running fpmake
 #
 #
 
 
-
 [package]
 [package]
 name=gdbint
 name=gdbint
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=gdbint gdbcon
-examples=examples/testgdb examples/symify
-
-[compiler]
-objectdir=$(GDBLIBDIR)
-librarydir=$(GDBLIBDIR)
-includedir=$(GDBLIBDIR) src
-sourcedir=src tests
-
 [require]
 [require]
-libc=y
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -26,168 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-
 [prerules]
 [prerules]
-# For unix be sure to use the locally created gdbver
-ifdef inUnix
-CURRDIR=./
-else
-CURRDIR=
-endif
-
-# Look for a valid GDBLIBDIR environment variable
-ifdef GDBLIBDIR
-override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
-endif
-
-# Use default dirs if not available
-ifeq ($(LIBGDBFILE),)
-# Default locations <target>/<cpu> (linux) or <target> (win32,go32v2) only
-override GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))
-ifeq ($(GDBLIBDIR),)
-override GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)
-endif
-# Detect if libgdb.a is available
-override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
-endif
-
-# Set GDBFOUND variable
-ifeq ($(LIBGDBFILE),)
-GDBFOUND=0
-else
-GDBFOUND=1
-# Detect if gdblib.inc is available
-override LIBGDBINC:=$(firstword $(wildcard $(addsuffix /gdblib.inc,$(GDBLIBDIR))))
-ifeq ($(LIBGDBINC),)
-GDBLIBINCFOUND=0
-GDBLIBINCCOND=
-else
-GDBLIBINCFOUND=1
-GDBLIBINCCOND=-dUSE_GDBLIBINC
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
 endif
 endif
-ifdef NO_GDBLIBINC
-GDBLIBINCFOUND=0
-GDBLIBINCCOND=
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
 endif
 endif
-endif
-
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 
 [rules]
 [rules]
-ifeq ($(FULL_SOURCE),$(FULL_TARGET))
-CAN_RUN_GDBVER=1
-endif
-
-ifeq ($(FULL_SOURCE),i386-win32)
-ifeq ($(FULL_TARGET),i386-go32v2)
-CAN_RUN_GDBVER=1
-endif
-endif
-
-
-ifdef CAN_RUN_GDBVER
-ifeq ($(GDBFOUND),1)
-# libgdb.a found
-
-$(CURRDIR)getver$(EXEEXT) : gdbver.pp
-	$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
-
-ifndef GOTGDBVER
-# gdbver doesn't exists, build it first
-gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
-	$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
-else
-# gdbver exists
-GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
-gdbver.inc: gdbver$(EXEEXT)
-        ./gdbver$(EXEEXT) -o gdbver.inc
-gdbint$(PPUEXT): gdbint.pp gdbver.inc
-# MingW?
-ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
-	@$(ECHO) Using GDB $(GDBVER)
-        $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -Fisrc -Fusrc src/gdbint.pp
-else
-	@$(ECHO) Using GDB $(GDBVER) \(MingW\)
-	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -dUSE_MINGW_GDB -Fisrc -Fusrc src/gdbint.pp
-endif
-	$(DEL) gdbver$(EXEEXT) gdbver$(OEXT)
-endif
-
-else
-# libgdb.a not found, default to libgdb v6
-GDBVER=GDB_V606
-gdbver.inc:
-        $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
-gdbint$(PPUEXT): gdbint.pp gdbver.inc
-	@$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
-	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND)  -Fisrc -Fusrc src/gdbint.pp
-        $(DEL) src/gdbver.inc
-endif
+.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
 else
-# Different OS_TARGET, default to libgdb v6
-GDBVER=GDB_V606
-gdbver.inc:
-        $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
-gdbint$(PPUEXT): gdbint.pp gdbver.inc
-	@$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
-	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND)  -Fisrc -Fusrc src/gdbint.pp
+clean:	
+	$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
 endif
 endif
-
-gdbcon$(PPUEXT): gdbcon.pp gdbint$(PPUEXT)
-ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
-        $(COMPILER) src/gdbcon.pp
+# 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
 else
-        $(COMPILER) -dUSE_MINGW_GDB src/gdbcon.pp
-endif
-	$(EXECPPAS)
-
-ifeq ($(OS_TARGET),go32v2)
-DBGCOM=dbgcom$(OEXT)
+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
 else
-DBGCOM=
+        $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
 endif
 endif
-
-ifdef $(COMPILEDBGCOM)
-# FPC conditionnal remove the file watching mecanism introduced
-# in v2.02 of dbgcom.c because it relies
-# on the fact that all files are opened via C lib calls
-# which is wrong for FPC !!
-$(DBGCOM): ../v4.16/dbgcom.c
-	gcc -c -DFPC -Dother_sel -gstabs -o dbgcom.o -I../v4.16 ../v4.16/dbgcom.c
-else
-$(DBGCOM):
+	-$(DEL) $(LOCALFPMAKE)
 endif
 endif
-
-simple: $(DBGCOM)
-	-rm gdbint.ppu
-	ppc386 -dUSE_LIBGDB -fisrc -fusrc gdbint
-	ppc386 testgdb
-
-examples/testgdb$(EXEEXT): examples/testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
-ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
-	$(COMPILER) -FEexamples  examples/testgdb.pp
+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
 else
-	$(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/testgdb.pp
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
 endif
 endif
-	$(EXECPPAS)
-
-examples/symify$(EXEEXT): examples/symify.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
-ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
-        $(COMPILER) -FEexamples  examples/symify.pp
+# 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
 else
-        $(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/symify.pp
+	$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
 endif
 endif
-	$(EXECPPAS)
 
 
-# Allow test for example
-.PHONY: test
-
-test: examples
-
-clean: fpc_clean
-	$(DEL) src/gdbver$(EXEEXT) src/gdbver$(OEXT)
-
-distclean: fpc_distclean
-	$(DEL) src/gdbver.inc
-
-.NOTPARALLEL:

+ 193 - 0
packages/gdbint/Makefile.fpc.fpcmake

@@ -0,0 +1,193 @@
+#
+#   Makefile.fpc for Free Pascal GDB Interface
+#
+
+
+[package]
+name=gdbint
+version=2.7.1
+
+[target]
+units=gdbint gdbcon
+examples=examples/testgdb examples/symify
+
+[compiler]
+objectdir=$(GDBLIBDIR)
+librarydir=$(GDBLIBDIR)
+includedir=$(GDBLIBDIR) src
+sourcedir=src tests
+
+[require]
+libc=y
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+
+[prerules]
+# For unix be sure to use the locally created gdbver
+ifdef inUnix
+CURRDIR=./
+else
+CURRDIR=
+endif
+
+# Look for a valid GDBLIBDIR environment variable
+ifdef GDBLIBDIR
+override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
+endif
+
+# Use default dirs if not available
+ifeq ($(LIBGDBFILE),)
+# Default locations <target>/<cpu> (linux) or <target> (win32,go32v2) only
+override GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))
+ifeq ($(GDBLIBDIR),)
+override GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)
+endif
+# Detect if libgdb.a is available
+override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
+endif
+
+# Set GDBFOUND variable
+ifeq ($(LIBGDBFILE),)
+GDBFOUND=0
+else
+GDBFOUND=1
+# Detect if gdblib.inc is available
+override LIBGDBINC:=$(firstword $(wildcard $(addsuffix /gdblib.inc,$(GDBLIBDIR))))
+ifeq ($(LIBGDBINC),)
+GDBLIBINCFOUND=0
+GDBLIBINCCOND=
+else
+GDBLIBINCFOUND=1
+GDBLIBINCCOND=-dUSE_GDBLIBINC
+endif
+ifdef NO_GDBLIBINC
+GDBLIBINCFOUND=0
+GDBLIBINCCOND=
+endif
+endif
+
+
+[rules]
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+CAN_RUN_GDBVER=1
+endif
+
+ifeq ($(FULL_SOURCE),i386-win32)
+ifeq ($(FULL_TARGET),i386-go32v2)
+CAN_RUN_GDBVER=1
+endif
+endif
+
+
+ifdef CAN_RUN_GDBVER
+ifeq ($(GDBFOUND),1)
+# libgdb.a found
+
+$(CURRDIR)getver$(EXEEXT) : gdbver.pp
+	$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
+
+ifndef GOTGDBVER
+# gdbver doesn't exists, build it first
+gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
+	$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
+else
+# gdbver exists
+GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
+gdbver.inc: gdbver$(EXEEXT)
+        ./gdbver$(EXEEXT) -o gdbver.inc
+gdbint$(PPUEXT): gdbint.pp gdbver.inc
+# MingW?
+ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
+	@$(ECHO) Using GDB $(GDBVER)
+        $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -Fisrc -Fusrc src/gdbint.pp
+else
+	@$(ECHO) Using GDB $(GDBVER) \(MingW\)
+	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -dUSE_MINGW_GDB -Fisrc -Fusrc src/gdbint.pp
+endif
+	$(DEL) gdbver$(EXEEXT) gdbver$(OEXT)
+endif
+
+else
+# libgdb.a not found, default to libgdb v6
+GDBVER=GDB_V606
+gdbver.inc:
+        $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
+gdbint$(PPUEXT): gdbint.pp gdbver.inc
+	@$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
+	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND)  -Fisrc -Fusrc src/gdbint.pp
+        $(DEL) src/gdbver.inc
+endif
+
+else
+# Different OS_TARGET, default to libgdb v6
+GDBVER=GDB_V606
+gdbver.inc:
+        $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
+gdbint$(PPUEXT): gdbint.pp gdbver.inc
+	@$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
+	$(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND)  -Fisrc -Fusrc src/gdbint.pp
+endif
+
+gdbcon$(PPUEXT): gdbcon.pp gdbint$(PPUEXT)
+ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
+        $(COMPILER) src/gdbcon.pp
+else
+        $(COMPILER) -dUSE_MINGW_GDB src/gdbcon.pp
+endif
+	$(EXECPPAS)
+
+ifeq ($(OS_TARGET),go32v2)
+DBGCOM=dbgcom$(OEXT)
+else
+DBGCOM=
+endif
+
+ifdef $(COMPILEDBGCOM)
+# FPC conditionnal remove the file watching mecanism introduced
+# in v2.02 of dbgcom.c because it relies
+# on the fact that all files are opened via C lib calls
+# which is wrong for FPC !!
+$(DBGCOM): ../v4.16/dbgcom.c
+	gcc -c -DFPC -Dother_sel -gstabs -o dbgcom.o -I../v4.16 ../v4.16/dbgcom.c
+else
+$(DBGCOM):
+endif
+
+simple: $(DBGCOM)
+	-rm gdbint.ppu
+	ppc386 -dUSE_LIBGDB -fisrc -fusrc gdbint
+	ppc386 testgdb
+
+examples/testgdb$(EXEEXT): examples/testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
+ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
+	$(COMPILER) -FEexamples  examples/testgdb.pp
+else
+	$(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/testgdb.pp
+endif
+	$(EXECPPAS)
+
+examples/symify$(EXEEXT): examples/symify.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
+ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
+        $(COMPILER) -FEexamples  examples/symify.pp
+else
+        $(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/symify.pp
+endif
+	$(EXECPPAS)
+
+# Allow test for example
+.PHONY: test
+
+test: examples
+
+clean: fpc_clean
+	$(DEL) src/gdbver$(EXEEXT) src/gdbver$(OEXT)
+
+distclean: fpc_distclean
+	$(DEL) src/gdbver.inc
+
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 261 - 587
packages/objcrtl/Makefile


+ 60 - 7
packages/objcrtl/Makefile.fpc

@@ -1,13 +1,13 @@
 #
 #
-#   Makefile.fpc for objective-c runtime library bindings
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
-name=obcjrtl
+name=objcrtl
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=objcrtl objcrtl10 objcrtl20 objcrtliphoneos objcrtlmacosx objcrtlutils
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -15,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src
+[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)
 
 
 [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
+

+ 23 - 0
packages/objcrtl/Makefile.fpc.fpcmake

@@ -0,0 +1,23 @@
+#
+#   Makefile.fpc for objective-c runtime library bindings
+#
+
+[package]
+name=obcjrtl
+version=2.7.1
+
+[target]
+units=objcrtl objcrtl10 objcrtl20 objcrtliphoneos objcrtlmacosx objcrtlutils
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 8 - 976
packages/opengl/Makefile


+ 59 - 25
packages/opengl/Makefile.fpc

@@ -1,5 +1,5 @@
 #
 #
-#   Makefile.fpc for OpenGL for FPC
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
@@ -7,36 +7,70 @@ name=opengl
 version=2.7.1
 version=2.7.1
 
 
 [require]
 [require]
-packages_linux=x11
-packages_freebsd=x11
-packages_netbsd=x11
-packages_openbsd=x11
-packages_darwin=x11
-packages_i386_iphonesim=x11
-
-[target]
-units=gl glu glut
-units_win32=glext
-units_win64=glext
-units_haiku=glext
-units_linux=glx glext
-units_freebsd=glx glext
-units_netbsd=glx glext
-units_openbsd=glx glext
-units_darwin=glx glext
-exampledirs=examples
-
-implicitunits=freeglut
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-includedir=src
-sourcedir=src tests examples
-
 [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)
+
 [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
+

+ 42 - 0
packages/opengl/Makefile.fpc.fpcmake

@@ -0,0 +1,42 @@
+#
+#   Makefile.fpc for OpenGL for FPC
+#
+
+[package]
+name=opengl
+version=2.7.1
+
+[require]
+packages_linux=x11
+packages_freebsd=x11
+packages_netbsd=x11
+packages_openbsd=x11
+packages_darwin=x11
+packages_i386_iphonesim=x11
+
+[target]
+units=gl glu glut
+units_win32=glext
+units_win64=glext
+units_haiku=glext
+units_linux=glx glext
+units_freebsd=glx glext
+units_netbsd=glx glext
+units_openbsd=glx glext
+units_darwin=glx glext
+exampledirs=examples
+
+implicitunits=freeglut
+
+[install]
+fpcpackage=y
+
+[compiler]
+includedir=src
+sourcedir=src tests examples
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 261 - 644
packages/opengles/Makefile


+ 60 - 18
packages/opengles/Makefile.fpc

@@ -1,34 +1,76 @@
 #
 #
-#   Makefile.fpc for OpenGL ES for FPC
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=opengles
 name=opengles
 version=2.7.1
 version=2.7.1
 
 
-# [require]
-# packages_linux=x11
-#
-
-[target]
-units_arm_darwin=gles11
-units_i386_iphonesim=gles11
-units_linux=gles20
-units_wince=gles20
-units_win32=gles20
-units_win64=gles20
-units_darwin=gles20
-exampledirs=examples
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-includedir=src
-sourcedir=src examples
-
 [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)
+
 [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
+

+ 34 - 0
packages/opengles/Makefile.fpc.fpcmake

@@ -0,0 +1,34 @@
+#
+#   Makefile.fpc for OpenGL ES for FPC
+#
+
+[package]
+name=opengles
+version=2.7.1
+
+# [require]
+# packages_linux=x11
+#
+
+[target]
+units_arm_darwin=gles11
+units_i386_iphonesim=gles11
+units_linux=gles20
+units_wince=gles20
+units_win32=gles20
+units_win64=gles20
+units_darwin=gles20
+exampledirs=examples
+
+[install]
+fpcpackage=y
+
+[compiler]
+includedir=src
+sourcedir=src examples
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 260 - 586
packages/openssl/Makefile


+ 59 - 6
packages/openssl/Makefile.fpc

@@ -1,13 +1,13 @@
 #
 #
-#   Makefile.fpc for OpenSSL bindings
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=openssl
 name=openssl
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=openssl
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -15,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src tests examples
+[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)
 
 
 [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
+

+ 23 - 0
packages/openssl/Makefile.fpc.fpcmake

@@ -0,0 +1,23 @@
+#
+#   Makefile.fpc for OpenSSL bindings
+#
+
+[package]
+name=openssl
+version=2.7.1
+
+[target]
+units=openssl
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src tests examples
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 261 - 807
packages/os2units/Makefile


+ 58 - 10
packages/os2units/Makefile.fpc

@@ -1,5 +1,5 @@
 #
 #
-#   Makefile.fpc for SDL bindings
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
@@ -7,12 +7,7 @@ name=os2units
 version=2.7.1
 version=2.7.1
 
 
 [require]
 [require]
-libc=y
-
-[target]
-units=buildall clkdll dive ftpapi hwvideo lvm mciapi mcidrv mci mmbase mmio sw
-# som wpstk
-exampledirs=examples
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -20,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src tests examples
+[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)
 
 
 [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/os2units/Makefile.fpc.fpcmake

@@ -0,0 +1,28 @@
+#
+#   Makefile.fpc for SDL bindings
+#
+
+[package]
+name=os2units
+version=2.7.1
+
+[require]
+libc=y
+
+[target]
+units=buildall clkdll dive ftpapi hwvideo lvm mciapi mcidrv mci mmbase mmio sw
+# som wpstk
+exampledirs=examples
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src tests examples
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 260 - 586
packages/palmunits/Makefile


+ 59 - 20
packages/palmunits/Makefile.fpc

@@ -1,27 +1,13 @@
 #
 #
-#   Makefile.fpc for the Multimedia Toolkit (interface units for MMPM)
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=palmunits
 name=palmunits
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=aboutbox alarmmgr applaunchcmd attentionmgr bitmap category chars clipboard \
-connectionmgr consolemgr control coretraps crc datamgr datetime day dlserver \
-encrypt errorbase event_ exglib exgmgr expansionmgr fatalalert featuremgr \
-field filestream find_ floatmgr font fontselect_ form fslib graffiti \
-graffitireference graffitishift hal helper helperserviceclass hwrmiscflags \
-imcutils inetmgr inspoint intlmgr irlib keyboard keymgr launcher libtraps \
-list localemgr localize lz77mgr m68khwr memorymgr menu_ modemmgr  \
-netbitutils netmgr notifymgr overlaymgr palmcompatibility palmlocale palmos \
-password pdiconst pdilib penmgr phonelookup preferences privaterecords progress \
-rect scrollbar selday seltime seltimezone seriallinkmgr serialmgr serialmgrold \
-slotdrvrlib smslib soundmgr stringmgr sysevent sysevtmgr systemmgr \
-systemresources sysutil table telephonymgr telephonymgrtypes telephonymgrui \
-textmgr textservicesmgr timemgr udamgr uicolor uicontrols uiresources vfsmgr window
-
-exampledirs=
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -29,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src tests
+[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)
 
 
 [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
+

+ 37 - 0
packages/palmunits/Makefile.fpc.fpcmake

@@ -0,0 +1,37 @@
+#
+#   Makefile.fpc for the Multimedia Toolkit (interface units for MMPM)
+#
+
+[package]
+name=palmunits
+version=2.7.1
+
+[target]
+units=aboutbox alarmmgr applaunchcmd attentionmgr bitmap category chars clipboard \
+connectionmgr consolemgr control coretraps crc datamgr datetime day dlserver \
+encrypt errorbase event_ exglib exgmgr expansionmgr fatalalert featuremgr \
+field filestream find_ floatmgr font fontselect_ form fslib graffiti \
+graffitireference graffitishift hal helper helperserviceclass hwrmiscflags \
+imcutils inetmgr inspoint intlmgr irlib keyboard keymgr launcher libtraps \
+list localemgr localize lz77mgr m68khwr memorymgr menu_ modemmgr  \
+netbitutils netmgr notifymgr overlaymgr palmcompatibility palmlocale palmos \
+password pdiconst pdilib penmgr phonelookup preferences privaterecords progress \
+rect scrollbar selday seltime seltimezone seriallinkmgr serialmgr serialmgrold \
+slotdrvrlib smslib soundmgr stringmgr sysevent sysevtmgr systemmgr \
+systemresources sysutil table telephonymgr telephonymgrtypes telephonymgrui \
+textmgr textservicesmgr timemgr udamgr uicolor uicontrols uiresources vfsmgr window
+
+exampledirs=
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src tests
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 260 - 775
packages/pasjpeg/Makefile


+ 60 - 14
packages/pasjpeg/Makefile.fpc

@@ -1,30 +1,76 @@
 #
 #
-#   Makefile.fpc for PasJPEG
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=pasjpeg
 name=pasjpeg
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=buildpasjpeg jctrans
-implicitunits=jcapimin jcapistd jccoefct jccolor jcdctmgr jchuff jcinit jcmainct \
-      jcmarker jcmaster jcomapi jcparam jcphuff jcprepct jcsample jdapimin \
-      jdapistd jdatadst jdatasrc jdcoefct jdcolor jdct jddctmgr jdeferr \
-      jdhuff jdinput jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct \
-      jdsample jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst \
-      jidctint jidctred jinclude jmemmgr jmemnobs jmorecfg jpeglib \
-      jquant1 jquant2 jutils
-examples=cjpeg demo djpeg jpegtran rdjpgcom
+[require]
+packages=rtl fpmkunit
 
 
 [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)
+
 [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
+

+ 30 - 0
packages/pasjpeg/Makefile.fpc.fpcmake

@@ -0,0 +1,30 @@
+#
+#   Makefile.fpc for PasJPEG
+#
+
+[package]
+name=pasjpeg
+version=2.7.1
+
+[target]
+units=buildpasjpeg jctrans
+implicitunits=jcapimin jcapistd jccoefct jccolor jcdctmgr jchuff jcinit jcmainct \
+      jcmarker jcmaster jcomapi jcparam jcphuff jcprepct jcsample jdapimin \
+      jdapistd jdatadst jdatasrc jdcoefct jdcolor jdct jddctmgr jdeferr \
+      jdhuff jdinput jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct \
+      jdsample jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst \
+      jidctint jidctred jinclude jmemmgr jmemnobs jmorecfg jpeglib \
+      jquant1 jquant2 jutils
+examples=cjpeg demo djpeg jpegtran rdjpgcom
+
+[install]
+fpcpackage=y
+
+[compiler]
+sourcedir=src
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 260 - 586
packages/pcap/Makefile


+ 59 - 6
packages/pcap/Makefile.fpc

@@ -1,13 +1,13 @@
 #
 #
-#   Makefile.fpc for pcap bindings
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=pcap
 name=pcap
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=pcap
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -15,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src tests
+[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)
 
 
 [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
+

+ 23 - 0
packages/pcap/Makefile.fpc.fpcmake

@@ -0,0 +1,23 @@
+#
+#   Makefile.fpc for pcap bindings
+#
+
+[package]
+name=pcap
+version=2.7.1
+
+[target]
+units=pcap
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src tests
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 9 - 771
packages/ptc/Makefile


+ 61 - 22
packages/ptc/Makefile.fpc

@@ -1,37 +1,76 @@
 #
 #
-#   Makefile.fpc for PTCPas
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=ptc
 name=ptc
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=ptc ptcwrapper ptceventqueue
-units_win32=p_ddraw
-units_win64=p_ddraw
-exampledirs=examples
-
-[compiler]
-#unitdir=src/ptcwrapper src/x11
-unitdir_go32v2=src/dos/base src/dos/cga src/dos/vga src/dos/textfx2 src/dos/timeunit src/dos/vesa
-unitdir_win32=src/win32/directx
-unitdir_win64=src/win32/directx
-sourcedir_win32=src/win32/directx
-sourcedir_win64=src/win32/directx
-unitdir_wince=src/wince/gapi
-sourcedir=src src/ptcwrapper
-
 [require]
 [require]
-packages=hermes fcl-base
-packages_linux=x11
-packages_freebsd=x11
+packages=rtl fpmkunit
+
+[install]
+fpcpackage=y
 
 
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[install]
-fpcpackage=y
+[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)
 
 
 [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
+

+ 37 - 0
packages/ptc/Makefile.fpc.fpcmake

@@ -0,0 +1,37 @@
+#
+#   Makefile.fpc for PTCPas
+#
+
+[package]
+name=ptc
+version=2.7.1
+
+[target]
+units=ptc ptcwrapper ptceventqueue
+units_win32=p_ddraw
+units_win64=p_ddraw
+exampledirs=examples
+
+[compiler]
+#unitdir=src/ptcwrapper src/x11
+unitdir_go32v2=src/dos/base src/dos/cga src/dos/vga src/dos/textfx2 src/dos/timeunit src/dos/vesa
+unitdir_win32=src/win32/directx
+unitdir_win64=src/win32/directx
+sourcedir_win32=src/win32/directx
+sourcedir_win64=src/win32/directx
+unitdir_wince=src/wince/gapi
+sourcedir=src src/ptcwrapper
+
+[require]
+packages=hermes fcl-base
+packages_linux=x11
+packages_freebsd=x11
+
+[default]
+fpcdir=../..
+
+[install]
+fpcpackage=y
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 412 - 370
packages/pxlib/Makefile


+ 60 - 23
packages/pxlib/Makefile.fpc

@@ -1,39 +1,76 @@
 #
 #
-#   Makefile.fpc for MD5 checksum.
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=pxlib
 name=pxlib
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units_beos=pxlib
-units_haiku=pxlib
-units_linux=pxlib
-units_win32=pxlib
-units_darwin=pxlib
-units_iphonesim=pxlib
-units_freebsd=pxlib
-units_openbsd=pxlib
-units_netbsd=pxlib
-exampledirs_beos=examples
-exampledirs_haiku=examples
-exampledirs_linux=examples
-exampledirs_win32=examples
-exampledirs_darwin=examples
-exampledirs_iphonesim=examples
-exampledirs_freebsd=examples
-exampledirs_openbsd=examples
-exampledirs_netbsd=examples
+[require]
+packages=rtl fpmkunit
 
 
 [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)
+
 [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
+

+ 39 - 0
packages/pxlib/Makefile.fpc.fpcmake

@@ -0,0 +1,39 @@
+#
+#   Makefile.fpc for MD5 checksum.
+#
+
+[package]
+name=pxlib
+version=2.7.1
+
+[target]
+units_beos=pxlib
+units_haiku=pxlib
+units_linux=pxlib
+units_win32=pxlib
+units_darwin=pxlib
+units_iphonesim=pxlib
+units_freebsd=pxlib
+units_openbsd=pxlib
+units_netbsd=pxlib
+exampledirs_beos=examples
+exampledirs_haiku=examples
+exampledirs_linux=examples
+exampledirs_win32=examples
+exampledirs_darwin=examples
+exampledirs_iphonesim=examples
+exampledirs_freebsd=examples
+exampledirs_openbsd=examples
+exampledirs_netbsd=examples
+
+[install]
+fpcpackage=y
+
+[compiler]
+sourcedir=src
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 261 - 776
packages/rexx/Makefile


+ 59 - 8
packages/rexx/Makefile.fpc

@@ -1,15 +1,13 @@
 #
 #
-#   Makefile.fpc for OpenGL for FPC
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=rexx
 name=rexx
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=rexxsaa
-
-exampledirs=examples
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -17,9 +15,62 @@ fpcpackage=y
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
-[compiler]
-includedir=src
-sourcedir=src tests examples
+[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)
 
 
 [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
+

+ 25 - 0
packages/rexx/Makefile.fpc.fpcmake

@@ -0,0 +1,25 @@
+#
+#   Makefile.fpc for OpenGL for FPC
+#
+
+[package]
+name=rexx
+version=2.7.1
+
+[target]
+units=rexxsaa
+
+exampledirs=examples
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+includedir=src
+sourcedir=src tests examples
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 1 - 192
packages/univint/Makefile


+ 59 - 107
packages/univint/Makefile.fpc

@@ -1,124 +1,76 @@
 #
 #
-#   Makefile.fpc for Apple Universal Interfaces for Free Pascal
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=univint
 name=univint
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=MacOSAll MacOS
-implicitunits=ABActions ABAddressBook ABGlobals ABPeoplePicker ABTypedefs AEDataModel \
-  AEHelpers AEInteraction AEMach AEObjects AEPackObject AERegistry \
-  AEUserTermTypes AIFF ASDebugging ASRegistry ATSFont ATSLayoutTypes \
-  ATSTypes ATSUnicodeDirectAccess ATSUnicodeDrawing ATSUnicodeFlattening \
-  ATSUnicodeFonts ATSUnicodeGlyphs ATSUnicodeObjects ATSUnicodeTypes \
-  AUComponent AVLTree AXActionConstants AXAttributeConstants AXConstants \
-  AXErrors AXNotificationConstants AXRoleConstants AXTextAttributedString \
-  AXUIElement AXValue AXValueConstants Accessibility Aliases Appearance \
-  AppleDiskPartitions AppleEvents AppleHelp AppleScript AudioCodecs \
-  AudioComponents AudioHardware AudioOutputUnit AudioUnitCarbonViews \
-  AudioUnitParameters AudioUnitProperties AuthSession Authorization \
-  AuthorizationDB AuthorizationPlugin AuthorizationTags BackupCore CFArray \
-  CFAttributedString CFBag CFBase CFBinaryHeap CFBitVector CFBundle \
-  CFByteOrders CFCalendar CFCharacterSet CFData CFDate CFDateFormatter \
-  CFDictionary CFError CFFTPStream CFHTTPAuthentication CFHTTPMessage \
-  CFHTTPStream CFHost CFLocale CFMachPort CFMessagePort CFNetDiagnostics \
-  CFNetServices CFNetworkErrorss CFNotificationCenter CFNumber \
-  CFNumberFormatter CFPlugIn CFPlugInCOM CFPreferences CFPropertyList \
-  CFProxySupport CFRunLoop CFSet CFSocket CFSocketStream CFStream CFString \
-  CFStringEncodingExt CFStringTokenizer CFTimeZone CFTree CFURL CFURLAccess \
-  CFUUID \
-  CFUserNotification CFXMLNode CFXMLParser CGAffineTransforms CGBase \
-  CGBitmapContext CGColor CGColorSpace CGContext CGDataConsumer \
-  CGDataProvider CGDirectDisplay CGDirectPalette CGDisplayConfiguration \
-  CGDisplayFades CGErrors CGEvent CGEventSource CGEventTypes CGFont \
-  CGFunction CGGLContext CGGeometry CGGradient CGImage CGImageDestination \
-  CGImageProperties CGImageSource CGLCurrent CGLDevice CGLProfiler \
-  CGLProfilerFunctionEnums CGLRenderers CGLTypes CGLayer CGPDFArray \
-  CGPDFContentStream CGPDFContext CGPDFDictionary CGPDFDocument CGPDFObject \
-  CGPDFOperatorTable CGPDFPage CGPDFScanner CGPDFStream CGPDFString \
-  CGPSConverter CGPath CGPattern CGRemoteOperation CGSession CGShading \
-  CGWindow CGWindowLevels CMCalibrator CSIdentity CSIdentityAuthority \
-  CSIdentityQuery CTFont CTFontCollection CTFontDescriptor CTFontManager \
-  CTFontManagerErrors CTFontTraits CTFrame CTFramesetter CTGlyphInfo CTLine \
-  CTParagraphStyle CTRun CTStringAttributes CTTextTab CTTypesetter CVBase \
-  CVBuffer CVDisplayLink CVHostTime CVImageBuffer CVOpenGLBuffer \
-  CVOpenGLBufferPool CVOpenGLTexture CVOpenGLTextureCache CVPixelBuffer \
-  CVPixelBufferPool CVPixelFormatDescription CVReturns CarbonEvents \
-  CarbonEventsCore CodeFragments Collections ColorPicker ColorSyncCMM \
-  ColorSyncDeprecated ColorSyncDevice ColorSyncProfile ColorSyncTransform \
-  Components ConditionalMacros ControlDefinitions Controls CoreAudioTypes \
-  CoreFoundation CoreGraphics CoreText DADisk DASession \
-  DHCPClientPreferences DateTimeUtils Debugging Dialogs Dictionary \
-  DigitalHubRegistry Displays Drag DrawSprocket DriverServices \
-  DriverSynchronization Endian Events FSEvents FileTypesAndCreators Files \
-  Finder FinderRegistry FixMath Folders FontPanel FontSync Fonts GestaltEqu \
-  GPCStrings \
-  HFSVolumes HIAccessibility HIArchive HIButtonViews HIClockView HIComboBox \
-  HIContainerViews HIDataBrowser HIDisclosureViews HIGeometry HIImageViews \
-  HILittleArrows HIMenuView HIMovieView HIObject HIPopupButton \
-  HIProgressViews HIRelevanceBar HIScrollView HISearchField HISegmentedView \
-  HISeparator HIShape HISlider HITabbedView HITextLengthFilter HITextUtils \
-  HITextViews HITheme HIToolbar HIToolbox HIToolboxDebugging HIView \
-  HIWindowViews HTMLRendering HostTime IBCarbonRuntime ICAApplication \
-  ICACamera ICADevice IconStorage Icons IconsCore ImageCodec \
-  ImageCompression InternetConfig IntlResources \
-  IOKitReturn IOSurfaceAPI KeyEvents Keyboards \
-  KeychainCore KeychainHI LSInfo LSOpen LSQuarantine LSSharedFileList \
-  LanguageAnalysis Lists LowMem MDExternalDatastore MDImporter MDItem \
-  MDLineage MDQuery MDSchema MIDIDriver MIDIServices MIDISetup \
-  MIDIThruConnection MacApplication MacErrors MacHelp MacLocales MacMemory \
-  MacOSXPosix MacOpenGL MacTextEditor MacTypes MacWindows MachineExceptions \
-  Math64 MediaHandlers Menus MixedMode Movies MoviesFormat \
-  MultiProcessingInfo Multiprocessing MusicDevice NSL NSLCore Navigation \
-  Notification NumberFormatting OSA OSAComp OSAGeneric OSUtils ObjCRuntime \
-  OpenTransport OpenTransportProtocol OpenTransportProviders \
-  PEFBinaryFormat PLStringFuncs PMApplication PMApplicationDeprecated \
-  PMCore PMCoreDeprecated PMDefinitions PMDefinitionsDeprecated PMErrors \
-  PMPrintAETypes PMPrintSettingsKeys PMPrintingDialogExtensions Palettes \
-  Pasteboard PictUtils Power Processes QDCMCommon QDOffscreen \
-  QDPictToCGContext \
-  QLBase QLGenerator QLThumbnailImage \
-  QTML QTSMovie QTStreamingComponents QuickTimeComponents \
-  QuickTimeErrors QuickTimeMusic QuickTimeStreaming QuickTimeVR \
-  QuickTimeVRFormat Quickdraw QuickdrawText QuickdrawTypes Resources \
-  SCDynamicStore SCDynamicStoreCopyDHCPInfos SCDynamicStoreCopySpecific \
-  SCDynamicStoreKey SCNetwork SCNetworkConfiguration SCNetworkConnection \
-  SCNetworkReachability SCPreferences SCPreferencesPath \
-  SCPreferencesSetSpecific SCSI SCSchemaDefinitions SFNTLayoutTypes \
-  SFNTTypes ScalerStreamTypes Scrap Script SecBase SecTrust Sound \
-  SpeechRecognition \
-  SpeechSynthesis StringCompare SystemConfiguration SystemSound TSMTE \
-  TextCommon TextEdit TextEncodingConverter TextEncodingPlugin \
-  TextInputSources TextServices TextUtils Threads Timer ToolUtils \
-  Translation TranslationExtensions TranslationServices TypeSelect \
-  URLAccess UTCUtils UTCoreTypes UTType UnicodeConverter UnicodeUtilities \
-  UniversalAccess Video WSMethodInvocation WSProtocolHandler WSTypes cblas \
-  certextensions cssmapple cssmconfig cssmerr cssmkrapi cssmtype \
-  fenv fp gliContexts gliDispatch gluContext kern_return macgl macglext \
-  macglu mach_error vBLAS vDSP x509defs xattr 
-exampledirs=examples
+[require]
+packages=rtl fpmkunit
 
 
-[libs]
-libversion=2.0.0
-
-# FPCMacOSAll is not a build unit, but directly includes the code of
-# most other units
 [install]
 [install]
-buildunit=MacOS
 fpcpackage=y
 fpcpackage=y
 
 
-[compiler]
-includedir=src
-sourcedir=src tests
-
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..
 
 
 [prerules]
 [prerules]
-override FPCOPT+=-Mmacpas
+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]
-MacOSAll$(PPUEXT): $(filter-out MacOS.pas GPCStrings.pas KeyEvents.pas,$(wildcard *.pas))
-MacOS$(PPUEXT): $(filter-out MacOSAll.pas,$(wildcard *.pas))
+.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
+

+ 124 - 0
packages/univint/Makefile.fpc.fpcmake

@@ -0,0 +1,124 @@
+#
+#   Makefile.fpc for Apple Universal Interfaces for Free Pascal
+#
+
+[package]
+name=univint
+version=2.7.1
+
+[target]
+units=MacOSAll MacOS
+implicitunits=ABActions ABAddressBook ABGlobals ABPeoplePicker ABTypedefs AEDataModel \
+  AEHelpers AEInteraction AEMach AEObjects AEPackObject AERegistry \
+  AEUserTermTypes AIFF ASDebugging ASRegistry ATSFont ATSLayoutTypes \
+  ATSTypes ATSUnicodeDirectAccess ATSUnicodeDrawing ATSUnicodeFlattening \
+  ATSUnicodeFonts ATSUnicodeGlyphs ATSUnicodeObjects ATSUnicodeTypes \
+  AUComponent AVLTree AXActionConstants AXAttributeConstants AXConstants \
+  AXErrors AXNotificationConstants AXRoleConstants AXTextAttributedString \
+  AXUIElement AXValue AXValueConstants Accessibility Aliases Appearance \
+  AppleDiskPartitions AppleEvents AppleHelp AppleScript AudioCodecs \
+  AudioComponents AudioHardware AudioOutputUnit AudioUnitCarbonViews \
+  AudioUnitParameters AudioUnitProperties AuthSession Authorization \
+  AuthorizationDB AuthorizationPlugin AuthorizationTags BackupCore CFArray \
+  CFAttributedString CFBag CFBase CFBinaryHeap CFBitVector CFBundle \
+  CFByteOrders CFCalendar CFCharacterSet CFData CFDate CFDateFormatter \
+  CFDictionary CFError CFFTPStream CFHTTPAuthentication CFHTTPMessage \
+  CFHTTPStream CFHost CFLocale CFMachPort CFMessagePort CFNetDiagnostics \
+  CFNetServices CFNetworkErrorss CFNotificationCenter CFNumber \
+  CFNumberFormatter CFPlugIn CFPlugInCOM CFPreferences CFPropertyList \
+  CFProxySupport CFRunLoop CFSet CFSocket CFSocketStream CFStream CFString \
+  CFStringEncodingExt CFStringTokenizer CFTimeZone CFTree CFURL CFURLAccess \
+  CFUUID \
+  CFUserNotification CFXMLNode CFXMLParser CGAffineTransforms CGBase \
+  CGBitmapContext CGColor CGColorSpace CGContext CGDataConsumer \
+  CGDataProvider CGDirectDisplay CGDirectPalette CGDisplayConfiguration \
+  CGDisplayFades CGErrors CGEvent CGEventSource CGEventTypes CGFont \
+  CGFunction CGGLContext CGGeometry CGGradient CGImage CGImageDestination \
+  CGImageProperties CGImageSource CGLCurrent CGLDevice CGLProfiler \
+  CGLProfilerFunctionEnums CGLRenderers CGLTypes CGLayer CGPDFArray \
+  CGPDFContentStream CGPDFContext CGPDFDictionary CGPDFDocument CGPDFObject \
+  CGPDFOperatorTable CGPDFPage CGPDFScanner CGPDFStream CGPDFString \
+  CGPSConverter CGPath CGPattern CGRemoteOperation CGSession CGShading \
+  CGWindow CGWindowLevels CMCalibrator CSIdentity CSIdentityAuthority \
+  CSIdentityQuery CTFont CTFontCollection CTFontDescriptor CTFontManager \
+  CTFontManagerErrors CTFontTraits CTFrame CTFramesetter CTGlyphInfo CTLine \
+  CTParagraphStyle CTRun CTStringAttributes CTTextTab CTTypesetter CVBase \
+  CVBuffer CVDisplayLink CVHostTime CVImageBuffer CVOpenGLBuffer \
+  CVOpenGLBufferPool CVOpenGLTexture CVOpenGLTextureCache CVPixelBuffer \
+  CVPixelBufferPool CVPixelFormatDescription CVReturns CarbonEvents \
+  CarbonEventsCore CodeFragments Collections ColorPicker ColorSyncCMM \
+  ColorSyncDeprecated ColorSyncDevice ColorSyncProfile ColorSyncTransform \
+  Components ConditionalMacros ControlDefinitions Controls CoreAudioTypes \
+  CoreFoundation CoreGraphics CoreText DADisk DASession \
+  DHCPClientPreferences DateTimeUtils Debugging Dialogs Dictionary \
+  DigitalHubRegistry Displays Drag DrawSprocket DriverServices \
+  DriverSynchronization Endian Events FSEvents FileTypesAndCreators Files \
+  Finder FinderRegistry FixMath Folders FontPanel FontSync Fonts GestaltEqu \
+  GPCStrings \
+  HFSVolumes HIAccessibility HIArchive HIButtonViews HIClockView HIComboBox \
+  HIContainerViews HIDataBrowser HIDisclosureViews HIGeometry HIImageViews \
+  HILittleArrows HIMenuView HIMovieView HIObject HIPopupButton \
+  HIProgressViews HIRelevanceBar HIScrollView HISearchField HISegmentedView \
+  HISeparator HIShape HISlider HITabbedView HITextLengthFilter HITextUtils \
+  HITextViews HITheme HIToolbar HIToolbox HIToolboxDebugging HIView \
+  HIWindowViews HTMLRendering HostTime IBCarbonRuntime ICAApplication \
+  ICACamera ICADevice IconStorage Icons IconsCore ImageCodec \
+  ImageCompression InternetConfig IntlResources \
+  IOKitReturn IOSurfaceAPI KeyEvents Keyboards \
+  KeychainCore KeychainHI LSInfo LSOpen LSQuarantine LSSharedFileList \
+  LanguageAnalysis Lists LowMem MDExternalDatastore MDImporter MDItem \
+  MDLineage MDQuery MDSchema MIDIDriver MIDIServices MIDISetup \
+  MIDIThruConnection MacApplication MacErrors MacHelp MacLocales MacMemory \
+  MacOSXPosix MacOpenGL MacTextEditor MacTypes MacWindows MachineExceptions \
+  Math64 MediaHandlers Menus MixedMode Movies MoviesFormat \
+  MultiProcessingInfo Multiprocessing MusicDevice NSL NSLCore Navigation \
+  Notification NumberFormatting OSA OSAComp OSAGeneric OSUtils ObjCRuntime \
+  OpenTransport OpenTransportProtocol OpenTransportProviders \
+  PEFBinaryFormat PLStringFuncs PMApplication PMApplicationDeprecated \
+  PMCore PMCoreDeprecated PMDefinitions PMDefinitionsDeprecated PMErrors \
+  PMPrintAETypes PMPrintSettingsKeys PMPrintingDialogExtensions Palettes \
+  Pasteboard PictUtils Power Processes QDCMCommon QDOffscreen \
+  QDPictToCGContext \
+  QLBase QLGenerator QLThumbnailImage \
+  QTML QTSMovie QTStreamingComponents QuickTimeComponents \
+  QuickTimeErrors QuickTimeMusic QuickTimeStreaming QuickTimeVR \
+  QuickTimeVRFormat Quickdraw QuickdrawText QuickdrawTypes Resources \
+  SCDynamicStore SCDynamicStoreCopyDHCPInfos SCDynamicStoreCopySpecific \
+  SCDynamicStoreKey SCNetwork SCNetworkConfiguration SCNetworkConnection \
+  SCNetworkReachability SCPreferences SCPreferencesPath \
+  SCPreferencesSetSpecific SCSI SCSchemaDefinitions SFNTLayoutTypes \
+  SFNTTypes ScalerStreamTypes Scrap Script SecBase SecTrust Sound \
+  SpeechRecognition \
+  SpeechSynthesis StringCompare SystemConfiguration SystemSound TSMTE \
+  TextCommon TextEdit TextEncodingConverter TextEncodingPlugin \
+  TextInputSources TextServices TextUtils Threads Timer ToolUtils \
+  Translation TranslationExtensions TranslationServices TypeSelect \
+  URLAccess UTCUtils UTCoreTypes UTType UnicodeConverter UnicodeUtilities \
+  UniversalAccess Video WSMethodInvocation WSProtocolHandler WSTypes cblas \
+  certextensions cssmapple cssmconfig cssmerr cssmkrapi cssmtype \
+  fenv fp gliContexts gliDispatch gluContext kern_return macgl macglext \
+  macglu mach_error vBLAS vDSP x509defs xattr 
+exampledirs=examples
+
+[libs]
+libversion=2.0.0
+
+# FPCMacOSAll is not a build unit, but directly includes the code of
+# most other units
+[install]
+buildunit=MacOS
+fpcpackage=y
+
+[compiler]
+includedir=src
+sourcedir=src tests
+
+[default]
+fpcdir=../..
+
+[prerules]
+override FPCOPT+=-Mmacpas
+
+[rules]
+MacOSAll$(PPUEXT): $(filter-out MacOS.pas GPCStrings.pas KeyEvents.pas,$(wildcard *.pas))
+MacOS$(PPUEXT): $(filter-out MacOSAll.pas,$(wildcard *.pas))

File diff suppressed because it is too large
+ 9 - 933
packages/unixutil/Makefile


+ 59 - 11
packages/unixutil/Makefile.fpc

@@ -1,22 +1,13 @@
 #
 #
-#   Makefile.fpc for libc binding
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=unixutil
 name=unixutil
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=unixutils
-rsts=unixutils
-
 [require]
 [require]
-libc=y
-packages=libc fcl-base
-
-[compiler]
-includedir=src
-sourcedir=src tests
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -24,5 +15,62 @@ 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)
+
 [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/unixutil/Makefile.fpc.fpcmake

@@ -0,0 +1,28 @@
+#
+#   Makefile.fpc for libc binding
+#
+
+[package]
+name=unixutil
+version=2.7.1
+
+[target]
+units=unixutils
+rsts=unixutils
+
+[require]
+libc=y
+packages=libc fcl-base
+
+[compiler]
+includedir=src
+sourcedir=src tests
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

File diff suppressed because it is too large
+ 260 - 586
packages/unzip/Makefile


+ 60 - 9
packages/unzip/Makefile.fpc

@@ -1,19 +1,13 @@
 #
 #
-#   Makefile.fpc for Unzip
+#   Makefile.fpc for running fpmake
 #
 #
 
 
 [package]
 [package]
 name=unzip
 name=unzip
 version=2.7.1
 version=2.7.1
 
 
-[target]
-units=ziptypes unzip51g
-units_emx=unzipdll
-units_os2=unzipdll
-
-[compiler]
-includedir=src
-sourcedir=src tests
+[require]
+packages=rtl fpmkunit
 
 
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
@@ -21,5 +15,62 @@ 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)
+
 [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
+

+ 25 - 0
packages/unzip/Makefile.fpc.fpcmake

@@ -0,0 +1,25 @@
+#
+#   Makefile.fpc for Unzip
+#
+
+[package]
+name=unzip
+version=2.7.1
+
+[target]
+units=ziptypes unzip51g
+units_emx=unzipdll
+units_os2=unzipdll
+
+[compiler]
+includedir=src
+sourcedir=src tests
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:

Some files were not shown because too many files changed in this diff