Commit 21c94170 authored by ROOL's avatar ROOL 🤖
Browse files

Makefile recreated from fragments

Detail:
  Now exports its SWIs to Interface/HTTP.h
  Replaced defunct www.acorn.com address in the test program.
Admin:
  Submission for TCP/IP bounty.

Version 0.94. Tagged as 'HTTP-0_94'
parent 08c95fc9
| Copyright 1998 Acorn Computers Ltd
| Copyright 2018 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 ramtrace
amu_machine debug
| 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
hdr/** 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
......
# Project: httptest
# Toolflags:
CCflags = -c -depend !Depend -IC:,C:zlib -throwback
C++flags = -c -depend !Depend -IC: -throwback
Linkflags = -aif -c++ -o $@
ObjAsmflags = -throwback -NoCache -depend !Depend
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
# Final targets:
@.test: @.o.test c:stubs.o
link $(linkflags) @.o.test c:stubs.o
# User-editable dependencies:
@.dates: @.c.dates
cc $(ccflags) -DTEST -o @.o.testdates
link $(linkflags) @.o.testdates c:stubs.o
# Static dependencies:
@.o.test: @.c.test
cc $(ccflags) -o @.o.test @.c.test
# Copyright 1998 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.
#
# Makefile for httptest
#
COMPONENT = httptest
OBJS = test
include CApp
# Dynamic dependencies:
......@@ -14,246 +14,24 @@
#
# Makefile for AcornHTTP
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 10-Feb-98 SNB Created
#
#
# Component specific options:
#
COMPONENT = HTTP
ROM_MODULE = aof.${COMPONENT}
RAM_MODULE = rm.${COMPONENT}
DBG_MODULE = rm.${COMPONENT}-tr
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 = x wipe
XWIPE = x wipe
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
MCFLAGS = -C -E
CFLAGS = -c -depend !Depend ${INCLUDES} -zM -Wp -ffah -zps1 ${DFLAGS}
DFLAGS = -D${SYSTEM} -DCOMPAT_INET4 -DCOOKIE -DCOMPRESSION -UTML ${OPTIONS}
ROMFLAGS = -DROM
INCLUDES = -ITCPIPLibs:,C:,C:zlib
DEBFLAGS = -DTRACE -DUSE_SYSLOG
#
# Libraries
#
ANSILIB = CLib:o.ansilib
CLIB = CLIB:o.stubs
ZLIB = C:zlib.o.zlibzm
#DEBLIBS = <syslog$dir>.c-veneer.o.syslog
RLIB = RISCOSLIB:o.risc_oslib
ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISCOSLIB:o.abssym
TCPIPLIBS = TCPIPLibs:o.inetlibzm TCPIPLIBS:o.socklibzm
OBJS =\
o.config\
o.connect\
o.connpool\
o.cookie\
o.dates\
o.decompress\
o.dns\
o.generic\
o.header\
o.hosttrack\
o.module\
o.protocol\
o.readdata\
o.security\
o.ses_ctrl\
o.start\
o.status\
o.stop\
o.URLclient\
o.utils\
o.writedata\
o.HTTPHdr
RAM_OBJS =\
o.config\
o.connect\
o.connpool\
o.cookie\
o.dates\
o.decompress\
o.dns\
o.generic\
o.header\
o.hosttrack\
o.moduleRAM\
o.protocol\
o.readdata\
o.security\
o.ses_ctrl\
o.start\
o.status\
o.stop\
o.URLclient\
o.utils\
o.writedata\
o.HTTPHdr
MCCABE_OBJS =\
i.config\
i.connect\
i.connpool\
i.cookie\
i.dates\
i.decompress\
i.dns\
i.generic\
i.header\
i.hosttrack\
i.module\
i.protocol\
i.readdata\
i.security\
i.ses_ctrl\
i.start\
i.status\
i.stop\
i.URLclient\
i.utils\
i.writedata
DBG_OBJS =\
od.config\
od.connect\
od.connpool\
od.cookie\
od.dates\
od.decompress\
od.dns\
od.generic\
od.header\
od.hosttrack\
od.moduleRAM\
od.protocol\
od.readdata\
od.security\
od.ses_ctrl\
od.start\
od.status\
od.stop\
od.URLclient\
od.utils\
od.writedata\
o.HTTPHdr
MSGSF=o.msgs
#
# Rule patterns
#
.SUFFIXES: .o .od .i .c
.c.o:; ${CC} ${CFLAGS} ${ROMFLAGS} -o $@ $<
.c.od:; ${CC} ${CFLAGS} ${ROMFLAGS} ${DEBFLAGS} -o $@ $<
.c.i:; ${CC} ${MCFLAGS} ${CFLAGS} ${ROMFLAGS} >$@ $<
.cmhg.o:; ${CMHG} -o $@ $< -p -d $*.h
HTTPHdr.h: HTTPHdr.o
@|
#
# Main rules:
#
#
all: ${RAM_MODULE}
@echo ${COMPONENT}: Module built (RAM)
ramtrace: ${DBG_MODULE}
@echo ${COMPONENT}: Module built (TRACE)
rom: ${ROM_MODULE}
@echo ${COMPONENT}: Module built (ROM)
install: ${RAM_MODULE}
${MKDIR} ${INSTDIR}
${CP} ${RAM_MODULE} ${INSTDIR}.${TARGET} ${CPFLAGS}
@echo ${COMPONENT}: Module install (disc)
mccabe: ${MCCABE_OBJS}
@echo ${COMPONENT}: McCabe sources build (Disc)
install_rom: ${ROM_MODULE}
${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: Module installed (ROM)
resources: LocalRes:Messages
${MKDIR} ${RESDIR}
${MKDIR} ${RESDIR}.${COMPONENT}
${CP} LocalRes:* ${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} ${ZLIB}
${MKDIR} aof
${LD} -o $@ -aof ${OBJS} ${TCPIPLIBS} ${ZLIB} ${ROMCSTUBS}
# final link for ROM Image (using given base address)
rom_link:
${MKDIR} linked
${LD} -o linked.${COMPONENT} -rmf -base ${ADDRESS} ${ROM_MODULE} ${ABSSYM}
${CP} linked.${COMPONENT} ${LINKDIR}.AcornHTTP ${CPFLAGS}
@echo ${COMPONENT}: rom_link complete
${MSGSF}: LocalRes:Messages
resgen messages_file ${MSGSF} LocalRes:Messages ${RESFSDIR}.Messages
${RAM_MODULE}: ${RAM_OBJS} ${MSGSF} ${TCPIPLIBS} ${ZLIB} ${CLIB}
${mkdir} rm
${LD} -o $@ -module ${RAM_OBJS} ${MSGSF} ${TCPIPLIBS} ${ZLIB} ${CLIB}
Access $@ RW/R
${DBG_MODULE}: ${DBG_OBJS} ${MSGSF} ${TCPIPLIBS} ${ZLIB} ${CLIB} ${DEBLIBS}
${mkdir} rm
${LD} -o $@ -module ${DBG_OBJS} ${MSGSF} ${TCPIPLIBS} ${ZLIB} ${CLIB} ${DEBLIBS}
Access $@ RW/R
o.moduleRAM: module.c
$(CC) ${CFLAGS} -o $@ module.c
od.moduleRAM: module.c
$(CC) ${CFLAGS} ${DEBFLAGS} -o $@ module.c
COMPONENT = HTTP
RESFSDIR = ${RESDIR}${SEP}URL${SEP}${TARGET}
OBJS = config connect connpool cookie dates decompress dns\
generic header hosttrack module protocol readdata security\
ses_ctrl start status stop URLclient utils writedata
CMHGDEPENDS = cookie header module start
CDEFINES = -D${SYSTEM} -DCOMPAT_INET4 -DCOOKIE -DCOMPRESSION -UTML ${OPTIONS}
CINCLUDES = -ITCPIPLibs:,C:,C:zlib
ROMCDEFINES = -DROM
CFLAGS = -Wp
CDFLAGS = -DTRACE -DUSE_SYSLOG
HDRS =
ASMCHDRS = HTTP
ASMHDRS = HTTP
CMHGAUTOHDR = HTTP
LIBS += ${NET4LIBS} ${ZLIB}
include CModule
#---------------------------------------------------------------------------
# Dynamic dependencies:
/* (0.93)
/* (0.94)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.93
#define Module_MajorVersion_CMHG 0.94
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2012
#define Module_Date_CMHG 12 May 2018
#define Module_MajorVersion "0.93"
#define Module_Version 93
#define Module_MajorVersion "0.94"
#define Module_Version 94
#define Module_MinorVersion ""
#define Module_Date "14 Jan 2012"
#define Module_Date "12 May 2018"
#define Module_ApplicationDate "14-Jan-12"
#define Module_ApplicationDate "12-May-18"
#define Module_ComponentName "HTTP"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Fetchers/HTTP"
#define Module_FullVersion "0.93"
#define Module_HelpVersion "0.93 (14 Jan 2012)"
#define Module_LibraryVersionInfo "0:93"
#define Module_FullVersion "0.94"
#define Module_HelpVersion "0.94 (12 May 2018)"
#define Module_LibraryVersionInfo "0:94"
......@@ -69,7 +69,7 @@ static _kernel_oserror *__ROM;
#ifndef ROM
extern int messages_file(void);
extern int Resources(void); /* From resgen */
#endif
#ifndef ROM
......@@ -219,9 +219,9 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
e = register_with_url();
if (e == NULL) {
#ifndef ROM
e = _swix(ResourceFS_RegisterFiles, _IN(0), messages_file());
#endif
#ifndef ROM
e = _swix(ResourceFS_RegisterFiles, _IN(0), Resources());
#endif
if (e == NULL) {
if (getenv(Module_Title "$Path")) {
e = messages_file_open(Module_Title ":Messages");
......@@ -234,9 +234,9 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
e = _swix(OS_CallEvery, _INR(0,2), 5*100, callevery_entry, pw); /* 5 secs */
if (e != NULL) messages_file_close();
}
#ifndef ROM
if (e != NULL) (void) _swix(ResourceFS_DeregisterFiles, _IN(0), messages_file());
#endif
#ifndef ROM
if (e != NULL) (void) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
}
if (e != NULL) (void) try_to_deregister();
}
......@@ -321,9 +321,9 @@ _kernel_oserror *module_kill(int fatal, int podule, void *pw)
http_free_agent();
messages_file_close();
#ifndef ROM
(void) _swix(ResourceFS_DeregisterFiles, _IN(0), messages_file());
#endif
#ifndef ROM
_swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
(void) try_to_deregister();
......
......@@ -53,7 +53,7 @@ static _kernel_oserror *fail(_kernel_oserror *e)
int main(int argc, char *argv[])
{
const char *url_to_get=argc>1?argv[1]:"http://www.acorn.com/browser/";
const char *url_to_get=argc>1?argv[1]:"http://www.castle-technology.co.uk/";
FILE *out=argc>2?fopen(argv[2],"wb"):stdout;
if (!out) {
......
;
; Copyright (c) 2018, RISC OS Open Ltd
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither the name of RISC OS Open Ltd nor the names of its contributors
; may be used to endorse or promote products derived from this software
; without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
; POSSIBILITY OF SUCH DAMAGE.
;
SUBT Exported AcornHTTP constants
OldOpt SETA {OPT}
OPT OptNoList+OptNoP1List
SWIClass SETS AcornHTTPSWI_Name
^ AcornHTTPSWI_Base
AddSWI GetData
AddSWI Status
AddSWI ReadData
AddSWI Stop
^ AcornHTTPSWI_Base + &10
AddSWI SecureGetData
AddSWI SecureStatus
AddSWI SecureReadData
AddSWI SecureStop
^ AcornHTTPSWI_Base + &3D
AddSWI AddCookie
AddSWI ConsumeCookie
AddSWI EnumerateCookies
OPT OldOpt
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