Commit 1a190dc8 authored by Ben Avison's avatar Ben Avison
Browse files

Improvements to soft-loadable builds of the module

Detail:
  Previously had an over-complicated method of accessing data block to install
  in ResourceFS and had needless duplication of Messages files in build. Also
  it was impossible to automate the building of the pre-RISC OS 3.6 variant
  of the module. All fixed by rewriting the makefile to use shared makefile
  fragments (and moving assembler sources to conventional 's' subdirectory).
Admin:
  Tested in Tools CD build.

Version 1.54. Tagged as 'DrawFile-1_54'
parent 65dc6d3d
s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
c/** gitlab-language=c linguist-language=c linguist-detectable=true
h/** gitlab-language=c linguist-language=c linguist-detectable=true
......
......@@ -13,183 +13,28 @@
# limitations under the License.
#
# Makefile for DrawFile
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 28th Nov 1994 JRC Created.
# 11th Jan 1995 AMcC Updated - diff rules for 3.10 and post 3.10
#
# Paths
#
RESDIR = <resource$dir>.Resources2
#
# Generic options:
#
CC = cc -IOS: -fach -wp -DDRAWFILE
CP = copy
OBJASM = ObjAsm ${THROWBACK} -depend !Depend -stamp -quit
CMHG = CMHG
LINK = Link
MKDIR = cdir
RM = remove
WIPE = -wipe
ZM = -zM
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
#
# Libraries:
#
OSLIB = OSLib:OSLib.o
RSTUBS = RISC_OSLib:o.romcstubs
ABSSYM = RISC_OSLib:o.abssym
ASMUTILS = C:AsmUtils.o.AsmUtilsZM
#
# Program specific options:
#
COMPONENT = DrawFile
TARGET = aof.DrawFile
OBJS = o.bbox o.callback o.declare o.header o.main \
o.render o.riscos o.textarea o.trfm o.verify
OBJS_310 = \
o.bbox o.callback o.declare o.files o.header310 oSA.main \
o.render o.riscos o.textarea o.trfm o.verify
OBJSD = debug.bbox debug.callback debug.declare o.files o.header \
o.hostfs debug.main debug.render \
debug.riscos debug.textarea debug.trfm debug.verify debug.jc_trace
INCS = i.bbox i.declare i.main i.render i.files i.textarea i.verify
RESOURCES = o.Messages
RESOURCES310 = o.Message310
H = h.drawfile #h.hostfs
#
# Generic rules {used by top-level build}:
#
rom: ${TARGET}
@echo ${COMPONENT}: rom module built
export: ${EXPORTS}
@echo ${COMPONENT}: export complete
install_rom: ${TARGET}
${CP} ${TARGET} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom module installed
clean:
${WIPE} o.* ${WFLAGS}
${WIPE} oSA.* ${WFLAGS}
${RM} linked.${COMPONENT}
${RM} ${TARGET}
${WIPE} rm.* ${WFLAGS}
@echo ${COMPONENT}: cleaned
resources: resources-${CMDHELP}
@echo ${COMPONENT}: resource files copied
resources_common:
${MKDIR} ${RESDIR}.${COMPONENT}
${CP} LocalRes:Messages ${RESDIR}.${COMPONENT}.Messages ${CPFLAGS}
resources-None: resources_common
@
resources-: resources_common
print LocalRes:CmdHelp { >> ${RESDIR}.${COMPONENT}.Messages }
#
# ROM target (re-linked at ROM Image build time)
#
${TARGET}: ${OBJS} ${OSLIB} ${RSTUBS} ${ASMUTILS}
${LINK} -o $@ -aof ${OBJS} ${OSLIB} ${RSTUBS} ${ASMUTILS}
#
# Final link for the ROM Image (using given base address)
#
rom_link:
${LINK} -o linked.${COMPONENT} -rmf -base ${ADDRESS} ${TARGET} ${ABSSYM}
${CP} linked.${COMPONENT} ${LINKDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom_link complete
#
# Extra {development} rules:
#
all: RM.DrawFile
@Echo Made all
debug: RM.DrawFileD
@Echo Made debug
clean_all:
-Destroy ${OBJS} ${OBJSD} ${ASMS} ${INCS} RM.DrawFile RM.DrawFileD
@Echo Made clean
asms: ${ASMS}
@Echo Made asms
incs: ${INCS}
@Echo Made incs
objs: ${OBJS} ${OBJSD}
@Echo Made objs
map: ${OBJS} ${OSLIB} CLib:o.Stubs
${LINK} -map -output null: -s Symbols ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS} > Map
release: RM.DrawFile
%Copy RM.DrawFile Choices:Boot.PreDesk.DrawFile ~CFLNRV
/<Prefix$Dir>.RM.DrawFile
@Echo Made release
# Internal targets
RM.DrawFile: ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
RM.DrawFileD: ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
# For Aquarius
RM.310.DrawFile: ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
# Static dependencies:
o.Messages: LocalRes:Messages
ResGen Messages o.Messages LocalRes:Messages Resources.DrawFile.Messages
o.Message310: LocalRes:Message310
ResGen Messages o.Message310 LocalRes:Message310 Resources.DrawFile.Messages
#General rules
.SUFFIXES: .cmhg .h .c .debug .o .oSA .Resources .s .asm .i .def
.c.o:; ${CC} ${THROWBACK} -depend !Depend -c ${ZM} -ff -o $@ $<
.c.oSA:; ${CC} ${THROWBACK} -depend !Depend -c ${ZM} -ff -DSTANDALONE -o $@ $<
.c.debug:; ${CC} ${THROWBACK} -depend !Depend -c ${ZM} -DTRACE=1 -o $@ $<
.c.i:; ${CC} -E -C $< > $@
.c.s:; ${CC} ${ZM} -S -ff $<
.cmhg.o:; ${CMHG} -p $< $@
.Resources.o .Resources.debug:
ResGen $* $@ $< Resources.DrawFile.$*
.asm.o:; ${OBJASM} $< $@
.asm.debug:; ${OBJASM} $< $@
#.def.h:; DefMod -h < $< > $@
#.def.s:; DefMod -s < $< > $@
#.def.o:; DefMod -l -o l.$* < $<
# LibFile -c -o $@ -via ViaFile
# Wipe l.$* ~C~FR~V
COMPONENT = DrawFile
HDRS =
OBJS = bbox callback declare main render riscos textarea trfm verify
DBG_OBJS = ${OBJS} hostfs jc_trace
ifeq (${INTERNATIONAL_HELP},NO)
CMHGFILE = header310
else
CMHGFILE = header
endif
LIBS = ${OSLIB} ${ASMUTILS}
CINCLUDES = -IOS:
CFLAGS = -ff -fach -wp
CDFLAGS = -DTRACE=1
CDEFINES = -DDRAWFILE
RAMCDEFINES = -DSTANDALONE
RES_AREA = files_messages
include CModule
include StdTools
include ModStdRule
include DbgRules
include ModuleLibs
# Dynamic dependencies:
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rm.DrawFile
amu_machine standalone
echo done
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rm.310.DrawFile
amu_machine standalone INTERNATIONAL_HELP=NO
echo done
/* (1.53)
/* (1.54)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.53
#define Module_MajorVersion_CMHG 1.54
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Oct 2008
#define Module_Date_CMHG 26 Jun 2009
#define Module_MajorVersion "1.53"
#define Module_Version 153
#define Module_MajorVersion "1.54"
#define Module_Version 154
#define Module_MinorVersion ""
#define Module_Date "17 Oct 2008"
#define Module_Date "26 Jun 2009"
#define Module_ApplicationDate "17-Oct-08"
#define Module_ApplicationDate "26-Jun-09"
#define Module_ComponentName "DrawFile"
#define Module_ComponentPath "RiscOS/Sources/Video/Render/DrawFile"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/DrawFile"
#define Module_FullVersion "1.53"
#define Module_HelpVersion "1.53 (17 Oct 2008)"
#define Module_LibraryVersionInfo "1:53"
#define Module_FullVersion "1.54"
#define Module_HelpVersion "1.54 (26 Jun 2009)"
#define Module_LibraryVersionInfo "1:54"
;files.s - export funny symbols referring to resource files
GET OS:Hdr.Types
AREA |C$$code|, CODE, READONLY
MACRO
$fn ResourceFile $symbol
EXPORT $fn
LCLS label
label SETS (:CHR: &7C) :CC: "$symbol" :CC: (:CHR: &7C)
IMPORT $label
$fn B $label
MEND
files_messages ResourceFile Messages
END
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