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
......@@ -38,7 +38,7 @@ CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = x wipe
WIPE = -wipe
XWIPE = x wipe
CD = dir
LIBFILE = libfile
......
......@@ -3,6 +3,11 @@
# $Id$
#
#
# Our aim if not known
#
TARGET ?= ${COMPONENT}
#
# Export Paths for Messages module
#
......@@ -20,6 +25,8 @@ TBOXINTHDR = -I${TBOXINTLIBDIR}
#
CFLAGS += -zm -zps1 -ffah -D${SYSTEM}
CINCLUDES += ${TBOXINTHDR} -Itbox: -IC:
CDFLAGS += -Ddebugging=1
ASDFLAGS += -PD "debugging SETA 1"
#
# Libraries
......@@ -28,15 +35,12 @@ include Makefiles:ModuleLibs
RAM_LIBS = ${TBOXINTLIB} ${EXTRARAMLIBS}
ROM_LIBS = ${TBOXINTLIB} ${EXTRAROMLIBS}
ABSSYM = RISC_OSLib:o.c_abssym
#
# Find the rest of the Makefile fragments for C modules
#
include Makefiles:StdTools
include Makefiles:DbgRules
include Makefiles:ModStdRule
include Makefiles:RAMCModule
include Makefiles:ROMCModule
#
# Toolbox modules hold just a Messages file, just a Res file or both.
......@@ -65,10 +69,8 @@ RAMRES .= unused.ram.resources
RAMBOTH .= unused.ram.both
#
# RAM builds require the resources to be packaged up into a ResourceFS
# registerable area.
# RAM builds require the resources in a ResourceFS registerable area
#
${RAMMESSAGES}: LocalRes:Messages
resgen messages_file $@ LocalRes:Messages Resources.${COMPONENT}.Messages
......@@ -100,29 +102,46 @@ o.mainROM: 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_LIBS .= ${RAM_LIBS} C:tboxlibint.o.debuglibm ${DEBUGLIB} ${NET4LIBS}
DBG_DIRS .= od._dirs
DBG_LIBS .= ${RAM_LIBS} C:tboxlibint.o.debuglibm ${DEBUGLIBS} ${NET4LIBS}
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}
${MKDIR} rm
${DBG_MODULE}: ${DBG_OBJS} ${DBG_LIBS} ${CLIB} ${RAM_DEPEND} ${DIRS}
${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
${DBG_DIRS}:
${MKDIR} od
${TOUCH} $@
all: ${RAM_MODULE} ${DIRS}
@${ECHO} ${COMPONENT}: ram module built
.SUFFIXES: .c .s .od
rom: ${ROM_MODULE} ${DIRS}
@${ECHO} ${COMPONENT}: rom module built
.c.od:; ${CC} ${CFLAGS} -Ddebugging=1 -o $@ $<
.s.od:; ${AS} ${ASFLAGS} -PD "debugging SETA 1" -o $@ $<
rom_link: ${DIRS}
${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
# EOF
/* (0.17)
/* (0.18)
*
* This file is automatically maintained by srccommit, do not edit manually.
* 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_Date_CMHG 14 Jan 2012
#define Module_Date_CMHG 04 Feb 2012
#define Module_MajorVersion "0.17"
#define Module_Version 17
#define Module_MajorVersion "0.18"
#define Module_Version 18
#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_ComponentPath "castle/RiscOS/Sources/Toolbox/Common"
#define Module_FullVersion "0.17"
#define Module_HelpVersion "0.17 (14 Jan 2012)"
#define Module_LibraryVersionInfo "0:17"
#define Module_FullVersion "0.18"
#define Module_HelpVersion "0.18 (04 Feb 2012)"
#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