Commit b566a2c9 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Change to not use RAMCModule ROMCModule.

Rather than refactor every toolbox module that uses TBoxMake, and since that already carries its own rules for resources and RAM and debug builds, it seems simpler to just create a new ROM and link target than try to use CModule shared makefile.
Participated in a ROM build, but not functionally tested.

Version 0.18. Tagged as 'Common-0_18'
parent 291e0955
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
# *********************************** # ***********************************
# Date Name Description # Date Name Description
# ---- ---- ----------- # ---- ---- -----------
# 09 Oct 1997 RWB Tidied up old Toolbox.Common build # 09 Oct 1997 RWB Tidied up old Toolbox.Common build
# #
# #
# Paths # Paths
# #
LIBDIR = <Lib$Dir> LIBDIR = <Lib$Dir>
EXP_HDR = <export$dir> EXP_HDR = <export$dir>
# #
...@@ -38,9 +38,9 @@ CMHG = cmhg ...@@ -38,9 +38,9 @@ CMHG = cmhg
CP = copy CP = copy
LD = link LD = link
RM = remove RM = remove
WIPE = x wipe WIPE = -wipe
XWIPE = x wipe XWIPE = x wipe
CD = dir CD = dir
LIBFILE = libfile LIBFILE = libfile
CFLAGS = -c -depend !Depend -Wap -zps0 ${INCLUDES} -ffah ${DFLAGS} CFLAGS = -c -depend !Depend -Wap -zps0 ${INCLUDES} -ffah ${DFLAGS}
...@@ -49,22 +49,22 @@ CPFLAGS = ~cfr~v ...@@ -49,22 +49,22 @@ CPFLAGS = ~cfr~v
WFLAGS = ~c~v WFLAGS = ~c~v
LIBFILEFLAGS = -c -o $@ LIBFILEFLAGS = -c -o $@
CCZM= ${CC} ${CFLAGSZM} CCZM= ${CC} ${CFLAGSZM}
# #
# Libraries # Libraries
# #
CLIB = CLIB:o.stubs CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib RLIB = RISCOSLIB:o.risc_oslib
RSTUBS = RISCOSLIB:o.rstubs RSTUBS = RISCOSLIB:o.rstubs
ROMSTUBS = RISCOSLIB:o.romstubs ROMSTUBS = RISCOSLIB:o.romstubs
ROMCSTUBS = RISCOSLIB:o.romcstubs ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISC_OSLib:o.AbsSym ABSSYM = RISC_OSLib:o.AbsSym
# #
# Include files # Include files
# #
INCLUDES = -IC:,<Lib$Dir>.tboxlibint. INCLUDES = -IC:,<Lib$Dir>.tboxlibint.
DFLAGS = DFLAGS =
# Program specific options: # Program specific options:
# #
...@@ -78,7 +78,7 @@ EXPORTS = ${LIBDIR}.tboxlibint ...@@ -78,7 +78,7 @@ EXPORTS = ${LIBDIR}.tboxlibint
OBJ = o.mem o.messages o.string32 o.rmensure o.objmodule o.objsupport o.slist o.toolboxmem OBJ = o.mem o.messages o.string32 o.rmensure o.objmodule o.objsupport o.slist o.toolboxmem
OBJZM = z.mem z.messages z.string32 z.rmensure z.objmodule z.objsupport z.slist z.toolboxmem OBJZM = z.mem z.messages z.string32 z.rmensure z.objmodule z.objsupport z.slist z.toolboxmem
DBG_OBJ = o.debug DBG_OBJ = o.debug
DBG_OBJZM = z.debug DBG_OBJZM = z.debug
# #
...@@ -87,8 +87,8 @@ DBG_OBJZM = z.debug ...@@ -87,8 +87,8 @@ DBG_OBJZM = z.debug
.SUFFIXES: .z .o .c .s .SUFFIXES: .z .o .c .s
.c.o:; ${CC} ${CFLAGS} -o $@ $< .c.o:; ${CC} ${CFLAGS} -o $@ $<
.c.z:; ${CCZM} -c -o $@ $< .c.z:; ${CCZM} -c -o $@ $<
.s.o:; ${AS} ${ASFLAGS} -o $@ $< .s.o:; ${AS} ${ASFLAGS} -o $@ $<
.s.z:; ${AS} ${ASFLAGS} -o $@ $< .s.z:; ${AS} ${ASFLAGS} -o $@ $<
# #
# Build # Build
...@@ -121,7 +121,7 @@ export: export_${PHASE} ...@@ -121,7 +121,7 @@ export: export_${PHASE}
export_hdrs: dirs export_hdrs: dirs
${CP} objects ${EXPORTS}.objects ${CPFLAGS} ${CP} objects ${EXPORTS}.objects ${CPFLAGS}
${CP} h.* ${EXPORTS}.h.* ${CPFLAGS} ${CP} h.* ${EXPORTS}.h.* ${CPFLAGS}
${CP} hdr.* ${EXP_HDR}.* ${CPFLAGS} ${CP} hdr.* ${EXP_HDR}.* ${CPFLAGS}
${CP} TboxMake ${EXPORTS}.TboxMake ${CPFLAGS} ${CP} TboxMake ${EXPORTS}.TboxMake ${CPFLAGS}
${CP} VersionNum ${EXPORTS}.LibVersion ${CPFLAGS} ${CP} VersionNum ${EXPORTS}.LibVersion ${CPFLAGS}
@echo ${DEBUGLIB} and ${TBOXLIB}: export complete (hdrs) @echo ${DEBUGLIB} and ${TBOXLIB}: export complete (hdrs)
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
# $Id$ # $Id$
# #
#
# Our aim if not known
#
TARGET ?= ${COMPONENT}
# #
# Export Paths for Messages module # Export Paths for Messages module
# #
...@@ -18,8 +23,10 @@ TBOXINTHDR = -I${TBOXINTLIBDIR} ...@@ -18,8 +23,10 @@ TBOXINTHDR = -I${TBOXINTLIBDIR}
# #
# Build options # Build options
# #
CFLAGS += -zm -zps1 -ffah -D${SYSTEM} CFLAGS += -zm -zps1 -ffah -D${SYSTEM}
CINCLUDES += ${TBOXINTHDR} -Itbox: -IC: CINCLUDES += ${TBOXINTHDR} -Itbox: -IC:
CDFLAGS += -Ddebugging=1
ASDFLAGS += -PD "debugging SETA 1"
# #
# Libraries # Libraries
...@@ -28,15 +35,12 @@ include Makefiles:ModuleLibs ...@@ -28,15 +35,12 @@ include Makefiles:ModuleLibs
RAM_LIBS = ${TBOXINTLIB} ${EXTRARAMLIBS} RAM_LIBS = ${TBOXINTLIB} ${EXTRARAMLIBS}
ROM_LIBS = ${TBOXINTLIB} ${EXTRAROMLIBS} ROM_LIBS = ${TBOXINTLIB} ${EXTRAROMLIBS}
ABSSYM = RISC_OSLib:o.c_abssym
# #
# Find the rest of the Makefile fragments for C modules # Find the rest of the Makefile fragments for C modules
# #
include Makefiles:StdTools include Makefiles:StdTools
include Makefiles:DbgRules
include Makefiles:ModStdRule include Makefiles:ModStdRule
include Makefiles:RAMCModule
include Makefiles:ROMCModule
# #
# Toolbox modules hold just a Messages file, just a Res file or both. # Toolbox modules hold just a Messages file, just a Res file or both.
...@@ -65,10 +69,8 @@ RAMRES .= unused.ram.resources ...@@ -65,10 +69,8 @@ RAMRES .= unused.ram.resources
RAMBOTH .= unused.ram.both RAMBOTH .= unused.ram.both
# #
# RAM builds require the resources to be packaged up into a ResourceFS # RAM builds require the resources in a ResourceFS registerable area
# registerable area.
# #
${RAMMESSAGES}: LocalRes:Messages ${RAMMESSAGES}: LocalRes:Messages
resgen messages_file $@ LocalRes:Messages Resources.${COMPONENT}.Messages resgen messages_file $@ LocalRes:Messages Resources.${COMPONENT}.Messages
...@@ -100,29 +102,46 @@ o.mainROM: main.c ...@@ -100,29 +102,46 @@ o.mainROM: main.c
$(CC) ${CFLAGS} -DROM -o $@ main.c $(CC) ${CFLAGS} -DROM -o $@ main.c
# #
# Debug builds of modules # Builds of modules
# #
DBG_MODULE .= rm.D${COMPONENT} DBG_MODULE .= rm.D${TARGET}
DBG_OBJS .= ${RAM_OBJS} DBG_OBJS .= ${RAM_OBJS}
DBG_LIBS .= ${RAM_LIBS} C:tboxlibint.o.debuglibm ${DEBUGLIB} ${NET4LIBS} DBG_LIBS .= ${RAM_LIBS} C:tboxlibint.o.debuglibm ${DEBUGLIBS} ${NET4LIBS}
DBG_DIRS .= od._dirs ROM_MODULE .= aof.${TARGET}
ABS_MODULE .= linked.${TARGET}
RAM_MODULE .= rm.${TARGET}
DIRS .= o._dirs
${DBG_MODULE}: ${DBG_OBJS} ${DBG_LIBS} ${CLIB} ${DIRS} ${RAM_DEPEND} ${DBG_DIRS} ${DBG_MODULE}: ${DBG_OBJS} ${DBG_LIBS} ${CLIB} ${RAM_DEPEND} ${DIRS}
${MKDIR} rm
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${DBG_OBJS} ${DBG_LIBS} ${CLIB} ${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${DBG_OBJS} ${DBG_LIBS} ${CLIB}
trace: ${DBG_MODULE} ${DBG_DIRS} ${RAM_MODULE}: ${RAM_OBJS} ${RAM_LIBS} ${CLIB} ${RAM_DEPEND} ${DIRS}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${RAM_OBJS} ${ROM_LIBS} ${CLIB}
${ROM_MODULE}: ${ROM_OBJS} ${ROM_LIBS} ${C_ABSSYM} ${ROM_DEPEND} ${DIRS}
${LD} ${LDFLAGS} ${LDLINKFLAGS} -o $@ -aof ${ROM_OBJS} ${ROM_LIBS} ${ROMCSTUBS}
trace: ${DBG_MODULE} ${DIRS}
@echo ${COMPONENT}: debug module built @echo ${COMPONENT}: debug module built
${DBG_DIRS}: all: ${RAM_MODULE} ${DIRS}
${MKDIR} od @${ECHO} ${COMPONENT}: ram module built
${TOUCH} $@
.SUFFIXES: .c .s .od rom: ${ROM_MODULE} ${DIRS}
@${ECHO} ${COMPONENT}: rom module built
.c.od:; ${CC} ${CFLAGS} -Ddebugging=1 -o $@ $< rom_link: ${DIRS}
.s.od:; ${AS} ${ASFLAGS} -PD "debugging SETA 1" -o $@ $< ${LD} ${LDFLAGS} ${LDLINKFLAGS} -o ${ABS_MODULE} -rmf -base ${ADDRESS} ${ROM_MODULE} ${C_ABSSYM}
${CP} ${ABS_MODULE} ${LINKDIR}.${TARGET} ${CPFLAGS}
@${ECHO} ${COMPONENT}: rom_link complete
${DIRS}:
${MKDIR} od
${MKDIR} o
${MKDIR} rm
${MKDIR} linked
${MKDIR} aof
${TOUCH} $@
EOFTboxMakefile=Common.TboxMake EOFTboxMakefile=Common.TboxMake
# EOF # EOF
/* (0.17) /* (0.18)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.17 #define Module_MajorVersion_CMHG 0.18
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2012 #define Module_Date_CMHG 04 Feb 2012
#define Module_MajorVersion "0.17" #define Module_MajorVersion "0.18"
#define Module_Version 17 #define Module_Version 18
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "14 Jan 2012" #define Module_Date "04 Feb 2012"
#define Module_ApplicationDate "14-Jan-12" #define Module_ApplicationDate "04-Feb-12"
#define Module_ComponentName "Common" #define Module_ComponentName "Common"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/Common" #define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/Common"
#define Module_FullVersion "0.17" #define Module_FullVersion "0.18"
#define Module_HelpVersion "0.17 (14 Jan 2012)" #define Module_HelpVersion "0.18 (04 Feb 2012)"
#define Module_LibraryVersionInfo "0:17" #define Module_LibraryVersionInfo "0:18"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment