Commit 43c539d1 authored by Richard Buckley's avatar Richard Buckley
Browse files

Tided up the make process for the libraries tboxlib and debuglib (debuglib was...

Tided up the make process for the libraries tboxlib and debuglib (debuglib was in with the same set of sources as tboxlib to I build it anyway).

All header files in the objects directory now get exported to
<Lib$Dir>.tboxlibs.h during export_hdrs phase. tboxlib and debuglib get build
with both zM and none zM flags and exported to <Lib$Dir>.tboxlibs.o.

Changed the sources slightly so they don't refer to the internal copy of the
header files found in objects but the copy previously exported to the right
place.
parent 54c0e261
| 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 export_hdrs
| 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 export_libs
......@@ -2,4 +2,3 @@ s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
c/** gitlab-language=c linguist-language=c linguist-detectable=true
h/** gitlab-language=c linguist-language=c linguist-detectable=true
**/h/** gitlab-language=c linguist-language=c linguist-detectable=true
*,fe1 gitlab-language=make linguist-language=make linguist-detectable=true
# Project: debuglib
# 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 = -c++ -o $@
ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
# Final targets:
@.debuglib: @.o.debug @.o.mem @.o.messages @.o.string32 @.o.rmensure @.o.objsupport \
@.o.slist
libfile $(libfileflags) @.o.debug @.o.mem @.o.messages @.o.string32 @.o.slist \
@.o.rmensure @.o.objsupport
# User-editable dependencies:
# Static dependencies:
@.o.debug: @.c.debug
cc $(ccflags) -o @.o.debug @.c.debug
@.o.mem: @.c.mem
cc $(ccflags) -o @.o.mem @.c.mem
@.o.messages: @.c.messages
cc $(ccflags) -o @.o.messages @.c.messages
@.o.string32: @.c.string32
cc $(ccflags) -o @.o.string32 @.c.string32
@.o.rmensure: @.c.rmensure
cc $(ccflags) -o @.o.rmensure @.c.rmensure
@.o.objsupport: @.c.objsupport
cc $(ccflags) -o @.o.objsupport @.c.objsupport
@.o.slist: @.c.slist
cc $(ccflags) -o @.o.slist @.c.slist
# Dynamic dependencies:
# Project: tboxlib
RM = remove
WIPE = -wipe
WFLAGS = ~c~v
# Toolflags:
CCflags = -c -depend !Depend -Itbox:,C: -zM -ffah -zps1 -DROM
C++flags = -c -depend !Depend -IC:
Pascalflags = -c -depend !Depend -IP:
Linkflags = -c++ -o $@
ObjAsmflags = -depend !Depend -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
# Final targets:
tboxlib: o.mem o.messages o.string32 o.rmensure o.objsupport \
o.slist
libfile $(libfileflags) o.mem o.messages o.string32 o.rmensure o.objsupport \
o.slist
rom: tboxlib
@echo all done
install_rom: tboxlib
@echo all done
clean:
${WIPE} o.* ${WFLAGS}
${RM} tboxlib
@echo cleaned
# User-editable dependencies:
# Static dependencies:
o.mem: c.mem
cc $(ccflags) -o o.mem c.mem
o.messages: c.messages
cc $(ccflags) -o o.messages c.messages
o.string32: c.string32
cc $(ccflags) -o o.string32 c.string32
o.rmensure: c.rmensure
cc $(ccflags) -o o.rmensure c.rmensure
o.objsupport: c.objsupport
cc $(ccflags) -o o.objsupport c.objsupport
o.slist: c.slist
cc $(ccflags) -o o.slist c.slist
# Dynamic dependencies:
......@@ -12,56 +12,122 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Project: tboxlib
# Makefile for tboxlib and debuglib
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 09 Oct 1997 RWB Tidied up old Toolbox.Common build
#
#
# Paths
#
LIBDIR = <Lib$Dir>
#
# Generic options:
#
MKDIR = cdir
AS = objasm
CC = cc
CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = -wipe
WFLAGS = ~c~v
CD = dir
LIBFILE = libfile
CFLAGS = -c -depend !Depend -Wap -zps0 ${INCLUDES} -fah -Fn ${DFLAGS}
CFLAGSZM = -c -depend !Depend -Wap -zps0 ${INCLUDES} -fah -Fn ${DFLAGS} -zM
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
LIBFILEFLAGS = -c -o $@
# Toolflags:
CCflags = -c -depend !Depend -Itbox:,C: -zM -ffah -zps1 -DROM
C++flags = -c -depend !Depend -IC:
Pascalflags = -c -depend !Depend -IP:
Linkflags = -c++ -o $@
ObjAsmflags = -depend !Depend -Stamp -quit -CloseExec
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
CCZM= ${CC} ${CFLAGSZM}
#
# Libraries
#
CLIB = CLIB:o.stubs
RLIB = RISCOSLIB:o.risc_oslib
RSTUBS = RISCOSLIB:o.rstubs
ROMSTUBS = RISCOSLIB:o.romstubs
ROMCSTUBS = RISCOSLIB:o.romcstubs
ABSSYM = RISC_OSLib:o.AbsSym
#
# Include files
#
INCLUDES = -IC:,TBox:
DFLAGS =
# Final targets:
tboxlib: o.mem o.messages o.string32 o.rmensure o.objsupport \
o.slist
libfile $(libfileflags) o.mem o.messages o.string32 o.rmensure o.objsupport \
o.slist
# Program specific options:
#
TBOXLIB = tboxlib
TBOXLIBZM = tboxlibzm
DEBUGLIB = debuglib
DEBUGLIBZM = debuglibzm
EXPORTS = ${LIBDIR}.tboxlibs
rom: tboxlib
@echo all done
OBJ = o.mem o.messages o.string32 o.rmensure o.objsupport
OBJZM = z.mem z.messages z.string32 z.rmensure z.objsupport
install_rom: tboxlib
@echo all done
DBG_OBJ = o.debug o.slist
DBG_OBJZM = z.debug z.slist
#
# Rule patterns
#
.SUFFIXES: .z .o .c .s
.c.o:; ${CC} ${CFLAGS} -o $@ $<
.c.z:; ${CCZM} -c -o $@ $<
#
# Build
#
${TBOXLIB}: ${OBJ}
${LIBFILE} ${LIBFILEFLAGS} ${OBJ}
${TBOXLIBZM}: ${OBJZM}
${LIBFILE} ${LIBFILEFLAGS} ${OBJZM}
${DEBUGLIB}: ${OBJ} ${DBG_OBJ}
${LIBFILE} ${LIBFILEFLAGS} ${OBJ} ${DBG_OBJ}
${DEBUGLIBZM}: ${OBJZM} ${DBG_OBJAM}
${LIBFILE} ${LIBFILEFLAGS} ${OBJZM} ${DBG_OBJAM}
clean:
${WIPE} o.* ${WFLAGS}
${RM} tboxlib
@echo cleaned
# User-editable dependencies:
# Static dependencies:
o.mem: c.mem
cc $(ccflags) -o o.mem c.mem
o.messages: c.messages
cc $(ccflags) -o o.messages c.messages
o.string32: c.string32
cc $(ccflags) -o o.string32 c.string32
o.rmensure: c.rmensure
cc $(ccflags) -o o.rmensure c.rmensure
o.objsupport: c.objsupport
cc $(ccflags) -o o.objsupport c.objsupport
o.slist: c.slist
cc $(ccflags) -o o.slist c.slist
${WIPE} z.* ${WFLAGS}
${WIPE} ${DEBUGLIB} ${WFLAGS}
${WIPE} ${DEBUGLIBZM} ${WFLAGS}
${WIPE} ${TBOXLIB} ${WFLAGS}
${WIPE} ${TBOXLIBZM} ${WFLAGS}
@echo ${DEBUGLIB} and ${TBOXLIB}: cleaned
export: export_${PHASE}
export_hdrs: dirs
${CP} objects.* ${EXPORTS}.* ${CPFLAGS}
@echo ${DEBUGLIB} and ${TBOXLIB}: export complete (hdrs)
export_libs: ${TBOXLIB} ${TBOXLIBZM} ${DEBUGLIB} ${DEBUGLIBZM} dirs
${CP} ${TBOXLIB} ${EXPORTS}.o.${TBOXLIB} ${CPFLAGS}
${CP} ${TBOXLIBZM} ${EXPORTS}.o.${TBOXLIBZM} ${CPFLAGS}
${CP} ${DEBUGLIB} ${EXPORTS}.o.${DEBUGLIB} ${CPFLAGS}
${CP} ${DEBUGLIBZM} ${EXPORTS}.o.${DEBUGLIBZM} ${CPFLAGS}
@echo ${DEBUGLIB} and ${TBOXLIB}: export complete (libs)
dirs:
${MKDIR} ${LIBDIR}
${MKDIR} ${EXPORTS}
${MKDIR} ${EXPORTS}.h
${MKDIR} ${EXPORTS}.o
#
# Dynamic dependencies:
......@@ -28,9 +28,15 @@
#include <stdio.h>
#include <ctype.h>
#ifndef HostFS_HostVDU
#define HostFS_HostVDU 0x40100
#endif
#ifndef HostFS_TubeVDU
#define HostFS_TubeVDU 0x40101
#endif
#ifndef HostFS_WriteC
#define HostFS_WriteC 0x40102
#endif
static char output_buffer[256];
static char var_val[256] = "";
......
......@@ -27,7 +27,7 @@
#include "const.h"
#include "macros.h"
#include "objects.toolbox.h"
#include "toolbox.h"
#include "services.h"
#include "debug.h"
#include "mem.h"
......
......@@ -26,8 +26,8 @@
#include "swis.h"
#include "debug.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "toolbox.h"
#include "window.h"
#include "mem.h"
#include "objsupport.h"
......
......@@ -21,7 +21,7 @@
#include "kernel.h"
#ifndef __toolbox_h
#include "objects.toolbox.h"
#include "toolbox.h"
#endif
......
......@@ -19,8 +19,8 @@
*/
#include "stddef.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "toolbox.h"
#include "window.h"
/* copies named template to a buffer, returns NULL if can't find or no memory */
......
......@@ -23,7 +23,7 @@
# define __wimp_h
#ifndef __toolbox_h
#include "objects.toolbox.h"
#include "toolbox.h"
#endif
#include "kernel.h"
......
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