Commit 97c2a5d1 authored by Richard Buckley's avatar Richard Buckley
Browse files

Build process improvements :

* Standardised make process in common will all other modules in build.
* Internal and external toolbox libraries and headers exported to
  <Lib$Dir>.tboxlibint and <Lib$Dir>.tboxlibs respectivly.
* Resources now localised.
* Local !MkClean and !MkRom now use amu_machine.
parent 525ffd3a
No related merge requests found
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu clean
amu_machine clean
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu rom
amu_machine rom
# Makefile for Menu
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 06-Jan-94 AMcC Created
#
#
# Component specific options:
#
COMPONENT = Menu
ROM_MODULE = aof.${COMPONENT}
#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources2.${COMPONENT}
#
# Generic options:
#
MKDIR = cdir
CC = cc
CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = -wipe
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -ffah -zps1 ${DFLAGS}
DFLAGS = -DROM
INCLUDES = -Itbox:,C:
#
# Libraries
#
ANSILIB = CLib:o.ansilib
CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib
ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISC_OSLib:o.abssym
TBOXLIB = tbox:tboxlib
OBJS =\
o.Modhdr_NoD\
o.Menu\
o.auxiliary\
o.copy\
o.create\
o.delete\
o.events\
o.getstate\
o.hide\
o.miscop\
o.show\
o.task
#
# Rule patterns
#
.c.o:; ${CC} ${CFLAGS} -o $@ $<
.cmhg.o:; ${CMHG} -O $@ $<
#
# Main rules:
#
#
rom: ${ROM_MODULE}
@echo ${COMPONENT}: Module built (ROM)
install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
resources: Messages
${MKDIR} ${RESDIR}
${CP} Messages ${RESDIR}.Messages ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
clean:
${WIPE} o.* ${WFLAGS}
${WIPE} aof ${WFLAGS}
${WIPE} linked ${WFLAGS}
${WIPE} map ${WFLAGS}
@echo ${COMPONENT}: cleaned
${ROM_MODULE}: ${OBJS} ${TBOXLIB} ${ROMCSTUBS}
${MKDIR} aof
${LD} -o $@ -aof ${OBJS} ${TBOXLIB} ${ROMCSTUBS}
# final link for ROM Image (using given base address)
rom_link:
${MKDIR} linked
${MKDIR} map
${LD} -o linked.${COMPONENT} -bin -base ${ADDRESS} ${ROM_MODULE} ${ABSSYM} \
-map > map.${COMPONENT}
truncate map.${COMPONENT} linked.${COMPONENT}
${CP} linked.${COMPONENT} ${LINKDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom_link complete
#---------------------------------------------------------------------------
# Dynamic dependencies:
# Project: Menu
# Toolflags:
CCflags = -c -depend !Depend -I^.common,C: -throwback -zM -ffah -zps1
C++flags = -c -depend !Depend -throwback -IC:
Pascalflags = -c -depend !Depend -throwback -IP:
Linkflags = -m -o $@
ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
# Final targets:
@.Menu: @.o.auxiliary @.o.copy @.o.create @.o.delete @.o.events \
@.o.getstate @.o.hide @.o.Menu @.o.miscop @.o.show @.o.task @.o.Modhdr_NoD @.o.messages \
@.^.common.tboxlib
tlink $(linkflags) @.o.auxiliary @.o.copy @.o.create \
@.o.delete @.o.events @.o.getstate @.o.hide @.o.Menu @.o.miscop @.o.show @.o.task \
@.o.Modhdr_NoD @.o.messages @.^.common.tboxlib
# User-editable dependencies:
@.MenuM: @.messages
modgen @.MenuM MenuM "Menu Messages" 1.00 @.messages Resources.Menu.Messages
@.o.messages: @.Messages
resgen messages_file @.o.messages @.Messages Resources.Menu.Messages
# Static dependencies:
@.o.auxiliary: @.c.auxiliary
cc $(ccflags) -o @.o.auxiliary @.c.auxiliary
@.o.copy: @.c.copy
cc $(ccflags) -o @.o.copy @.c.copy
@.o.create: @.c.create
cc $(ccflags) -o @.o.create @.c.create
@.o.delete: @.c.delete
cc $(ccflags) -o @.o.delete @.c.delete
@.o.events: @.c.events
cc $(ccflags) -o @.o.events @.c.events
@.o.getstate: @.c.getstate
cc $(ccflags) -o @.o.getstate @.c.getstate
@.o.hide: @.c.hide
cc $(ccflags) -o @.o.hide @.c.hide
@.o.Menu: @.c.Menu
cc $(ccflags) -o @.o.Menu @.c.Menu
@.o.miscop: @.c.miscop
cc $(ccflags) -o @.o.miscop @.c.miscop
@.o.show: @.c.show
cc $(ccflags) -o @.o.show @.c.show
@.o.task: @.c.task
cc $(ccflags) -o @.o.task @.c.task
@.o.Modhdr_NoD: @.cmhg.Modhdr_NoD
cmhg @.cmhg.Modhdr_NoD -o @.o.Modhdr_NoD
# Dynamic dependencies:
......@@ -49,7 +49,7 @@ WFLAGS = ~c~v
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -ffah -zps1 ${DFLAGS}
DFLAGS = -DROM
INCLUDES = -Itbox:,C:
INCLUDES = -I<Lib$Dir>.tboxlibint.,<Lib$Dir>.tboxlibs:,C:
#
# Libraries
......@@ -59,7 +59,7 @@ CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib
ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISC_OSLib:o.abssym
TBOXLIB = tbox:tboxlib
TBOXLIB = <Lib$Dir>.tboxlibint.o.tboxlibm
OBJS =\
o.Modhdr_NoD\
......@@ -92,9 +92,9 @@ install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
resources: Messages
resources: Resources.${LOCALE}.Messages
${MKDIR} ${RESDIR}
${CP} Messages ${RESDIR}.Messages ${CPFLAGS}
${CP} Resources.${LOCALE}.Messages ${RESDIR}.Messages ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
clean:
......
File moved
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