From 13d9ef8bcb1b95ba8c1403dc951835d7d6307c3b Mon Sep 17 00:00:00 2001
From: Ben Avison <bavison@gitlab.riscosopen.org>
Date: Fri, 26 Jun 2009 14:03:07 +0000
Subject: [PATCH] Added CTools disc build, and various supporting changes

Detail:
  * Updates to CModule makefile fragment to reduce the number of OS-specific
    rules in main Makefiles:
    + Added (RAM|ROM)(C|ASM)DEFINES variables. These allow the calling makefile
      to specify additional defines for RAM or ROM builds of C or assembler
      source files respectively. Traditionally this was done by having separate
      object files for RAM and ROM corresponding at least to whichever source
      file was responsible for interfacing with ResourceFS, but this requires
      messy additional rules. With this new approach, it is necessary to clean
      the component when switching between RAM and ROM builds, but I don't
      think this will affect many people's workflows.
    + Added CMHGDEPENDS. This should be used to specify which object files need
      a static dependency upon the h file autogenerated from the cmhg file.
      It should be specified in the usual form for object files passed to
      CModule - with neither an o. prefix nor a .o suffix.
  * Added TBOXINTLIB to ModuleLibs makefile fragment.
  * AsmUtils, HdrSrc, TCPIPheaders, ToolboxLib and UnicodeLib all upgraded in
    ModuleDB from EXP to ASM or C components, to permit them to be built in the
    install phase. As a result, those other Components files that didn't
    already do so now need to override this back to -type EXP.
  * BuildHost Components file edited to reflect the fact that binaof, binasm,
    modgen and ResGen now have separate install phases for executables and
    Docs files.
Admin:
  The new Components file uses various components that are not publicly
  released, so it can only sensibly be used internally by ROOL. However, it's
  more convenient for us to keep it alongside the other Components files - and
  it also serves as an illustration of how to do a disc build.

Version 4.77. Tagged as 'BuildSys-4_77'
---
 Components/ROOL/BatchThree |   2 +-
 Components/ROOL/BatchTwo   |   2 +-
 Components/ROOL/Binaries   |   2 +-
 Components/ROOL/BuildHost  |   4 +
 Components/ROOL/CTools     | 158 +++++++++++++++++++++++++++++++++++++
 Components/ROOL/IOMD32     |  10 +--
 Components/ROOL/OMAP3      |  10 +--
 Components/ROOL/Tungsten   |  10 +--
 Makefiles/CModule          |  18 +++++
 Makefiles/ModuleLibs       |   1 +
 ModuleDB                   |  10 +--
 VersionNum                 |  20 ++---
 12 files changed, 214 insertions(+), 33 deletions(-)
 create mode 100644 Components/ROOL/CTools

diff --git a/Components/ROOL/BatchThree b/Components/ROOL/BatchThree
index 3e821ed..c5af59e 100644
--- a/Components/ROOL/BatchThree
+++ b/Components/ROOL/BatchThree
@@ -31,7 +31,7 @@ SerialDeviceSupport
 SerialMouse
 ShellCLI
 TaskWindow
-TCPIPheaders
+TCPIPheaders            -type EXP
 socklib
 inetlib
 unixlib
diff --git a/Components/ROOL/BatchTwo b/Components/ROOL/BatchTwo
index 0dde8be..5abc4be 100644
--- a/Components/ROOL/BatchTwo
+++ b/Components/ROOL/BatchTwo
@@ -26,7 +26,7 @@ FileInfo              -options INSTDIR=<Install$Dir>.HardDisc4.foo
 FontDbox              -options INSTDIR=<Install$Dir>.HardDisc4.foo
 FontMenu              -options INSTDIR=<Install$Dir>.HardDisc4.foo
 IconBar               -options INSTDIR=<Install$Dir>.HardDisc4.foo
-ToolboxLib            -options INSTDIR=<Install$Dir>.HardDisc4.foo
+ToolboxLib            -type EXP
 Menu                  -options INSTDIR=<Install$Dir>.HardDisc4.foo
 PrintDbox             -options INSTDIR=<Install$Dir>.HardDisc4.foo
 ProgInfo              -options INSTDIR=<Install$Dir>.HardDisc4.foo
diff --git a/Components/ROOL/Binaries b/Components/ROOL/Binaries
index df76da8..dad08a2 100644
--- a/Components/ROOL/Binaries
+++ b/Components/ROOL/Binaries
@@ -7,7 +7,7 @@
 %sigstr        Univ
 
 # Header files
-HdrSrc                  -options OPTIONS=ALL
+HdrSrc                  -type EXP -options OPTIONS=ALL
 
 # We need the following exported for swis.h generation change the type to EXP
 DDEUtils                -type EXP
diff --git a/Components/ROOL/BuildHost b/Components/ROOL/BuildHost
index 4df33a7..77d94fd 100644
--- a/Components/ROOL/BuildHost
+++ b/Components/ROOL/BuildHost
@@ -82,6 +82,7 @@ modsqz                  -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=to
 #objasm                  -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=tool
 #objsize                 -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=tool
 #ResGen                  -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=tool_resgen
+#ResGen                  -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=docs_resgen
 #rpcgen                  -options INSTDIR=<Install$Dir>.Library.Acorn
 SquashApp               -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=tool
 #squeeze                 -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=tool_squeeze
@@ -95,11 +96,14 @@ xpand                   -options INSTDIR=<Install$Dir>.Library.Acorn INSTTYPE=to
 #
 BigSplit2               -options INSTDIR=<Install$Dir>.Library.Build
 #binaof                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=tool_binaof
+#binaof                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=docs_binaof
 #binasm                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=tool_binasm
+#binasm                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=docs_binasm
 crc                     -options INSTDIR=<Install$Dir>.Library.Build
 defmod                  -options INSTDIR=<Install$Dir>.Library.Build
 FileCRC                 -options INSTDIR=<Install$Dir>.Library.Build
 #modgen                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=tool_modgen
+#modgen                  -options INSTDIR=<Install$Dir>.Library.Build INSTTYPE=docs_modgen
 romlinker               -options INSTDIR=<Install$Dir>.Library.Build
 ROMUnjoin               -options INSTDIR=<Install$Dir>.Library.Build
 srcbuild                -options INSTDIR=<Install$Dir>.Library.Build
diff --git a/Components/ROOL/CTools b/Components/ROOL/CTools
new file mode 100644
index 0000000..cabec6b
--- /dev/null
+++ b/Components/ROOL/CTools
@@ -0,0 +1,158 @@
+#------------------------------------------------------------------------------
+# Components file for build system
+#------------------------------------------------------------------------------
+%BaseAddress   0x00000000
+%Image         Build$ImageName
+%Log           Build$ImageName
+%Messages      Sources.Internat.Messages
+%Joiner        BigSplit2
+%JoinerFormat  BigSplit
+
+#
+# Components only required for their headers
+#
+HdrSrc                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries OPTIONS=ALL
+BufferManager           -type EXP
+ColourTrans             -type EXP
+FileSwitch              -type EXP
+FontManager             -type EXP
+HostFS                  -type EXP
+Hourglass               -type EXP
+Kernel                  -type EXP
+MessageTrans            -type EXP
+PDriver                 -type EXP
+ResourceFS              -type EXP
+Squash                  -type EXP
+TaskManager             -type EXP
+TerritoryManager        -type EXP
+WindowManager           -type EXP
+Filer_Action            -type EXP
+
+#
+# Libraries
+#
+SharedCLibrary          -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries INSTTYPE=libraries
+TCPIPheaders            -type EXP
+inetlib                 -type EXP
+rpclib                  -type EXP
+socklib                 -type EXP
+unixlib                 -type EXP
+TCPIPheaders            -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries
+AsmUtils                -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries
+C++Lib                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries
+CLXLite                 -type EXP
+CLX                     -type EXP
+Common                  -type EXP
+DDTLib                  -type EXP
+DeskLib                 -type EXP
+ModMallocLib            -type EXP
+NBLib                   -type EXP
+PDebug                  -type EXP
+PlainArgvLib            -type EXP
+ToolboxLib              -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries
+RemoteDebug             -type EXP
+Wild                    -type EXP
+Trace                   -type EXP
+DebugLib                -type EXP
+tboxlib                 -type EXP
+ConfigLib               -type EXP
+OSLib                   -type EXP
+UnicodeLib              -options INSTDIR=<Install$Dir>.Intermediate.Tools.Libraries
+
+#
+# Targets - DevSystem
+#
+System                  -options INSTDIR=<Install$Dir>.Intermediate.DevSystem
+CallASWI                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+SharedCLibrary          -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules SCL_APCS="-APCS 3/26bit"
+DDEUtils                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+Debugger                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+DragAnObj               -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+DragASprite             -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+DrawFile                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules INTERNATIONAL_HELP=NO
+FilterManager           -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+FPEmulator              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules FPE_APCS=3/26bit MACHINE=RO310
+FrontEnd                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+Config2Installer        -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules OPTIONS="-DNO_INTERNATIONAL_HELP"
+ColourPicker            -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+RedrawManager           -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+TaskWindow              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules MACHINE=Morris
+TinyStubs               -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules
+ColourDbox              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+ColourMenu              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+DCS_Quit                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox TARGET=DCS_Quit
+FileInfo                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+FontDbox                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+FontMenu                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+IconBar                 -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+Menu                    -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+PrintDbox               -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+ProgInfo                -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+SaveAs                  -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+Scale                   -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+ToolAction              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+Toolbox                 -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+Window                  -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.310.Modules.Toolbox
+ddt                     -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.350.Modules INSTTYPE=tool
+FPEmulator              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.350.Modules FPE_APCS=3/32bit MACHINE=RO350
+TaskWindow              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.350.Modules
+Config2Installer        -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.360.Modules
+FPEmulator              -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.400.Modules FPE_APCS=3/32bit MACHINE=32
+SharedCLibrary          -options INSTDIR=<Install$Dir>.Intermediate.DevSystem.!System.500.Modules
+
+#
+# Targets - Library
+#
+amu                     -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+c++                     -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+cc                      -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+cfront                  -options INSTDIR=<Install$Dir>.Intermediate.Library
+cmhg                    -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+decaof                  -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+diff                    -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+find                    -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+libfile                 -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+link                    -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+modsqz                  -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+objasm                  -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+objsize                 -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+ResGen                  -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool_resgen
+squeeze                 -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool_squeeze
+toansi                  -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+topcc                   -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+unmodsqz                -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool
+xpand                   -options INSTDIR=<Install$Dir>.Intermediate.Library INSTTYPE=tool_xpand
+
+#
+# Targets = Tools/EndUser
+#
+SharedCLibrary          -options INSTDIR=<Install$Dir>.Intermediate.Tools.EndUser.!System.310.Modules SCL_APCS="-APCS 3/26bit"
+SharedCLibrary          -options INSTDIR=<Install$Dir>.Intermediate.Tools.EndUser.!System.500.Modules
+
+#
+# Targets = Tools/Tools
+#
+amu                     -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+c++                     -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+cc                      -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+cmhg                    -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+ddt                     -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+decaof                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+diff                    -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+find                    -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+libfile                 -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+link                    -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+make                    -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools
+modsqz                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+objasm                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+objsize                 -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+ResCreate               -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools
+ResEd                   -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools
+ResTest                 -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools
+squeeze                 -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+SrcEdit                 -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools
+toansi                  -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+topcc                   -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+unmodsqz                -options INSTDIR=<Install$Dir>.Intermediate.Tools.Tools INSTTYPE=app
+
+# EOF
diff --git a/Components/ROOL/IOMD32 b/Components/ROOL/IOMD32
index ca5851a..f95f838 100644
--- a/Components/ROOL/IOMD32
+++ b/Components/ROOL/IOMD32
@@ -19,7 +19,7 @@ BuildTools
 #------------------------------------------------------------------------------
 # some headers
 #
-HdrSrc
+HdrSrc                -type EXP
 #------------------------------------------------------------------------------
 # we need the following exported for swis.h generation
 # change the type to EXP
@@ -157,7 +157,7 @@ RTCAdjust
 # Toolbox Modules/Libs
 #
 tboxlib
-ToolboxLib
+ToolboxLib            -type EXP
 TinyStubs
 Toolbox
 Window
@@ -189,12 +189,12 @@ HeroNames
 # some libraries and bits
 #
 callx
-AsmUtils
-TCPIPheaders
+AsmUtils              -type EXP
+TCPIPheaders          -type EXP
 socklib
 inetlib
 unixlib
-UnicodeLib
+UnicodeLib            -type EXP
 OSLib
 DeskLib
 
diff --git a/Components/ROOL/OMAP3 b/Components/ROOL/OMAP3
index db92baf..47bc344 100644
--- a/Components/ROOL/OMAP3
+++ b/Components/ROOL/OMAP3
@@ -19,7 +19,7 @@ BuildTools
 #------------------------------------------------------------------------------
 # some headers
 #
-HdrSrc
+HdrSrc                -type EXP
 #------------------------------------------------------------------------------
 # we need the following exported for swis.h generation
 # change the type to EXP
@@ -148,7 +148,7 @@ Help2
 # Toolbox Modules/Libs
 #
 tboxlib
-ToolboxLib
+ToolboxLib             -type EXP
 TinyStubs
 Toolbox
 Window
@@ -179,12 +179,12 @@ Gadgets
 # some libraries and bits
 #
 callx
-AsmUtils
-TCPIPheaders
+AsmUtils              -type EXP
+TCPIPheaders          -type EXP
 socklib
 inetlib
 unixlib
-UnicodeLib
+UnicodeLib            -type EXP
 OSLib
 DeskLib
 
diff --git a/Components/ROOL/Tungsten b/Components/ROOL/Tungsten
index 2d5bb21..b99dfff 100644
--- a/Components/ROOL/Tungsten
+++ b/Components/ROOL/Tungsten
@@ -19,7 +19,7 @@ BuildTools
 #------------------------------------------------------------------------------
 # some headers
 #
-HdrSrc
+HdrSrc                -type EXP
 #------------------------------------------------------------------------------
 # we need the following exported for swis.h generation
 # change the type to EXP
@@ -147,7 +147,7 @@ RTCAdjust
 # Toolbox Modules/Libs
 #
 tboxlib
-ToolboxLib
+ToolboxLib            -type EXP
 TinyStubs
 Toolbox
 Window
@@ -178,12 +178,12 @@ InetRes -options TYPE=EmergencyUtils
 # some libraries and bits
 #
 callx
-AsmUtils
-TCPIPheaders
+AsmUtils              -type EXP
+TCPIPheaders          -type EXP
 socklib
 inetlib
 unixlib
-UnicodeLib
+UnicodeLib            -type EXP
 OSLib
 DeskLib
 
diff --git a/Makefiles/CModule b/Makefiles/CModule
index e0a25a2..a0e7d14 100644
--- a/Makefiles/CModule
+++ b/Makefiles/CModule
@@ -59,6 +59,11 @@
 # CUSTOMSA     (opt) (set to "custom" to override the standalone rules)
 # CUSTOMDBG    (opt) (set to "custom" to override the debug rules)
 # CUSTOMGPA    (opt) (set to "custom" to override the GPA rules)
+# RAMCDEFINES  (opt) (additions to CDEFINES for RAM builds - requires ModStdRule to be included later)
+# ROMCDEFINES  (opt) (additions to CDEFINES for ROM builds - requires ModStdRule to be included later)
+# RAMASMDEFINES (opt) (additions to ASMDEFINES for RAM builds - requires ModStdRule to be included later)
+# ROMASMDEFINES (opt) (additions to ASMDEFINES for ROM builds - requires ModStdRule to be included later)
+# CMHGDEPENDS  (opt) (source files which need to include the .h file autogenerated from the CMHG file)
 #
 #
 # It relies on the following from the build system:
@@ -160,6 +165,14 @@ EXPORTING_HDRS     = $(addprefix exphdr.,${HDRS})
 EXPORTING_ASMHDRS  = $(addprefix expasm.,${ASMHDRS})
 EXPORTING_ASMCHDRS = $(addprefix expasmc.,${ASMCHDRS})
 
+ifeq ($(filter rom%,${MAKECMDGOALS}),)
+CDEFINES     += ${RAMCDEFINES}
+ASMDEFINES   += ${RAMASMDEFINES}
+else
+CDEFINES     += ${ROMCDEFINES}
+ASMDEFINES   += ${ROMASMDEFINES}
+endif
+
 
 # General rules
 
@@ -226,6 +239,11 @@ expasmc.${CMHGAUTOHDR}: hdr.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
         FAppend ${C_EXP_HDR}.${CMHGAUTOHDR} ${C_EXP_HDR}.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
 endif
 
+ifneq (${CMHGDEPENDS},)
+CMHGDEPENDS_ = $(addprefix o.,${CMHGDEPENDS}) $(addprefix od.,${CMHGDEPENDS}) $(addprefix i.,${CMHGDEPENDS})
+${CMHGDEPENDS_}: h.${CMHGFILE}
+endif
+
 .SUFFIXES: .exphdr .expasm .expasmc .h .hdr
 .h.exphdr:;    @${ECHO} ${CP} $< ${C_EXP_HDR}.$(subst h.,,$<) ${CPFLAGS} ; ${CP} $< ${C_EXP_HDR}.$(subst h.,,$<) ${CPFLAGS} 
 .hdr.expasm:;  @${ECHO} ${CP} $< ${EXP_HDR}.$(subst hdr.,,$<) ${CPFLAGS} ; ${CP} $< ${EXP_HDR}.$(subst hdr.,,$<) ${CPFLAGS} 
diff --git a/Makefiles/ModuleLibs b/Makefiles/ModuleLibs
index 334a961..6102b3d 100644
--- a/Makefiles/ModuleLibs
+++ b/Makefiles/ModuleLibs
@@ -37,6 +37,7 @@ EVENTLIB  = C:tboxlibs.o.eventlibm
 WIMPLIB   = C:tboxlibs.o.wimplib
 RENDERLIB = C:tboxlibs.o.renderlib
 TBOXLIBS  = ${EVENTLIB} ${TBOXLIB} ${RENDERLIB} ${WIMPLIB}
+TBOXINTLIB= C:tboxlibint.o.tboxlibm
 
 SOCK4LIB  = TCPIPLibs:o.socklibzm
 SOCK5LIB  = TCPIPLibs:o.socklib5zm
diff --git a/ModuleDB b/ModuleDB
index ee30ba4..5b5e9b3 100644
--- a/ModuleDB
+++ b/ModuleDB
@@ -33,7 +33,7 @@ DThreads                EXP     ThirdParty.Endurance.Lib.DThreads
 RMVersion               ASM     Programmer.RMVersion
 zlib                    EXP     Lib.zlib
 MsgLib                  EXP     Lib.MsgLib
-TCPIPheaders            EXP     Lib.TCPIPLibs.headers
+TCPIPheaders            C       Lib.TCPIPLibs.headers
 inetlib                 EXP     Lib.TCPIPLibs.inetlib
 rpclib                  EXP     Lib.TCPIPLibs.rpclib.rpc
 socklib                 EXP     Lib.TCPIPLibs.socklib
@@ -41,14 +41,14 @@ unixlib                 EXP     Lib.TCPIPLibs.unixlib
 LDAPheaders             EXP     Networking.LDAP.include
 liblber                 C       Networking.LDAP.liblber
 libldap                 C       Networking.LDAP.libldap
-AsmUtils                EXP     Lib.AsmUtils
+AsmUtils                ASM     Lib.AsmUtils
 ShareD                  EXP     Networking.AUN.Access.ShareFS.ShareFS
 SSLRO                   EXP     Networking.libs.SSLRO
-HdrSrc                  EXP     Programmer.HdrSrc
+HdrSrc                  C       Programmer.HdrSrc
 DDT                     EXP     Programmer.DDT
 MPEGHdrs                EXP     Video.MPEG.MPEGHdrs
-UnicodeLib              EXP     Lib.Unicode
-ToolboxLib              EXP     Toolbox.Libs
+UnicodeLib              C       Lib.Unicode
+ToolboxLib              C       Toolbox.Libs
 SSLeay                  EXP     Lib.SSLeay
 C++Lib                  C       Lib.C++Lib
 callx                   EXP     Lib.callx
diff --git a/VersionNum b/VersionNum
index 417c4ef..f7174e4 100644
--- a/VersionNum
+++ b/VersionNum
@@ -1,23 +1,23 @@
-/* (4.76)
+/* (4.77)
  *
  * This file is automatically maintained by srccommit, do not edit manually.
  * Last processed by srccommit version: 1.1.
  *
  */
-#define Module_MajorVersion_CMHG        4.76
+#define Module_MajorVersion_CMHG        4.77
 #define Module_MinorVersion_CMHG        
-#define Module_Date_CMHG                14 Jun 2009
+#define Module_Date_CMHG                26 Jun 2009
 
-#define Module_MajorVersion             "4.76"
-#define Module_Version                  476
+#define Module_MajorVersion             "4.77"
+#define Module_Version                  477
 #define Module_MinorVersion             ""
-#define Module_Date                     "14 Jun 2009"
+#define Module_Date                     "26 Jun 2009"
 
-#define Module_ApplicationDate          "14-Jun-09"
+#define Module_ApplicationDate          "26-Jun-09"
 
 #define Module_ComponentName            "BuildSys"
 #define Module_ComponentPath            "castle/RiscOS/BuildSys"
 
-#define Module_FullVersion              "4.76"
-#define Module_HelpVersion              "4.76 (14 Jun 2009)"
-#define Module_LibraryVersionInfo       "4:76"
+#define Module_FullVersion              "4.77"
+#define Module_HelpVersion              "4.77 (26 Jun 2009)"
+#define Module_LibraryVersionInfo       "4:77"
-- 
GitLab