Pārlūkot izejas kodu

* libogc for Wii needs cmem and libc statically linked

git-svn-id: trunk@16991 -
Legolas 14 gadi atpakaļ
vecāks
revīzija
41c946032e
4 mainītis faili ar 70 papildinājumiem un 72 dzēšanām
  1. 1 1
      rtl/inc/cmem.pp
  2. 63 70
      rtl/wii/Makefile
  3. 3 1
      rtl/wii/Makefile.fpc
  4. 3 0
      rtl/wii/libch.inc

+ 1 - 1
rtl/inc/cmem.pp

@@ -19,7 +19,7 @@ interface
 
 
 Const
 Const
 
 
-{$if defined(go32v2)}
+{$if defined(go32v2) or defined(wii)}
   {$define USE_STATIC_LIBC}
   {$define USE_STATIC_LIBC}
 {$endif}
 {$endif}
 
 

+ 63 - 70
rtl/wii/Makefile

@@ -280,190 +280,190 @@ endif
 OBJPASDIR=$(RTL)/objpas
 OBJPASDIR=$(RTL)/objpas
 GRAPHDIR=$(INC)/graph
 GRAPHDIR=$(INC)/graph
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-gamecube)
 ifeq ($(FULL_TARGET),powerpc-gamecube)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings sysutils classes math typinfo varutils fmtbcd ctypes charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem
 endif
 endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCPACKAGE=y
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
@@ -2138,14 +2138,6 @@ SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
 include $(PROCINC)/makefile.cpu
 include $(PROCINC)/makefile.cpu
 SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
-prt07$(OEXT) : prt07.as
-	$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)prt07$(OEXT) prt07.as
-prt09$(OEXT) : prt09.as
-	$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)prt09$(OEXT) prt09.as
-cprt07$(OEXT) : cprt07.as
-	$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)cprt07$(OEXT) cprt07.as
-cprt09$(OEXT) : cprt09.as
-	$(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)cprt09$(OEXT) cprt09.as
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS) $(INC)/softfpu.pp
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS) $(INC)/softfpu.pp
 	$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 	$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
@@ -2211,3 +2203,4 @@ tinygl$(PPUEXT): tinygl.pp exec$(PPUEXT)
 get9$(PPUEXT): get9.pas exec$(PPUEXT)
 get9$(PPUEXT): get9.pas exec$(PPUEXT)
 muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
 muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
+cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)

+ 3 - 1
rtl/wii/Makefile.fpc

@@ -12,7 +12,7 @@ units=$(SYSTEMUNIT) objpas macpas strings \
       sysutils \
       sysutils \
       classes math typinfo varutils fmtbcd ctypes \
       classes math typinfo varutils fmtbcd ctypes \
       charset ucomplex getopts matrix \
       charset ucomplex getopts matrix \
-      variants types rtlconsts sysconst dateutil lineinfo fgl varutils \
+      variants types rtlconsts sysconst dateutil lineinfo fgl varutils cmem \
 #      exec timer doslib utility hardware inputevent graphics layers \
 #      exec timer doslib utility hardware inputevent graphics layers \
 # these can be moved to packages later
 # these can be moved to packages later
 #      clipboard datatypes asl ahi tinygl get9 muihelper \
 #      clipboard datatypes asl ahi tinygl get9 muihelper \
@@ -216,3 +216,5 @@ get9$(PPUEXT): get9.pas exec$(PPUEXT)
 muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
 muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
 
 
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
+
+cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)

+ 3 - 0
rtl/wii/libch.inc

@@ -49,6 +49,9 @@ function malloc(size: integer): pointer; cdecl; external;
 function realloc(ptr: pointer; size: integer): pointer; cdecl; external;
 function realloc(ptr: pointer; size: integer): pointer; cdecl; external;
 procedure free(ptr: pointer); cdecl; external;
 procedure free(ptr: pointer); cdecl; external;
 function memcpy(dest: pointer; src: pointer; n: integer): pointer; cdecl; external;
 function memcpy(dest: pointer; src: pointer; n: integer): pointer; cdecl; external;
+function memalign(alignment: integer; size: integer): pointer; cdecl; external;
+function memset(s: pointer; c: longint; n: integer): pointer; cdecl; external;
+
 
 
 function gmtime(timer: ptime_t): ptm; cdecl; external;
 function gmtime(timer: ptime_t): ptm; cdecl; external;
 function time(timer: ptime_t): time_t; cdecl; external;
 function time(timer: ptime_t): time_t; cdecl; external;