Commit 781c7c6f 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 6c4164ce
| Copyright 1997 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean
| Copyright 1997 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom
# Project: DCS_Quit
# Toolflags:
CCflags = -c -depend !Depend -IC: -throwback -zM -fah -Ddebugging=1 -DDEBUG_MEMORY -zps1
C++flags = -c -depend !Depend -throwback -IC:
Pascalflags = -c -depend !Depend -throwback -IP:
Linkflags = -m -c++ -o $@
ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
# Final targets:
@.DCS_Quit: @.o.create @.o.delete @.o.events @.o.hide @.o.miscop \
@.o.show @.o.task @.o.Modhdr c:o.stubs @.o.main @.^.common.debuglib \
@.o.getstate @.o.dcsres @.o.dcsmess @.o.quitres @.o.quitmess
link $(linkflags) @.o.create @.o.delete @.o.events @.o.hide \
@.o.miscop @.o.show @.o.task @.o.Modhdr c:o.stubs @.o.main \
@.^.common.debuglib @.o.getstate @.o.dcsres @.o.dcsmess @.o.quitres @.o.quitmess
# User-editable dependencies:
@.o.dcsmess: @.Messages.DCS
resgen dcsmess_file @.o.dcsmess @.Messages.DCS Resources.DCS.Messages
@.o.dcsres: @.Resources.DCS
resgen dcsres_file @.o.dcsres @.Resources.DCS Resources.DCS.Res
@.o.quitmess: @.Messages.quit
resgen quitmess_file @.o.quitmess @.Messages.quit Resources.Quit.Messages
@.o.quitres: @.Resources.quit
resgen quitres_file @.o.quitres @.Resources.quit Resources.Quit.Res
# Static dependencies:
@.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.hide: @.c.hide
cc $(ccflags) -o @.o.hide @.c.hide
@.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: @.cmhg.Modhdr
cmhg @.cmhg.Modhdr -o @.o.Modhdr
@.o.main: @.c.main
cc $(ccflags) -o @.o.main @.c.main
@.o.getstate: @.c.getstate
cc $(ccflags) -o @.o.getstate @.c.getstate
# Dynamic dependencies:
# Makefile for DCS
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 06-Jan-94 AMcC Created
#
#
# Component specific options:
#
COMPONENT = DCS
ROM_MODULE = aof.${COMPONENT}
#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources2
#
# 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.ModNoDebug\
o.create\
o.delete\
o.events\
o.getstate\
o.hide\
o.main\
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.DCS Resources.DCS Messages.Quit Resources.Quit
${MKDIR} ${RESDIR}.DCS
${CP} Messages.DCS ${RESDIR}.DCS.Messages ${CPFLAGS}
${CP} Resources.DCS ${RESDIR}.DCS.Res ${CPFLAGS}
|
${MKDIR} ${RESDIR}.Quit
${CP} Messages.Quit ${RESDIR}.Quit.Messages ${CPFLAGS}
${CP} Resources.Quit ${RESDIR}.Quit.Res ${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: DCSQuit
# Toolflags:
CCflags = -c -depend !Depend -IC: -throwback -zM -ffah -zps1
C++flags = -c -depend !Depend -throwback -IC:
Pascalflags = -c -depend !Depend -throwback -IP:
Linkflags = -m -c++ -o $@
ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
# Final targets:
@.DCS_Quit: @.o.copy @.o.create @.o.delete @.o.events @.o.getstate @.o.hide \
@.o.main @.o.miscop @.o.show @.o.task c:o.stubs @.^.common.tboxlib @.o.modnodebug \
@.o.dcsmess @.o.dcsres @.o.quitmess @.o.quitres
link $(linkflags) @.o.copy @.o.create @.o.delete @.o.events \
@.o.getstate @.o.hide @.o.main @.o.miscop @.o.show @.o.task c:o.stubs @.^.common.tboxlib \
@.o.modnodebug @.o.dcsmess @.o.dcsres @.o.quitmess @.o.quitres
# User-editable dependencies:
@.o.dcsmess: @.Messages.DCS
resgen dcsmess_file @.o.dcsmess @.Messages.DCS Resources.DCS.Messages
@.o.dcsres: @.Resources.DCS
resgen dcsres_file @.o.dcsres @.Resources.DCS Resources.DCS.Res
@.o.quitmess: @.Messages.quit
resgen quitmess_file @.o.quitmess @.Messages.quit Resources.Quit.Messages
@.o.quitres: @.Resources.quit
resgen quitres_file @.o.quitres @.Resources.quit Resources.Quit.Res
# Static dependencies:
@.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.main: @.c.main
cc $(ccflags) -o @.o.main @.c.main
@.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.modnodebug: @.cmhg.modnodebug
cmhg @.cmhg.modnodebug -o @.o.modnodebug
# Dynamic dependencies:
......@@ -47,9 +47,9 @@ WIPE = -wipe
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -ffah -zps1 ${DFLAGS}
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -ffa -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.ModNoDebug\
......@@ -90,15 +90,8 @@ install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
resources: Messages.DCS Resources.DCS Messages.Quit Resources.Quit
${MKDIR} ${RESDIR}.DCS
${CP} Messages.DCS ${RESDIR}.DCS.Messages ${CPFLAGS}
${CP} Resources.DCS ${RESDIR}.DCS.Res ${CPFLAGS}
|
${MKDIR} ${RESDIR}.Quit
${CP} Messages.Quit ${RESDIR}.Quit.Messages ${CPFLAGS}
${CP} Resources.Quit ${RESDIR}.Quit.Res ${CPFLAGS}
|
resources: Resources.${LOCALE}.DCS.Messages Resources.${LOCALE}.DCS.Res Resources.${LOCALE}.Quit.Messages Resources.${LOCALE}.Quit.Res
${CP} Resources.${LOCALE}.* ${RESDIR}.* ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
clean:
......
# Messages file for the DCS Object Module
#{DictTokens}
E01:Memory allocation failed.
E02:There are still DCS tasks active.
File moved
# Messages file for the Quit Object Module
File moved
......@@ -249,7 +249,7 @@ extern _kernel_oserror *DCS_init(char *cmd_tail, int podule_base, void *pw)
if ((e = messages_file_open (messages_filename)) != NULL)
return e;
/* /* Hmm what the **** do we do about two message files ??? */
/* Hmm what the **** do we do about two message files ??? */
/* register here with the Toolbox as an Object Module */
......@@ -317,7 +317,7 @@ extern _kernel_oserror *DCS_SWI_handler(int swi_no, _kernel_swi_regs *r, void *p
case Quit_ClassSWI:
if (r->r[0] < 0 || r->r[0] >= MAX_CLASS_SWI_METHODS)
{
/* /* make an error here */
/* make an error here */
}
else
{
......@@ -325,7 +325,7 @@ extern _kernel_oserror *DCS_SWI_handler(int swi_no, _kernel_swi_regs *r, void *p
if (t == NULL)
{
/* /* make an error here */
/* make an error here */
}
e = (*class_swi_methods[r->r[0]])(r, t,swi_no + DCS_SWIChunkBase);
......
......@@ -111,7 +111,7 @@ extern _kernel_oserror *show_object (_kernel_swi_regs *r, TaskDescriptor *t,int
_kernel_swi_regs regs;
DCSAboutToBeShownEvent event;
int size;
int size=0;
regs.r[0] =0;
regs.r[1] = (int) obj->id;
......
......@@ -128,7 +128,6 @@ extern void task_remove (int task_handle)
* owned by the exiting task.
*/
_kernel_swi_regs regs;
TaskDescriptor *t = task__list;
extern void _delete_object(void *obj);
......@@ -136,7 +135,7 @@ extern void task_remove (int task_handle)
if (t) {
/*
* /* remove this task's object's list
* remove this task's object's list
*/
slist_delete_and_call((void *) &(t->object_list),_delete_object);
......
......@@ -30,6 +30,7 @@
#endif
extern _kernel_oserror *show_object (_kernel_swi_regs *r, TaskDescriptor *t,int class);
_kernel_oserror *show_do_show(_kernel_swi_regs *r,Object *obj);
#endif
......@@ -39,5 +39,6 @@ extern TaskDescriptor *task_find (int task_handle);
extern void task_remove (int task_handle);
extern void task_add (int task_handle);
extern int task_any_active(void);
void task_remove_filters(TaskDescriptor *t);
#endif
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