Commit 3b88d112 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Do 'rom_link' against the same thing you do 'rom' with

During the rom phase, ROM C modules would be linked against ${ROMCSTUBS}, ie. clib.
During the rom_link phase, they'd be linked against ${ABSSYM}, ie. clib and rlib.
As RISC_OSLib contains various wimp_ symbol names which clash with ${WIMPLIB} from the Toolbox, so you can't write a ROMmable C module which links against the Toolbox and uses the shared makefiles.

We define a new variable ROM_SYMS which is initialised to ${C_ABSSYM}, ie. just the clib to match the stubs used during the rom phase, and the ${ROMCSTUBS} is now appended to ${ROM_LIBS} so it can be overridden rather than being hardwired into the rule.
For completeness SA_LIBS can now also be overridden to remove ${CLIB} if desired.

CApp/CLibrary now use ${NOP} silently.

Version 6.60. Tagged as 'BuildSys-6_60'
parent 361fbb0f
......@@ -139,7 +139,7 @@ clean ::
install: install_${INSTTYPE}
install_: install_tool
${NOP}
@${NOP}
INSTAPP_DEPENDS += $(filter ${TARGET},${INSTAPP_FILES})
......
......@@ -149,10 +149,10 @@ clean ::
@${ECHO} ${COMPONENT}: cleaned
export: export_${PHASE}
${NOP}
@${NOP}
export_: export_libs export_hdrs
${NOP}
@${NOP}
create_exp_hdr_dirs:
${MKDIR} ${EXPDIR}.h
......
......@@ -169,6 +169,9 @@ SA_OBJS += ${CMHGFILE} ${RES_OBJ}
DBG_OBJS += ${CMHGFILE} ${RES_OBJ}
ROM_LIBS ?= ${LIBS}
SA_LIBS ?= ${LIBS}
ROM_LIBS += ${ROMCSTUBS}
ROM_SYMS = ${C_ABSSYM}
SA_LIBS += ${CLIB}
DBG_LIBS += ${DEBUGLIBS}
ROM_OBJS_ = $(addprefix o.,${ROM_OBJS})
......@@ -350,11 +353,11 @@ rom_link${CUSTOMROM}: linked.${LNK_TARGET}
${CP} linked.${LNK_TARGET}_sym ${LINKDIR}.${TARGET}_sym ${CPFLAGS}
@${ECHO} ${COMPONENT}: rom_link complete
aof.${ROM_TARGET}: ${ROM_OBJS_} ${ROM_LIBS} ${ROMCSTUBS} ${DIRS} ${ROM_DEPEND}
${LD} -o $@ -aof ${ROM_OBJS_} ${ROM_LIBS} ${ROMCSTUBS}
aof.${ROM_TARGET}: ${ROM_OBJS_} ${ROM_LIBS} ${DIRS} ${ROM_DEPEND}
${LD} -o $@ -aof ${ROM_OBJS_} ${ROM_LIBS}
linked.${LNK_TARGET}: aof.${ROM_TARGET} ${ABSSYM} ${FORCEROMLINK}
${LD} ${LDFLAGS} ${LDLINKFLAGS} -o $@ -rmf -base ${ADDRESS} aof.${ROM_TARGET} ${ABSSYM} -Symbols linked.${LNK_TARGET}_sym
linked.${LNK_TARGET}: aof.${ROM_TARGET} ${ROM_SYMS} ${FORCEROMLINK}
${LD} ${LDFLAGS} ${LDLINKFLAGS} -o $@ -rmf -base ${ADDRESS} aof.${ROM_TARGET} ${ROM_SYMS} -Symbols linked.${LNK_TARGET}_sym
#
# Standalone rules
......@@ -376,19 +379,19 @@ gpa_debug${CUSTOMGPA}: gpa.${GPA_TARGET}
prepro: ${PP_OBJS_} ${DIRS}
@${ECHO} ${COMPONENT}: sources preprocessed
rm.${SA_TARGET}: ${SA_OBJS_} ${SA_LIBS} ${CLIB} ${DIRS} ${SA_DEPEND}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${SA_OBJS_} ${SA_LIBS} ${CLIB}
rm.${SA_TARGET}: ${SA_OBJS_} ${SA_LIBS} ${DIRS} ${SA_DEPEND}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${SA_OBJS_} ${SA_LIBS}
${MODSQZ} ${MODSQZFLAGS} $@
${CHMOD} -R a+rx rm
rm.${DBG_TARGET}: ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS} ${CLIB} ${DIRS} ${SA_DEPEND}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS} ${CLIB}
rm.${DBG_TARGET}: ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS} ${DIRS} ${SA_DEPEND}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS}
${CHMOD} -R a+rx rm
gpa.${GPA_TARGET}: aif.${AIF_TARGET}
${TOGPA} -s aif.${AIF_TARGET} $@
aif.${AIF_TARGET}: rm.${DBG_TARGET}
${LD} -aif -bin -d -o aif.${AIF_TARGET} ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS} ${CLIB}
${LD} -aif -bin -d -o aif.${AIF_TARGET} ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS}
# EOF
/* (6.59)
/* (6.60)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.59
#define Module_MajorVersion_CMHG 6.60
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Oct 2014
#define Module_Date_CMHG 24 Oct 2014
#define Module_MajorVersion "6.59"
#define Module_Version 659
#define Module_MajorVersion "6.60"
#define Module_Version 660
#define Module_MinorVersion ""
#define Module_Date "22 Oct 2014"
#define Module_Date "24 Oct 2014"
#define Module_ApplicationDate "22-Oct-14"
#define Module_ApplicationDate "24-Oct-14"
#define Module_ComponentName "BuildSys"
#define Module_ComponentPath "castle/RiscOS/BuildSys"
#define Module_FullVersion "6.59"
#define Module_HelpVersion "6.59 (22 Oct 2014)"
#define Module_LibraryVersionInfo "6:59"
#define Module_FullVersion "6.60"
#define Module_HelpVersion "6.60 (24 Oct 2014)"
#define Module_LibraryVersionInfo "6:60"
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