Commit a775aaeb authored by Robert Sprowson's avatar Robert Sprowson

Makefile recreated from fragments

Include paths changed to Unix style.
Debug and non debug CMHG definitions replaced by one which is selected by passing predefines to CMHG.
Removed dummy services.h.
Don't bother calling TinyStubs SWI since in ROM it does nothing, and the RAM versions haven't used it since ~1997.
Use module header constants generated from CMHG rather than hand made one.
Reject out of range SWIs (fixes ticket #305).

Version 0.16. Tagged as 'Scale-0_16'
parent f4e3e2cb
......@@ -13,5 +13,5 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean COMPONENT=Scale
stripdepnd Makefile
amu_machine clean
stripdepnd
| Copyright 2000 Pace Micro Technology plc
| Copyright 2015 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine trace COMPONENT=Scale
amu_machine debug THROWBACK=-throwback
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all COMPONENT=Scale
amu_machine standalone
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom COMPONENT=Scale
amu_machine rom
......@@ -12,37 +12,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for a Toolbox Object module
# Makefile for Scale module
#
# $Id$
#
# Component specific options:
#
RAMBOTH = o.msgs
COMMON_OBJ = o.Modhdr_NoD o.auxiliary o.create o.delete o.events o.getstate\
o.hide o.miscop o.show o.task
ROM_OBJS = o.mainROM ${COMMON_OBJ}
RAM_OBJS = o.main ${RAMBOTH} ${COMMON_OBJ}
DBG_OBJS = od.main ${RAMBOTH} o.Modhdr od.auxiliary od.create od.delete od.events\
od.getstate od.hide od.miscop od.show od.task
#
# Get main rules
#
include C:tboxlibint.TboxMake
#
# Module specific rules:
#
resources: resources-both
@echo ${COMPONENT}: resource files copied to Messages module
COMPONENT = Scale
OBJS = auxiliary create delete events getstate\
hide main miscop show task
CMHGDEPENDS = main
ROMCDEFINES = -DROM
CDFLAGS = -Ddebugging=1
CMHGDFLAGS = -Ddebugging=1
CINCLUDES = -IC:tboxlibint,tbox:,C:
LIBS = ${TBOXINTLIB}
DBG_LIBS = ${TBOXINTDBGLIB}
INSTRES_FILES = Res
clean: toolbox-clean
@echo ${COMPONENT}: cleaned
include CModule
#---------------------------------------------------------------------------
# Dynamic dependencies:
/* (0.15)
/* (0.16)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.15
#define Module_MajorVersion_CMHG 0.16
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 May 2000
#define Module_Date_CMHG 18 Aug 2015
#define Module_MajorVersion "0.15"
#define Module_Version 15
#define Module_MajorVersion "0.16"
#define Module_Version 16
#define Module_MinorVersion ""
#define Module_Date "04 May 2000"
#define Module_Date "18 Aug 2015"
#define Module_FullVersion "0.15"
#define Module_ApplicationDate "18-Aug-15"
#define Module_ComponentName "Scale"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/Scale"
#define Module_FullVersion "0.16"
#define Module_HelpVersion "0.16 (18 Aug 2015)"
#define Module_LibraryVersionInfo "0:16"
......@@ -29,18 +29,16 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "string32.h"
#include "messages.h"
#include "twimp.h"
#include "style.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/scale.h"
#include "main.h"
#include "auxiliary.h"
#include "object.h"
#include "task.h"
......
......@@ -29,15 +29,14 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objsupport.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -27,13 +27,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -28,14 +28,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -27,13 +27,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/scale.h"
#include "object.h"
#include "auxiliary.h"
......
......@@ -27,13 +27,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -24,10 +24,10 @@
#include <stdlib.h>
#include "kernel.h"
#include "swis.h"
#include "Global/Services.h"
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "rmensure.h"
#include "mem.h"
......@@ -48,7 +48,7 @@
#include "task.h"
#include "main.h"
#include "ScaleHdr.h"
#define MAX_CLASS_SWI_METHODS 7
static _kernel_oserror *(*class_swi_methods [MAX_CLASS_SWI_METHODS])(_kernel_swi_regs *r, TaskDescriptor *t) =
......@@ -66,10 +66,8 @@ static _kernel_oserror *(*class_swi_methods [MAX_CLASS_SWI_METHODS])(_kernel_swi
/* +++++++++++++++++++++++++++++++++ finalisation code +++++++++++++++++++++++++++++++++ */
#ifdef ROM
static _kernel_oserror *__ROM;
#else
extern int messages_file(void);
#ifndef ROM
extern int Resources(void);
#endif
extern _kernel_oserror *Scale_finalise (int fatal, int podule, void *pw)
......@@ -91,7 +89,7 @@ extern _kernel_oserror *Scale_finalise (int fatal, int podule, void *pw)
/*
* ... and deregister from ResourceFS
*/
objmodule_deregister_resources(messages_file());
objmodule_deregister_resources(Resources());
#endif
/* deregister object module */
......@@ -107,10 +105,6 @@ extern _kernel_oserror *Scale_finalise (int fatal, int podule, void *pw)
IGNORE(podule);
IGNORE(fatal);
#ifdef ROM
if(!__ROM) _swix(0x82c41, 0);
#endif
return NULL;
}
......@@ -118,14 +112,10 @@ extern _kernel_oserror *Scale_finalise (int fatal, int podule, void *pw)
/* ++++++++++++++++++++++++++++++++ initialisation code +++++++++++++++++++++++++++++++ */
extern _kernel_oserror *Scale_init(char *cmd_tail, int podule_base, void *pw)
extern _kernel_oserror *Scale_init(const char *cmd_tail, int podule_base, void *pw)
{
_kernel_oserror *e;
#ifdef ROM
__ROM = _swix(0x82c43, _IN(0), pw);
#endif
DEBUG debug_set_var_name("Scale$Debug");
DEBUG debug_output ("M","Scale: code initialise\n");
......@@ -137,7 +127,7 @@ extern _kernel_oserror *Scale_init(char *cmd_tail, int podule_base, void *pw)
*/
#ifndef ROM
if ((e = objmodule_register_resources(messages_file())) != NULL)
if ((e = objmodule_register_resources(Resources())) != NULL)
return e;
#endif
......@@ -213,7 +203,7 @@ extern _kernel_oserror *Scale_SWI_handler(int swi_no, _kernel_swi_regs *r, void
switch (swi_no)
{
case Scale_ClassSWI - Scale_SWIChunkBase:
case Scale_ClassSWI - Scale_00:
if (r->r[0] < 0 || r->r[0] >= MAX_CLASS_SWI_METHODS)
{
return make_error_hex(Scale_NoSuchMethod,1,r->r[0]);
......@@ -232,15 +222,16 @@ extern _kernel_oserror *Scale_SWI_handler(int swi_no, _kernel_swi_regs *r, void
}
break;
case Scale_PostFilter - Scale_SWIChunkBase:
case Scale_PostFilter - Scale_00:
e = events_postfilter (r);
break;
case Scale_PreFilter - Scale_SWIChunkBase:
case Scale_PreFilter - Scale_00:
e = events_prefilter (r);
break;
default:
e = error_BAD_SWI;
break;
}
......@@ -252,12 +243,12 @@ extern _kernel_oserror *Scale_SWI_handler(int swi_no, _kernel_swi_regs *r, void
/* ++++++++++++++++++++++++++++++++++++++ star commands ++++++++++++++++++++++++++++++++++++*/
extern _kernel_oserror *Scale_commands(char *arg_string, int argc, int cmd_no, void *pw)
extern _kernel_oserror *Scale_commands(const char *arg_string, int argc, int cmd_no, void *pw)
{
switch (cmd_no)
{
case 0:
case CMD_Scale_Memory:
mem_print_list();
break;
......
......@@ -27,14 +27,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/scale.h"
#include "object.h"
#include "task.h"
......
......@@ -28,14 +28,13 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "objects.Scale.h"
#include "objects/toolbox.h"
#include "objects/window.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
......@@ -28,13 +28,12 @@
#include "const.h"
#include "macros.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.scale.h"
#include "objects/toolbox.h"
#include "objects/scale.h"
#include "auxiliary.h"
#include "object.h"
......
; Copyright 1996 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.
;
; Title: cmhg.toolbox
; Purpose: module header for a Scale Object module
; Author: TGR
; History: 16-Feb-94: TGR: version 1.00
; 8-Feb-95: IDJ: version 0.11
;
#include "VersionNum"
initialisation-code: Scale_init
finalisation-code: Scale_finalise
service-call-handler: Scale_services 0x44ec1, 0x44ec2, 0x44ec3
title-string: Scale
help-string: Scale Module_MajorVersion_CMHG Module_MinorVersion_CMHG
swi-chunk-base-number: 0x82c00
swi-handler-code: Scale_SWI_handler
swi-decoding-table: Scale, ClassSWI, PostFilter, PreFilter
date-string: Module_Date_CMHG
; Copyright 1996 Acorn Computers Ltd
; Copyright 2015 Castle Technology Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
......@@ -12,12 +12,6 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Title: cmhg.toolbox
; Purpose: module header for a Scale Object module
; Author: TGR
; History: 16-Feb-94: TGR: version 1.00
; 8-Feb-95: IDJ: version 0.11
;
#include "VersionNum"
initialisation-code: Scale_init
......@@ -30,8 +24,10 @@ title-string: Scale
help-string: Scale Module_MajorVersion_CMHG Module_MinorVersion_CMHG
#ifdef debugging
command-keyword-table: Scale_commands
Scale_Memory()
#endif
swi-chunk-base-number: 0x82c00
......@@ -39,4 +35,4 @@ swi-handler-code: Scale_SWI_handler
swi-decoding-table: Scale, ClassSWI, PostFilter, PreFilter
date-string: Module_Date_CMHG
date-string: Module_Date_CMHG
......@@ -41,7 +41,6 @@
#include "mem.h"
#endif
#include "main.h"
#include "object.h"
#include "task.h"
......
/* Copyright 1996 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.
*/
/* Title: main.h
* Purpose: main module of a Scale Object module
* Author: TGR
* History: 16-Feb-94: TGR: created
*
*/
#ifndef __main_h
#define __main_h
#include "kernel.h"
extern _kernel_oserror *Scale_init(char *cmd_tail, int podule_base, void *pw);
extern _kernel_oserror *Scale_finalise (int fatal, int podule, void *pw);
extern void Scale_services(int service_number, _kernel_swi_regs *r, void *pw);
extern _kernel_oserror *Scale_SWI_handler(int swi_no, _kernel_swi_regs *r, void *pw);
#if debugging
extern _kernel_oserror *Scale_commands(char *arg_string, int argc, int cmd_no, void *pw);
#endif
#endif
......@@ -25,7 +25,7 @@
#ifndef __window_h
#include "<Toolbox$Common>.objects.h.window"
#include "objects.window.h"
#endif
typedef struct _coords {
......
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