Commit fd86b888 authored by ROOL's avatar ROOL :robot:
Browse files

Makefile recreated from fragments

Detail:
  Also remove ancient CMHG 5.16 and lingering TinyStubs support.
  Enable CI job.
Admin:
  Submission for TCP/IP bounty.

Version 0.50. Tagged as 'File-0_50'
No related merge requests found
Pipeline #9133 passed with stages
in 21 seconds
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd Makefile
stripdepnd
| Copyright 2007 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.
| 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 install INSTDIR=<Install$Dir>
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all
amu_machine standalone
/aif/
/aof/
/gpa/
/h/FileHdr
/i/
/linked/
/o/
/objs/
/od/
/rm/
include:
- project: 'Support/CI'
file: '/File.yml'
......@@ -14,150 +14,19 @@
#
# Makefile for File
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 10-Feb-98 SNB Created
#
#
# Component specific options:
#
COMPONENT = File
ROM_MODULE = aof.${COMPONENT}
RAM_MODULE = rm.${COMPONENT}
INSTDIR ?= <Install$Dir>
TARGET ?= ${COMPONENT}
RESFSDIR = Resources.URL.${COMPONENT}
#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources2.URL
#
# Generic options:
#
MKDIR = do mkdir -p
CC = cc
CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = -wipe
XWIPE = x wipe
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -ffah -zps1 ${DFLAGS}
DFLAGS = -D${SYSTEM} -DCOMPAT_INET4 -UTML -UTRACE
ROMFLAGS = -DROM
INCLUDES = -IC:
#
# Libraries
#
ANSILIB = CLib:o.ansilib
CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib
ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISC_OSLib:o.abssym
OBJS =\
o.module\
o.processdir\
o.readdata\
o.ses_ctrl\
o.start\
o.status\
o.stop\
o.utils\
o.FileHdr
RAM_OBJS =\
o.moduleRAM\
o.processdir\
o.readdata\
o.ses_ctrl\
o.start\
o.status\
o.stop\
o.utils\
o.FileHdr
MSGSF=o.msgs
#
# Rule patterns
#
.c.o:; ${CC} ${CFLAGS} ${ROMFLAGS} -o $@ $<
.cmhg.o:; ${CMHG} -p -o $@ $< -d $*.h
FileHdr.h: FileHdr.o
@|
#
# Main rules:
#
#
all: ${RAM_MODULE}
@echo ${COMPONENT}: Module built (RAM)
rom: ${ROM_MODULE}
@echo ${COMPONENT}: Module built (ROM)
install: ${RAM_MODULE}
${MKDIR} ${INSTDIR}
${CP} ${RAM_MODULE} ${INSTDIR}.${TARGET} ${CPFLAGS}
@echo ${COMPONENT}: Module install (disc)
install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
resources: Resources.${LOCALE}.Messages
${MKDIR} ${RESDIR}
${MKDIR} ${RESDIR}.${COMPONENT}
${CP} Resources.${LOCALE}.* ${RESDIR}.${COMPONENT}.* ${CPFLAGS}
@echo ${COMPONENT}: resource files copied to Messages module
clean:
${XWIPE} o.* ${WFLAGS}
${XWIPE} aof ${WFLAGS}
${XWIPE} rm ${WFLAGS}
${XWIPE} h.${COMPONENT}Hdr ${WFLAGS}
${XWIPE} linked ${WFLAGS}
${XWIPE} map ${WFLAGS}
@echo ${COMPONENT}: cleaned
${ROM_MODULE}: ${OBJS} ${ROMCSTUBS}
${MKDIR} aof
${LD} -o $@ -aof ${OBJS} ${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
${MSGSF}: @.Resources.${LOCALE}.Messages
resgen messages_file ${MSGSF} Resources.${LOCALE}.Messages ${RESFSDIR}.Messages
${RAM_MODULE}: ${RAM_OBJS} ${MSGSF} ${CLIB}
${mkdir} rm
${LD} -o $@ -module ${RAM_OBJS} ${MSGSF} ${CLIB}
Access $@ RW/R
o.moduleRAM: module.c
$(CC) ${CFLAGS} -o $@ module.c
COMPONENT = File
RESFSDIR = ${RESDIR}${SEP}URL${SEP}${TARGET}
OBJS = module processdir readdata ses_ctrl start\
status stop utils
CMHGDEPENDS = module readdata
CDEFINES = -D${SYSTEM} -UTML -UTRACE
CINCLUDES = ${TCPIPINC}
ROMCDEFINES = -DROM
CFLAGS = ${C_NOWARN_NON_ANSI_INCLUDES}
CDFLAGS += -DTRACE
HDRS =
include CModule
#---------------------------------------------------------------------------
# Dynamic dependencies:
/* (0.49)
/* (0.50)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.49
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Sep 2018
#define Module_MajorVersion_CMHG 0.50
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 Feb 2023
#define Module_MajorVersion "0.49"
#define Module_Version 49
#define Module_MajorVersion "0.50"
#define Module_Version 50
#define Module_MinorVersion ""
#define Module_Date "25 Sep 2018"
#define Module_Date "18 Feb 2023"
#define Module_ApplicationDate "25-Sep-18"
#define Module_ApplicationDate "18-Feb-23"
#define Module_ComponentName "File"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Fetchers/File"
#define Module_FullVersion "0.49"
#define Module_HelpVersion "0.49 (25 Sep 2018)"
#define Module_LibraryVersionInfo "0:49"
#define Module_FullVersion "0.50"
#define Module_HelpVersion "0.50 (18 Feb 2023)"
#define Module_LibraryVersionInfo "0:50"
......@@ -28,34 +28,13 @@
#include "FileHdr.h"
#include "utils.h"
/* TinySupport SWIs. This does not work if any library static data
* is used within the module. This means errno (__errno) and __ctype
* (as used by any macro call to is.... functions) If you re-enable
* this SWI call, this module will fail to work at all.
*/
#define NO_TINYSTUBS
#ifdef ROM
#ifndef NO_TINYSTUBS
static _kernel_oserror *__ROM;
#define TinySupport_Share (0x82c43)
#define TinySupport_Die (0x82c41)
#endif
#endif
#if CMHG_VERSION < 516
#define CMHG_CONST
#else
#define CMHG_CONST const
#endif
#define NO_SUCH_SWI (0x1E6)
#define URL_PROTOCOL_REGISTER 0x83e20
#define URL_PROTOCOL_DEREGISTER 0x83e21
#ifndef ROM
extern int messages_file(void);
extern int Resources(void); /* From resgen */
#endif
static int registered;
......@@ -101,7 +80,7 @@ static _kernel_oserror *register_with_url(void)
/*************************************************************/
/* Start up and register ourselves with the URL module */
/*************************************************************/
_kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *pw)
_kernel_oserror *module_init(const char *cmd_tail, int podule_base, void *pw)
{
_kernel_oserror *e;
......@@ -109,16 +88,10 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
(void) podule_base;
(void) pw;
#ifdef ROM
#ifndef NO_TINYSTUBS
__ROM = _swix(TinySupport_Share, _IN(0), pw);
#endif
#endif
registered = 0;
#ifndef ROM
e = _swix(ResourceFS_RegisterFiles, _IN(0), messages_file());
e = _swix(ResourceFS_RegisterFiles, _IN(0), Resources());
if (e) {
return e;
}
......@@ -133,7 +106,7 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
if (e) {
#ifndef ROM
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), messages_file());
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
return e;
}
......@@ -142,7 +115,7 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
if (e) {
(void) messages_file_close();
#ifndef ROM
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), messages_file());
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
return e;
}
......@@ -163,16 +136,10 @@ _kernel_oserror *module_kill(int fatal, int podule, void *pw)
(void) messages_file_close();
#ifndef ROM
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), messages_file());
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
(void) try_to_deregister();
#ifdef ROM
#ifndef NO_TINYSTUBS
if(!__ROM) _swix(TinySupport_Die, 0);
#endif
#endif
return NULL;
}
......
*
!.gitignore
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