From: <jt...@us...> - 2007-04-22 22:17:35
|
Revision: 250 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=250&view=rev Author: jtytgat Date: 2007-04-22 15:17:32 -0700 (Sun, 22 Apr 2007) Log Message: ----------- First step in unified build Added Paths: ----------- branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile branches/simplified-build/!OsLib/Source/Core/oslib/Makefile branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.help branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile branches/simplified-build/!OsLib/Source/Makefile branches/simplified-build/!OsLib/Source/Makefile.inc branches/simplified-build/!OsLib/Source/Toolbox/oslib/Makefile branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.h branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.h branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.h branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.h branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.h branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help branches/simplified-build/!OsLib/Source/Types/oslib/Makefile branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.h branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.help branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.h branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.help branches/simplified-build/!OsLib/Source/Types/oslib/Types.h branches/simplified-build/!OsLib/Source/Types/oslib/Types.help branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.h branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.help branches/simplified-build/!OsLib/Source/User/oslib/Makefile Removed Paths: ------------- branches/simplified-build/!OsLib/Source/AMUmakefile branches/simplified-build/!OsLib/Source/AMUmakefile.inc branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 branches/simplified-build/!OsLib/Source/GNUmakefile branches/simplified-build/!OsLib/Source/GNUmakefile.settings branches/simplified-build/!OsLib/Source/GNUmakefile.source branches/simplified-build/!OsLib/Source/Macros/oslib/AHelp branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Macros/oslib/CHelp branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h branches/simplified-build/!OsLib/Source/SetVars,feb branches/simplified-build/!OsLib/Source/Toolbox/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Toolbox/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/GNUmakefile branches/simplified-build/!OsLib/Source/Types/oslib/Makefile,fe1 branches/simplified-build/!OsLib/Source/Types/oslib/coltrans32.h branches/simplified-build/!OsLib/Source/Types/oslib/devicefs32.h branches/simplified-build/!OsLib/Source/Types/oslib/dosfs32.h branches/simplified-build/!OsLib/Source/Types/oslib/filecore32.h branches/simplified-build/!OsLib/Source/Types/oslib/fileswch32.h branches/simplified-build/!OsLib/Source/Types/oslib/osargs32.h branches/simplified-build/!OsLib/Source/Types/oslib/oscore32.h branches/simplified-build/!OsLib/Source/Types/oslib/osf32.h branches/simplified-build/!OsLib/Source/Types/oslib/osfind32.h branches/simplified-build/!OsLib/Source/Types/oslib/osfsctrl32.h branches/simplified-build/!OsLib/Source/Types/oslib/osgbpb32.h branches/simplified-build/!OsLib/Source/Types/oslib/pdriver32.h branches/simplified-build/!OsLib/Source/Types/oslib/types.h branches/simplified-build/!OsLib/Source/Types/oslib/wimp32.h branches/simplified-build/!OsLib/Source/User/oslib/AMUmakefile branches/simplified-build/!OsLib/Source/User/oslib/GNUmakefile Deleted: branches/simplified-build/!OsLib/Source/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,169 +0,0 @@ -# Index: OSLib/!OsLib/Source/AMUmakefile.inc 20040304 -#=================================================================== -# -# AMUmakefile for SOURCES under RISC OS -# - -#------------------------------------------------------------------------ -# paths & directories -DIR = ${MAKEFILEDIR} -BINDIR = <OSLib$BinDir> - -#tools -MAKE = amu -desktop -LIBFILE = LibFile -INDEXHELP = IndexHelp -BINDHELP = BindHelp -RM = rm -nq -MD = cdir - -CP = copy -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -#------------------------------------------------------------------------ -#target-specific macros - -SOURCES = Computer Core Toolbox User - -OSLIB = OSLib.o -OSLIB32 = OSLib32.o -CSTRONG = help.OSLib -LIST = list.OSLib -LIST32 = list.OSLib32 - -#------------------------------------------------------------------------ -#targets - -.PHONY: all cstrong Computer computer Core core Toolbox toolbox User user \ - Test test oslib libs clean - -all: oslib - -oslib: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile oslib - ${MAKE} -f ${DIR}.AMUmakefile ${LIST} - ${MAKE} -f ${DIR}.AMUmakefile ${LIST32} - -computer: Computer -Computer: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -core: Core -Core: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -toolbox: Toolbox -Toolbox: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -user: User -User: ;${MAKE} -f ${DIR}.$@.oslib.AMUmakefile all - -#test: Test -Test: ;${MAKE} -f ${DIR}.$@.AMUmakefile all APCS=${APCS} - -cstrong : ${CSTRONG} -${CSTRONG}: - @-${RM} $@ - @${MD} Helpdata - @${MD} help - @${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cstrong - @${MAKE} -f ${DIR}.User.oslib.AMUmakefile cstrong - ${INDEXHELP} ${DIR}.HelpData.action_ -p Action - ${INDEXHELP} ${DIR}.HelpData.class_ -p Class - ${INDEXHELP} ${DIR}.HelpData.error_ -p Error - ${INDEXHELP} ${DIR}.HelpData.message_ -p Message - ${INDEXHELP} ${DIR}.HelpData.service_ -p Service - ${BINDHELP} ${DIR}.HelpData ${DIR}.$@ - -list: ${LIST} -${LIST}: ${OSLIB} - ${MD} list - ${LIBFILE} -s o.OSLib { > $@ } - @SetType $@ text - -list32: ${LIST32} -${LIST32}: ${OSLIB32} - ${MD} list - ${LIBFILE} -s o.OSLib32 { > $@ } - @SetType $@ text - -clean: cleanlib cleanhelp cleanfiles - ${MAKE} -f ${DIR}.Test.AMUmakefile clean - -distclean: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile distclean - ${MAKE} -f ${DIR}.Test.AMUmakefile distclean - ${RM} -r $(addprefix ${DIR}., o list help ) - ${RM} -r $(addprefix ${DIR}., Helpdata ) - -cleanlib: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanlib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanlib - ${RM} $(addprefix ${DIR}., o.OSLib o.OSLib32 ) - ${RM} $(addprefix ${DIR}., ${LIST} ${LIST32} ) - -cleanfiles: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanfiles - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanfiles - -cleanhelp: - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile cleanhelp - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile cleanhelp - ${RM} -r ${DIR}.Helpdata - ${RM} ${DIR}.${CSTRONG} - -release_widelib: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.OSLib - ${CP} SetVarsRO4 ${RELEASEDIR}.SetVars ${COPYFLAGS} - ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} - ${MAKE} -f ${DIR}.computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.oslib - -release_deeplib: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.OSLib - ${CP} SetVars ${RELEASEDIR}.OSLib.SetVars ${COPYFLAGS} - ${CP} o ${RELEASEDIR}.OSLib.o ${COPYFLAGS} - ${MD} ${RELEASEDIR}.OSLib.Computer - ${MAKE} -f ${DIR}.Computer.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Computer.oslib - ${MD} ${RELEASEDIR}.OSLib.Core - ${MAKE} -f ${DIR}.Core.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Core.oslib - ${MD} ${RELEASEDIR}.OSLib.Macros - ${MAKE} -f ${DIR}.Macros.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Macros.oslib - ${MD} ${RELEASEDIR}.OSLib.Toolbox - ${MAKE} -f ${DIR}.Toolbox.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Toolbox.oslib - ${MD} ${RELEASEDIR}.OSLib.Types - ${MAKE} -f ${DIR}.Types.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.Types.oslib - ${MD} ${RELEASEDIR}.OSLib.User - ${MAKE} -f ${DIR}.User.oslib.AMUmakefile release RELEASEDIR=${RELEASEDIR}.OSLib.User.oslib - -release_help: -ifndef RELEASEDIR - @error Release Dir undefined -endif - ${MD} ${RELEASEDIR}.help - ${CP} ${CSTRONG} ${RELEASEDIR}.help.* ${COPYFLAGS} - -#------------------------------------------------------------------------ -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/AMUmakefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/AMUmakefile.inc 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/AMUmakefile.inc 2007-04-22 22:17:32 UTC (rev 250) @@ -1,166 +0,0 @@ -# !OSLib.Source.Makefile/inc -# Include file for making lower-level OSLib projects - -# tools -DEFMOD = do DefMod -REDUCEAOF = ReduceAOF -RM = rm -nq -MD = cdir -AS = do objasm -throwback -TOLOWER = ToLower -MAKE = amu -desktop -LIBFILE = libfile -ECHO = @echo $@ -CP = copy - -# flags -COPYFLAGS = A~C~DFLN~P~Q~R~S~T~V - -# name rules -HDRS = $(addprefix Hdr., ${SWIMODULES} ${MODULES}) -OBJASM = $(addprefix s., ${SWIMODULES}) -OBJASM32 = $(addprefix s32., ${SWIMODULES}) -LIBS = $(addprefix o., ${SWIMODULES}) -LIBS32 = $(addprefix o32., ${SWIMODULES}) -CHEADERS = $(addprefix h., ${SWIMODULES} ${MODULES}) -CSTRONG = $(addprefix help., ${SWIMODULES} ${MODULES}) -OBJS = $(addprefix o., ${CMODULES}) -OBJS32 = $(addprefix o32., ${CMODULES}) - -#------------------------------------------------------------------------ -# file locations -SOURCEDIR = <OSLib$SourceDir> -BYTEWIDE = ${SOURCEDIR}.ByteWide -HELPDATA = ${SOURCEDIR}.HelpData -OSLIB = ${SOURCEDIR}.o.OSLib -OSLIB32 = ${SOURCEDIR}.o.OSLib32 - -.PHONY: all oslib cstrong hdrs cheaders objasm objasm32 clean distclean cleanlib -.PHONY: cleanfiles cleanhelp release_deeplib release_widelib release_help - -# final targets -all: oslib -oslib: libs libs32 objasm objasm32 hdrs cheaders - ${ECHO} - -cstrong: ${CSTRONG} - ${ECHO} - -hdrs: ${HDRS} - ${ECHO} - -cheaders: ${CHEADERS} - ${ECHO} - -objasm: ${OBJASM} - ${ECHO} - -objasm32: ${OBJASM32} - ${ECHO} - -clean: cleanfiles cleanlib cleanhelp - ${ECHO} - -distclean: clean - ${RM} $(addprefix s_0., ${SWIMODULES} ) - ${RM} $(addprefix s32_0., ${SWIMODULES} ) - ${RM} $(addprefix ${MAKEFILEDIR}., h Hdr l o o32 s s32 s_0 s32_0 help ) - @echo - -cleanlib: - ${RM} ${LIBS} - ${RM} ${LIBS32} - -cleanfiles: - ${RM} ${HDRS} - ${RM} ${CHEADERS} - ${RM} ${OBJASM} - ${RM} ${OBJASM32} - ${RM} ${OBJS} ${OBJS32} - -cleanhelp: - ${RM} ${CSTRONG} - ${RM} -r HelpData - - -release: -ifndef RELEASEDIR - error Release Dir undefined -endif - -${CP} s s_0 ${COPYFLAGS} - -${CP} s32 s32_0 ${COPYFLAGS} - ${MD} ${RELEASEDIR} - ${CP} Hdr ${RELEASEDIR}.Hdr ${COPYFLAGS} - ${CP} h ${RELEASEDIR}.h ${COPYFLAGS} - -#------------------------------------------------------------------------ - - -.SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm - -.asm.o: ;@${MD} o - @Set OSLib$Output $@ - ${AS} -I<OSLib$Path> -from $< -to <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.asm.o32: ;@${MD} o - @Set OSLib$Output $@ - ${AS} -I<OSLib$Path> -Throwback -apcs 3/32bit -from $< -to <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.s: ;@${MD} s - @Set OSLib$Output $@ - ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.s32: ;@${MD} s32 - @Set OSLib$Output $@ - ${DEFMOD} -q -s -byte_wide ${BYTEWIDE} -32bit < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.h: ;@${MD} h - @Set OSLib$Output $@ - @${TOLOWER} OSLib$Output - ${DEFMOD} -q -h < $< > <OSLib$Output> - @IfThere $@ then stamp $@ else create $@ - -.swi.Hdr: ;@${MD} Hdr - ${DEFMOD} -q -hdr < $< > $@ - -.swi.h++: ;${DEFMOD} -q -h++ < $< > $@ - -.swi.ch: ;${DEFMOD} -q -chelp < $< > $@ - -.swi.ah: ;${DEFMOD} -q -asmhelp < $< > $@ - -.swi.o: ;@${MD} ${SOURCEDIR}.o - @${MD} l - @${MD} o - @IfThere ${OSLIB} then else ${LIBFILE} -c -o ${OSLIB} - ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} < $< - @${REDUCEAOF} -via ViaFile - #@-${LIBFILE} -d ${OSLIB} l.$*.* - ${LIBFILE} -i -o ${OSLIB} -v ViaFile - @create $@ - @delete ViaFile - @Wipe l.$* ~C~FR~V - @echo - -.swi.o32: ;@${MD} ${SOURCEDIR}.o - @${MD} l - @${MD} o32 - @IfThere ${OSLIB32} then else ${LIBFILE} -c -o ${OSLIB32} - ${DEFMOD} -q -l -o l.$* -byte_wide ${BYTEWIDE} -32bit < $< - @${REDUCEAOF} -via ViaFile - #@-${LIBFILE} -d ${OSLIB32} l.$*.* - ${LIBFILE} -i -o ${OSLIB32} -v ViaFile - @create $@ - @delete ViaFile - @Wipe l.$* ~C~FR~V - @echo - -.swi.help: ;@${MD} ${HELPDATA} - @${MD} help - ${ECHO} - ${DEFMOD} -q -cstrong -o ${HELPDATA} < $< - @IfThere $@ then stamp $@ else Create $@ Deleted: branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,26 +0,0 @@ -# OSLib.Source.Computer.oslib.Makefile TV 20031228 -# Makefile for Computer/oslib under RISC OS -# - -#include the module list -include ${MAKEFILEDIR}.modules - -#include the global definitions afther the local ones -# to allow the latter to be recognised -include <OSLib$SourceDir>.AMUmakefile/inc - -# local targets -.PHONY: computer libs libs32 - -computer: all - @echo - -libs: ${LIBS} - @echo - -libs32: ${LIBS32} - @echo - - -#------------------------------------------------------------------------ -# Dynamic dependencies: Deleted: branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,16 +0,0 @@ -# OSLib/Source/Computer/oslib/GNUmakefile TV 20040115 -# Makefile for Computer/oslib under GNU -# - -SOURCEDIR = ../.. -TARGET = Computer - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ - -.PHONY: ${OSLIB32} ${OSLIB} - -${OSLIB}: ${LIBS} ${HDRS} ${OBJS} - -${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} Added: branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,36 +0,0 @@ -# OSLib.Source.Core.oslib.Makefile TV 20031228 -# - -include ${MAKEFILEDIR}.Modules - -#include the global definitions afther the local ones -# to allow the latter to be recognised -include <OSLib$SourceDir>.AMUmakefile/inc - -# local targets -.PHONY: core libs libs32 - -core: all - @echo - -libs: ${OSLIB} - @echo - -libs32: ${OSLIB32} - @echo - -REPLACE = \ -l.OSHeap.0x00010.o.001 \ -l.OSHeap.0x00010x.o.001 \ -l.OS.0x00020.o.000 \ -l.OS.0x00020x.o.000 \ -l.OS.0x00020.o.001 \ -l.OS.0x00020x.o.001 - -${OSLIB}: ${OBJS} ${LIBS} ${HDRS} - -${LIBFILE} -d ${OSLIB} ${REPLACE} - ${LIBFILE} -i -o ${OSLIB} ${OBJS} - -${OSLIB32}: ${OBJS32} ${LIBS32} ${HDRS} - -${LIBFILE} -d ${OSLIB32} ${REPLACE} - ${LIBFILE} -i -o ${OSLIB32} ${OBJS32} Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,33 +0,0 @@ -# OSLib/Source/Core/oslib/GNUmakefile TV 20040119 -# -# - -SOURCEDIR = ../.. -TARGET = Core - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ - -#.PHONY: ${OSLIB32} ${OSLIB} - -REPLACE = \ -l/OSHeap/0x00010.001.o \ -l/OSHeap/0x00010x.001.o \ -l/OS/0x00020.000.o \ -l/OS/0x00020x.000.o \ -l/OS/0x00020.001.o \ -l/OS/0x00020x.001.o - -#------------------------------------------------------------------------ -${OSLIB}: ${LIBS} ${HDRS} ${OBJS} - -${LIBFILE} -d ${OSLIB} ${REPLACE} - ${LIBFILE} -i ${OSLIB} ${OBJS} - -${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} - -${LIBFILE} -d ${OSLIB32} ${REPLACE} - ${LIBFILE} -i ${OSLIB32} ${OBJS32} - -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Make,fd7 2007-04-22 22:17:32 UTC (rev 250) @@ -1,9 +0,0 @@ -| OSLib.Source.Core.oslib.!Make TV 20031228 -| -SetEval Make$Dir Obey$Dir - -SetEval OSLib$Slot 2*1024 -Do WIMPSlot -min <OSLib$Slot>K -Do WIMPSlot -max <OSLib$Slot>K - -AMU -D -f <Make$Dir>.Makefile -desktop %0 Added: branches/simplified-build/!OsLib/Source/Core/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,107 +0,0 @@ -# -# Makefile for SOURCES under GNU -# - -#------------------------------------------------------------------------ -include ../GNUmakefile.settings -SOURCEDIR = ${CURDIR} -include GNUmakefile.settings - -#------------------------------------------------------------------------ -# paths & directories - -#------------------------------------------------------------------------ -# tools -LIBFILE = ${GCCSDK_INSTALL_CROSSBIN}/libfile -INDEXHELP = ${BINDIR}/IndexHelp -BINDHELP = ${BINDIR}/BindHelp -RM = rm -f -RD = rm -fr - -#------------------------------------------------------------------------ -# target-specific macros - -SOURCES = Computer Core Toolbox User - -OSLIB = OSLib.o -OSLIB32 = OSLib32.o -CSTRONG = OSLib,3d6 -LIST = OSLib.list -LIST32 = OSLib32.list - -#------------------------------------------------------------------------ -# targets - -.PHONY: all cstrong Computer Core Toolbox User Test oslib libs clean - -all: oslib Test cstrong - -cstrong: ${CSTRONG} - -computer: Computer -Computer: ;${MAKE} -C $@/oslib all - -core: Core -Core: ;${MAKE} -C $@/oslib all - -toolbox: Toolbox -Toolbox: ;${MAKE} -C $@/oslib all - -user: User -User: ;${MAKE} -C $@/oslib all - -test: Test -Test: ;${MAKE} -C $@ all - -oslib: - ${MAKE} -C Computer/oslib oslib - ${MAKE} -C Core/oslib oslib - ${MAKE} -C Toolbox/oslib oslib - ${MAKE} -C User/oslib oslib - ${MAKE} list - ${MAKE} list32 - -hdrs: - ${MAKE} -C Computer/oslib hdrs - ${MAKE} -C Core/oslib hdrs - ${MAKE} -C Toolbox/oslib hdrs - ${MAKE} -C User/oslib hdrs - -list: ${LIST} -${LIST}: ${OSLIB} - ${LIBFILE} -s ${OSLIB} > ${LIST} - -list32: ${LIST32} -${LIST32}: ${OSLIB32} - ${LIBFILE} -s ${OSLIB} > ${LIST32} - -libs: - ${MAKE} -C Computer/oslib libs - ${MAKE} -C Core/oslib libs - ${MAKE} -C Toolbox/oslib libs - ${MAKE} -C User/oslib libs - -${CSTRONG}: - ${MAKE} -C Computer/oslib cstrong - ${MAKE} -C Core/oslib cstrong - ${MAKE} -C Toolbox/oslib cstrong - ${MAKE} -C User/oslib cstrong - ${INDEXHELP} HelpData/action_ -p Action - ${INDEXHELP} HelpData/class_ -p Class - ${INDEXHELP} HelpData/error_ -p Error - ${INDEXHELP} HelpData/message_ -p Message - ${INDEXHELP} HelpData/service_ -p Service - ${BINDHELP} HelpData $@ - -clean: ;$(foreach dir, ${SOURCES}, ${MAKE} -C ${dir}/oslib clean; ) - ${MAKE} -C Test clean - -${RM} OSLib.o OSLib32.o ${LIST} ${LIST32} ${CSTRONG} - -${RD} HelpData - -cleanhelp: - ${MAKE} -C Computer/oslib cleanhelp - ${MAKE} -C Core/oslib cleanhelp - ${MAKE} -C Toolbox/oslib cleanhelp - ${MAKE} -C User/oslib cleanhelp - ${RD} HelpData/* - ${RM} ${CSTRONG} Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile.settings =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile.settings 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile.settings 2007-04-22 22:17:32 UTC (rev 250) @@ -1,17 +0,0 @@ -# -# Makefile specifying the environment settings for all GNUmakefiles -# inside the Source directory. -# -# SOURCEDIR must be defined by the caller, and must -# point to the top of the source tree. - -#------------------------------------------------------------------------ -# environment settings -ifeq ($(origin SOURCEDIR), undefined) -$(error SOURCEDIR is not defined) -endif -BINDIR = ${SOURCEDIR}/../Bin - -export BINDIR - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/GNUmakefile.source =================================================================== --- branches/simplified-build/!OsLib/Source/GNUmakefile.source 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/GNUmakefile.source 2007-04-22 22:17:32 UTC (rev 250) @@ -1,211 +0,0 @@ -# -# Makefile for to include in oslib source GNUmakefiles -# -# SOURCEDIR must be defined by the caller, and must -# point to the top of the source tree. - -#define MALLOC_CHECK to enable malloc debugging hooks while running defmod -#MALLOC_CHECK = MALLOC_CHECK_=1 - -#------------------------------------------------------------------------ -# Source Directories - -SOURCES = Computer Core Toolbox User -INCLUDES = Macros Types ${SOURCES} - -#------------------------------------------------------------------------ -# tools - -ASMFLAGS = -objasm,-I..,-I${SOURCEDIR}/Types - -DEFMOD = ${BINDIR}/defmod -q -REDUCEAOF = ${BINDIR}/reduceaof -INDEXHELP = ${BINDIR}/IndexHelp -BINDHELP = ${BINDIR}/BindHelp -CP = cp -p -RM = rm -f -DIFF = diff -AS = ${GCCSDK_INSTALL_CROSSBIN}/gcc -c -xassembler -Wa,${ASMFLAGS} -CC = ${GCCSDK_INSTALL_CROSSBIN}/gcc -LINK = ${GCCSDK_INSTALL_CROSSBIN}/gcc -LIBFILE = ${GCCSDK_INSTALL_CROSSBIN}/libfile - -#------------------------------------------------------------------------ -# macros -ALL = ${SWIMODULES} ${MODULES} ${CMODULES} -HDRS = $(patsubst %, %.Hdr,${SWIMODULES} ${MODULES}) -OBJASM = $(patsubst %, %.s,${SWIMODULES}) -OBJASM32 = $(patsubst %, %.s32,${SWIMODULES}) -LIBS = $(patsubst %, %.o,${SWIMODULES}) -LIBS32 = $(patsubst %, %.o32,${SWIMODULES}) -CHEADERS = $(patsubst %, %.h,${SWIMODULES} ${MODULES}) -CSTRONG = $(patsubst %, %.help,${SWIMODULES} ${MODULES}) -OBJS = $(patsubst %, %.o,${CMODULES}) -OBJS32 = $(patsubst %, %.o32,${CMODULES}) -FILES = ${LIBS} ${LIBS32} ${OBJASM} ${OBJASM32} ${HDRS} ${CHEADERS} - -#------------------------------------------------------------------------ -# file locations -BYTEWIDE = ${SOURCEDIR}/ByteWide -HELPDATA = ${SOURCEDIR}/HelpData -OSLIB = ${SOURCEDIR}/OSLib.o -OSLIB32 = ${SOURCEDIR}/OSLib32.o - -#------------------------------------------------------------------------ -#helper functions - -# convert arg to lower case -tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) - -#------------------------------------------------------------------------ -# Targets - -.PHONY: oslib all cstrong hdrs cheaders objasm objasm32 clean regression regression32 - -oslib: all -all: libs libs32 objasm objasm32 hdrs cheaders objs objs32 - -libs: ${OSLIB} - -libs32: ${OSLIB32} - -cstrong: ${CSTRONG} - -hdrs: ${HDRS} - -cheaders: ${CHEADERS} - -objasm: ${OBJASM} - -objasm32: ${OBJASM32} - -objs: ${HDRS} ${OBJS} - -objs32: ${HDRS} ${OBJS32} - -clean: - @- ${RM} -r l/* - @- ${RM} ${FILES} ${LIBS} ${LIBS32} ${OBJS} ${OBJS32} ${CSTRONG} ViaFile - @- ${RM} $(call tolower, ${CHEADERS}) - -cleanhelp: ;@-${RM} ${CSTRONG} - -regression: - -@$(foreach TARGET, ${OBJASM}, \ - echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ - ${DIFF} -y --suppress-common-lines ${TARGET} 's; \ - 0/$(basename, $(call tolower, ${TARGET} ) )'; ) - -regression32: - -@$(foreach TARGET, ${OBJASM32}, \ - echo ---- Diffing ${TARGET} against $(basename, $(call tolower, ${TARGET} ) ) ; \ - ${DIFF} -y --suppress-common-lines ${TARGET} 's32; \ - 0/$(basename, $(call tolower, ${TARGET} ) )'; ) - -release_wide: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi - @if [ ! -d ${RELEASEDIR}/OSLib/oslib/h ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib/h; fi - @if [ ! -d ${RELEASEDIR}/OSLib/oslib/Hdr ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib/Hdr; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/h/$(basename ${file} ); ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/Hdr/$(basename ${file} ); ) - -release_deep: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib; fi - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/h ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/h; fi - @if [ ! -d ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/${TARGET}/oslib/h/$(basename ${file} ); ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/${TARGET}/oslib/Hdr/$(basename ${file} ); ) - -release_unix: -ifndef RELEASEDIR - error RELEASEDIR not defined -endif - @if [ ! -d ${RELEASEDIR}/OSLib/oslib ]; \ - then mkdir -p ${RELEASEDIR}/OSLib/oslib; fi - @$(foreach file, $(call tolower, ${CHEADERS}), ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/${file}; ) - @$(foreach file, ${HDRS}, ${CP} ${file} \ - ${RELEASEDIR}/OSLib/oslib/${file}; ) - -#------------------------------------------------------------------------ -# general rules: - -.SUFFIXES: -.SUFFIXES: .o .o32 .h .h++ .swi .ch .Hdr .ah .help .s .s32 .asm - -.swi.s: ;@echo making $@ - @${DEFMOD} -s -byte_wide ${BYTEWIDE} < $< > $@ - -.swi.s32: ;@echo making $@ - @${DEFMOD} -s -byte_wide ${BYTEWIDE} -32bit < $< > $@ - -.swi.h++: ;@echo making $@ - @${DEFMOD} -h++ < $< > $@ - -.swi.Hdr: ;@echo making $@ - @${DEFMOD} -hdr < $< > $@ - -.swi.ch: ;@echo making $@ - @${DEFMOD} -chelp < $< > $@ - -.swi.ah: ;@echo making $@ - @${DEFMOD} -asmhelp < $< > $@ - -.swi.h: ;@echo making $@ - @${DEFMOD} -h < $< > $(call tolower, $@) - @touch $@ - -.swi.o: ;@echo making $@ - @if [ ! -d l ]; then mkdir l; fi; - @env PATH=${GCCSDK_INSTALL_CROSSBIN}:${PATH} ${MALLOC_CHECK} \ - ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} < $< - @${REDUCEAOF} -via ViaFile - @if [ ! -a ${OSLIB} ]; then ${LIBFILE} -c ${OSLIB}; fi; - @-${LIBFILE} -d ${OSLIB} -v ViaFile - @${LIBFILE} -i ${OSLIB} -v ViaFile - @touch $@ - @${RM} ViaFile - @${RM} -r l/$* - -.swi.o32: ;@echo making $@ - @if [ ! -d l ]; then mkdir l; fi; - @env PATH=${GCCSDK_INSTALL_CROSSBIN}:$PATH ${MALLOC_CHECK} \ - ${DEFMOD} -l -o l/$* -byte_wide ${BYTEWIDE} -32bit < $< - @${REDUCEAOF} -via ViaFile - @-if [ ! -a ${OSLIB32} ]; then ${LIBFILE} -c ${OSLIB32}; fi; - @-${LIBFILE} -d ${OSLIB32} -v ViaFile - @${LIBFILE} -i ${OSLIB32} -v ViaFile - @touch $@ - @${RM} ViaFile - @${RM} -r l/$* - -.swi.help: ;@echo making $@ - @if [ ! -d ${HELPDATA} ]; then mkdir ${HELPDATA}; fi; - ${DEFMOD} -cstrong -o ${HELPDATA} < $< - @touch $@ - -.asm.o: ;@echo making $@ - @-${LIBFILE} -d ${OSLIB} $@ - @${AS} -mapcs-26 -Wa,-apcs26 -o $@ $< - -.asm.o32: ;@echo making $@ - @-${LIBFILE} -d ${OSLIB32} $@ - @${AS} -mapcs-32 -Wa,-apcs32 -o $@ $< - -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/AHelp =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/AMUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,7 +0,0 @@ -# OSLib/Source/Macros/oslib/AMUmakefile TV 20040214 -# Makefile for Macros/oslib under RISC OS -# - -include ${MAKEFILEDIR}.Modules -include <OSLib$SourceDir>.AMUmakefile/inc -#------------------------------------------------------------------------ Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/CHelp =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/GNUmakefile 2007-04-22 22:17:32 UTC (rev 250) @@ -1,10 +0,0 @@ -# OSLib/Source/Macros/oslib/GNUmakefile TV 20040214 -# Makefile for Macros/oslib under GNU -# - -SOURCEDIR = ../.. -TARGET = Macros - -include Modules -include ${SOURCEDIR}/GNUmakefile.source -#------------------------------------------------------------------------ Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.h 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,396 @@ +#ifndef macros_H +#define macros_H + +/*OSLib---efficient, type-safe, transparent, extensible, + register-safe A P I coverage of RISC O S*/ +/*Copyright \xA9 1994 Jonathan Coxhead*/ + +/* + OSLib is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + OSLib is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this programme; if not, write to the Free Software + Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. +*/ + +/************************ + * Constant definitions * + ************************/ +#ifndef SIG_LIMIT +#define SIG_LIMIT 11 +#endif +#ifndef DEC_WIDTH +#define DEC_WIDTH 10 +#endif +#ifndef SHORT_DEC_WIDTH +#define SHORT_DEC_WIDTH 5 +#endif +#ifndef LONG_DEC_WIDTH +#define LONG_DEC_WIDTH 10 +#endif +#ifndef OCT_WIDTH +#define OCT_WIDTH 11 +#endif +#ifndef SHORT_OCT_WIDTH +#define SHORT_OCT_WIDTH 6 +#endif +#ifndef LONG_OCT_WIDTH +#define LONG_OCT_WIDTH 11 +#endif +#ifndef UNSIGNED_WIDTH +#define UNSIGNED_WIDTH 10 +#endif +#ifndef SHORT_UNSIGNED_WIDTH +#define SHORT_UNSIGNED_WIDTH 5 +#endif +#ifndef LONG_UNSIGNED_WIDTH +#define LONG_UNSIGNED_WIDTH 10 +#endif +#ifndef HEX_WIDTH +#define HEX_WIDTH 8 +#endif +#ifndef SHORT_HEX_WIDTH +#define SHORT_HEX_WIDTH 4 +#endif +#ifndef LONG_HEX_WIDTH +#define LONG_HEX_WIDTH 8 +#endif +#ifndef FLT_WIDTH +#define FLT_WIDTH 7 +#endif +#ifndef DBL_WIDTH +#define DBL_WIDTH 17 +#endif +#ifndef LDBL_WIDTH +#define LDBL_WIDTH 17 +#endif +#ifndef FLT_EXP_WIDTH +#define FLT_EXP_WIDTH 2 +#endif +#ifndef DBL_EXP_WIDTH +#define DBL_EXP_WIDTH 3 +#endif +#ifndef LDBL_EXP_WIDTH +#define LDBL_EXP_WIDTH 3 +#endif + +/********************* + * Macro definitions * + *********************/ + +/* ------------------------------------------------------------------------ + * Macro: ABS() + * + * Description: Absolute value of a number + */ + +#define ABS(a) ((a) >= 0? (a): -(a)) + +/* ------------------------------------------------------------------------ + * Macro: ALIGN() + * + * Description: Rounds an integer up to the next multiple of 4 + */ + +#define ALIGN(b) ((b) + 3 & ~3) + +/* ------------------------------------------------------------------------ + * Macro: BINEXP() + * + * Description: 2 to the power of an integer + */ + +#define BINEXP(n) (1 << (n)) + +/* ------------------------------------------------------------------------ + * Macro: BIT() + * + * Description: The value of a bit at an offset from a pointer (cf CLR, + * SET) + */ + +#define BIT(p, i) (((bits *) (p)) [(i) >> 5] & 1 << ((i) & 31)) + +/* ------------------------------------------------------------------------ + * Macro: BOOL() + * + * Description: Converts non-0 values to 1 + */ + +#define BOOL(c) ((c) != 0? TRUE: FALSE) + +/* ------------------------------------------------------------------------ + * Macro: CLEAR() + * + * Description: Clears the contents of a string + */ + +#define CLEAR(s) ((s) [0] = '\0') + +/* ------------------------------------------------------------------------ + * Macro: CLR() + * + * Description: Clears the bit at an offset from a pointer (cf BIT, SET) + * + * Other notes: 5 = x: 2^^x == CHAR_BIT*sizeof (bits); 31 = + * CHAR_BIT*sizeof (bits) - 1 + */ + +#define CLR(p, i) (((bits *) (p)) [(i) >> 5] &= ~(1 << ((i) & 31))) + +/* ------------------------------------------------------------------------ + * Macro: COUNT() + * + * Description: The number of elements in an array + */ + +#define COUNT(a) (sizeof (a)/sizeof *(a)) + +/* ------------------------------------------------------------------------ + * Macro: DBLEQ() + * + * Description: Tests floating point numbers for approximate equality + */ + +#define DBLEQ(a, b, e) (fabs ((a) - (b)) <= (e)*(fabs (a) + fabs (b))) + +/* ------------------------------------------------------------------------ + * Macro: DIGIT() + * + * Description: The decimal digit corresponding to a character + */ + +#define DIGIT(c) ((c) - '0') + +/* ------------------------------------------------------------------------ + * Macro: DIM() + * + * Description: Positive difference + */ + +#define DIM(a, b) ((a) > (b)? (a) - (b): 0) + +/* ------------------------------------------------------------------------ + * Macro: DIV_DOWN_POS_() + * + * Description: Helper macro for DIV_DOWN, DIV_UP + */ + +#define DIV_DOWN_POS_(a, b) ((a)/(b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_UP_POS_() + * + * Description: Helper macro for DIV_DOWN, DIV_UP + */ + +#define DIV_UP_POS_(a, b) (((a) + (b) - 1)/(b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_DOWN() + * + * Description: Integer division, rounding down (towards -infinity) + */ + +#define DIV_DOWN(a, b) ((a) >= 0? DIV_DOWN_POS_ (a, b): -DIV_UP_POS_ (-(a), b)) + +/* ------------------------------------------------------------------------ + * Macro: DIV_UP() + * + * Description: Integer division, rounding up (towards +infinity) + */ + +#define DIV_UP(a, b) ((a) > 0? DIV_UP_POS_ (a, b): -DIV_DOWN_POS_ (-(a), b)) + +/* ------------------------------------------------------------------------ + * Macro: EMPTY() + * + * Description: Is a string empty? + */ + +#define EMPTY(s) ((s) [0] == '\0') + +/* ------------------------------------------------------------------------ + * Macro: ISDIGIT() + * + * Description: A decimal digit? + */ + +#define ISDIGIT(c) ('0' <= (c) && (c) <= '9') + +/* ------------------------------------------------------------------------ + * Macro: ISXDIGIT() + * + * Description: A hexadecimal digit? + */ + +#define ISXDIGIT(c) (('0' <= (c) && (c) <= '9') || \ + ('a' <= (c) && (c) <= 'f') || ('A' <= (c) && (c) <= 'F')) + +/* ------------------------------------------------------------------------ + * Macro: LCHAR() + * + * Description: The character corresponding to a digit, preferring lower + * case + */ + +#define LCHAR(i) ("0123456789abcdef" [i]) + +/* ------------------------------------------------------------------------ + * Macro: MAX() + * + * Description: The larger of two values + */ + +#define MAX(a, b) ((a) > (b)? (a): (b)) + +/* ------------------------------------------------------------------------ + * Macro: MAXAB() + * + * Description: The larger of two values and assign + */ + +#define MAXAB(a, b) ((a) < (b)? (a) = (b): (a)) + +/* ------------------------------------------------------------------------ + * Macro: MIN() + * + * Description: The smaller of two values + */ + +#define MIN(a, b) ((a) < (b)? (a): (b)) + +/* ------------------------------------------------------------------------ + * Macro: MINAB() + * + * Description: The smaller of two values and assign + */ + +#define MINAB(a, b) ((a) > (b)? (a) = (b): (a)) + +/* ------------------------------------------------------------------------ + * Macro: NCOPY() + * + * Description: Copy a string of limited length + */ + +#define NCOPY(s1, s2, n) (sprintf (s1, "%.*s", n, s2), s1) + +/* ------------------------------------------------------------------------ + * Macro: OFFSETOF() + * + * Description: Offset of a member in a variable of structure type + */ + +#define OFFSETOF(var, mem) ((char *) &(var).mem - (char *) &(var)) + +/* ------------------------------------------------------------------------ + * Macro: RATIO() + * + * Description: Integer division, rounding to nearest + */ + +#define RATIO(a, b) ((2*(a) + (b))/(2*(b))) + +/* ------------------------------------------------------------------------ + * Macro: SET() + * + * Description: Sets the bit at an offset from a pointer (cf BIT, CLR) + */ + +#define SET(p, i) (((bits *) (p)) [(i) >> 5] |= 1 << ((i) & 31)) + +/* ------------------------------------------------------------------------ + * Macro: SGN() + * + * Description: Signum + */ + +#define SGN(a) ((a) > 0? 1: (a) < 0? -1: 0) + +/* ------------------------------------------------------------------------ + * Macro: SHORT() + * + * Description: Assembles a short from an unaligned pointer + */ + +#define SHORT(ptr) ((int) (((byte *) (ptr)) [0] | \ + ((byte *) (ptr)) [1] << 8) << 16 >> 16) + +/* ------------------------------------------------------------------------ + * Macro: SQR() + * + * Description: Square + */ + +#define SQR(a) ((a)*(a)) + +/* ------------------------------------------------------------------------ + * Macro: STR_() + * + * Description: Helper macro for STR + */ + +#define STR_(s) #s + +/* ------------------------------------------------------------------------ + * Macro: STR() + * + * Description: Stringise a macro + */ + +#define STR(s) STR_ (s) + +/* ------------------------------------------------------------------------ + * Macro: STRLEN() + * + * Description: The length of a string constant, as a constant + */ + +#define STRLEN(s) (sizeof (s) - 1) + +/* ------------------------------------------------------------------------ + * Macro: UCHAR() + * + * Description: The character corresponding to a hexadecimal digit, + * preferring upper case + */ + +#define UCHAR(i) ("0123456789ABCDEF" [i]) + +/* ------------------------------------------------------------------------ + * Macro: WORD() + * + * Description: Assembles a word at an unaligned character pointer + */ + +#define WORD(ptr) ((int) (((byte *) (ptr)) [0] | \ + ((byte *) (ptr)) [1] << 8 | ((byte *) (ptr)) [2] << 16 | \ + ((byte *) (ptr)) [3] << 24)) + +/* ------------------------------------------------------------------------ + * Macro: XDIGIT() + * + * Description: The hexadecimal digit corresponding to a character + */ + +#define XDIGIT(c) ((byte) (c) < 'A'? (c) - '0': \ + (byte) (c) < 'a'? (c) - 'A' + 10: (c) - 'a' + 10) + +/* ------------------------------------------------------------------------ + * Macro: WHETHER() + * + * Description: Converts a boolean value to a string + */ + +#define WHETHER(c) ((c)? "TRUE": "FALSE") + +#endif Added: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.help =================================================================== Added: branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,4 @@ +# ... + +include Modules +include ../../Makefile.inc Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h 2007-04-21 11:34:22 UTC (rev 249) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/macros.h 2007-04-22 22:17:32 UTC (rev 250) @@ -1,396 +0,0 @@ -#ifndef macros_H -#define macros_H - -/*OSLib---efficient, type-safe, transparent, extensible, - register-safe A P I coverage of RISC O S*/ -/*Copyright \xA9 1994 Jonathan Coxhead*/ - -/* - OSLib is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - OSLib is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this programme; if not, write to the Free Software - Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. -*/ - -/************************ - * Constant definitions * - ************************/ -#ifndef SIG_LIMIT -#define SIG_LIMIT 11 -#endif -#ifndef DEC_WIDTH -#define DEC_WIDTH 10 -#endif -#ifndef SHORT_DEC_WIDTH -#define SHORT_DEC_WIDTH 5 -#endif -#ifndef LONG_DEC_WIDTH -#define LONG_DEC_WIDTH 10 -#endif -#ifndef OCT_WIDTH -#define OCT_WIDTH 11 -#endif -#ifndef SHORT_OCT_WIDTH -#define SHORT_OCT_WIDTH 6 -#endif -#ifndef LONG_OCT_WIDTH -#define LONG_OCT_WIDTH 11 -#endif -#ifndef UNSIGNED_WIDTH -#define UNSIGNED_WIDTH 10 -#endif -#ifndef SHORT_UNSIGNED_WIDTH -#define SHORT_UNSIGNED_WIDTH 5 -#endif -#ifndef LONG_UNSIGNED_WIDTH -#define LONG_UNSIGNED_WIDTH 10 -#endif -#ifndef HEX_WIDTH -#define HEX_WIDTH 8 -#endif -#ifndef SHORT_HEX_WIDTH -#define SHORT_HEX_WIDTH 4 -#endif -#ifndef LONG_HEX_WIDTH -#define LONG_HEX_WIDTH 8 -#endif -#ifndef FLT_WIDTH -#define FLT_WIDTH 7 -#endif -#ifndef DBL_WIDTH -#define DBL_WIDTH 17 -#endif -#ifndef LDBL_WIDTH -#define LDBL_WIDTH 17 -#endif -#ifndef FLT_EXP_WIDTH -#define FLT_EXP_WIDTH 2 -#endif -#ifndef DBL_EXP_WIDTH -#define DBL_EXP_WIDTH 3 -#endif -#ifndef LDBL_EXP_WIDTH -#define LDBL_EXP_WIDTH 3 -#endif - -/********************* - * Macro definitions * - *********************/ - -/* ------------------------------------------------------------------------ - * Macro: ABS() - * - * Description: Absolute value of a number - */ - -#define ABS(a) ((a) >= 0? (a): -(a)) - -/* ------------------------------------------------------------------------ - * Macro: ALIGN() - * - * Description: Rounds an integer up to the next multiple of 4 - */ - -#define ALIGN(b) ((b) + 3 & ~3) - -/* ------------------------------------------------------------------------ - * Macro: BINEXP() - * - * Description: 2 to the power of an integer - */ - -#define BINEXP(n) (1 << (n)) - -/* ------------------------------------------------------------------------ - * Macro: BIT() - * - * Description: The value of a bit at an offset from a pointer (cf CLR, - * SET) - */ - -#define BIT(p, i) (((bits *) (p)) [(i) >> 5] & 1 << ((i) & 31)) - -/* ------------------------------------------------------------------------ - * Macro: BOOL() - * - * Description: Converts non-0 values to 1 - */ - -#define BOOL(c) ((c) != 0? TRUE: FALSE) - -/* ------------------------------------------------------------------------ - * Macro: CLEAR() - * - * Description: Clears the contents of a string - */ - -#define CLEAR(s) ((s) [0] = '\0') - -/* ------------------------------------------------------------------------ - * Macro: CLR() - * - * Description: Clears the bit at an offset from a pointer (cf BIT, SET) - * - * Other notes: 5 = x: 2^^x == CHAR_BIT*sizeof (bits); 31 = - * CHAR_BIT*sizeof (bits) - 1 - */ - -#define CLR(p, i) (((bits *) (p)) [(i) >> 5] &= ~(1 << ((i) & 31))) - -/* ------------------------------------------------------------------------ - * Macro: COUNT() - * - * Description: The number of elements in an array - */ - -#define COUNT(a) (sizeof (a)/sizeof *(a)) - -/* ------------------------------------------------------------------------ - * Macro: DBLEQ() - * - * Description: Tests floating point numbers for approximate equality - */ - -#define DBLEQ(a, b, e) (fabs ((a) - (b)) <= (e)*(fabs (a) + fabs (b))) - -/* ------------------------------------------------------------------------ - * Macro: DIGIT() - * - * Description: The decimal digit corresponding to a character - */ - -#define DIGIT(c) ((c) - '0') - -/* ------------------------------------------------------------------------ - * Macro: DIM() - * - * Description: Positive difference - */ - -#define DIM(a, b) ((a) > (b)? (a) - (b): 0) - -/* ------------------------------------------------------------------------ - * Macro: DIV_DOWN_POS_() - * - * Description: Helper macro for DIV_DOWN, DIV_UP - */ - -#define DIV_DOWN_POS_(a, b) ((a)/(b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_UP_POS_() - * - * Description: Helper macro for DIV_DOWN, DIV_UP - */ - -#define DIV_UP_POS_(a, b) (((a) + (b) - 1)/(b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_DOWN() - * - * Description: Integer division, rounding down (towards -infinity) - */ - -#define DIV_DOWN(a, b) ((a) >= 0? DIV_DOWN_POS_ (a, b): -DIV_UP_POS_ (-(a), b)) - -/* ------------------------------------------------------------------------ - * Macro: DIV_UP() - * - * Description: Integer division, rounding up (towards +infinity) - */ - -#define DIV_UP(a, b) ((a) > 0? DIV_UP_POS_ (a, b): -DIV_DOWN_POS_ (-(a), b)) - -/* ------------------------------------------------------------------------ - * Macro: EMPTY() - * - * Description: Is a string empty? - */ - -#define EMPTY(s) ((s) [0] == '\0') - -/* ------------------------------------------------------------------------ - * Macro: ISDIGIT() - * - * Description: A decimal digit? - */ - -#define ISDIGIT(c) ('0' <= (c) && (c) <= '9') - -/* ------------------------------------------------------------------------ - * Macro: ISXDIGIT() - * - * Description: A hexadecimal digit? - */ - -#define ISXDIGIT(c) (('0' <= (c) && (c) <= '9') || \ - ('a' <= (c) && (c) <= 'f') || ('A' <= (c) && (c) <= 'F')) - -/* ------------------------------------------------------------------------ - * Macro: LCHAR() - * - * Description: The character corresponding to a digit, preferring lower - * case - */ - -#define LCHAR(i) ("0123456789abcdef" [i]) - -/* ------------------------------------------------------------------------ - * Macro: MAX() - * - * Description: The larger of two values - */ - -#define MAX(a, b) ((a) > (b)? (a): (b)) - -/* ------------------------------------------------------------------------ - * Macro: MAXAB() - * - * Description: The larger of two values and assign - */ - -#define MAXAB(a, b) ((a) < (b)? (a) = (b): (a)) - -/* ------------------------------------------------------------------------ - * Macro: MIN() - * - * Description: The smaller of two values - */ - -#define MIN(a, b) ((a) < (b)? (a): (b)) - -/* ------------------------------------------------------------------------ - * Macro: MINAB() - * - * Description: The smaller of two values and assign - */ - -#define MINAB(a, b) ((a) > (b)? (a) = (b): (a)) - -/* ------------------------------------------------------------------------ - * Macro: NCOPY() - * - * Description: Copy a string of limited length - */ - -#define NCOPY(s1, s2, n) (sprintf (s1, "%.*s", n, s2), s1) - -/* ------------------------------------------------------------------------ - * Macro: OFFSETOF() - * - * Description: Offset of a member in a variable of structure type - */ - -#define OFFSETOF(var, mem) ((char *) &(var).mem - (char *) &(var)) - -/* ------------------------------------------------------------------------ - * Macro: RATIO() - * - * Description: Integer division, rounding to nearest - */ - -#define RATIO(a, b) ((2*(a) + (b))/(2*(b))) - -/* ------------------------------------------------------------------------ - * Macro: SET() - * - * Description: Sets the bit at an offset from a pointer (cf BIT, CLR) - */ - -#define SET(p, i) (((bits *) (p)) [(i) >> 5] |= 1 << ((i) & 31)) - -/* ------------------------------------------------------------------------ - * Macro: SGN() - * - * Description: Signum - */ - -#define SGN(a) ((a) > 0? 1: (a) < 0? -1: 0) - -/* ------------------------------------------------------------------------ - * Macro: SHORT() - * - * Description: Assembles a short from an unaligned pointer - */ - -#define SHORT(ptr) ((int) (((byte *) (ptr)) [0] | \ - ((byte *) (ptr)) [1] << 8) << 16 >> 16) - -/* ------------------------------------------------------------------------ - * Macro: SQR() - * - * Description: Square - */ - -#define SQR(a) ((a)*(a)) - -/* ------------------------------------------------------------------------ - * Macro: STR_() - * - * Description: Helper macro for STR - */ - -#define STR_(s) #s - -/* ------------------------------------------------------------------------ - * Macro: STR() - * - * Description: Stringise a macro - */ - -#define STR(s) STR_ (s) - -/* ------------------------------------------------------------------------ - * Macro: STRLEN() - * - * Description: The length of a string constant, as a constant - */ - -#define STRLEN(s) (sizeof (s) - 1) - -/* ------------------------------------------------------------------------ - * Macro: UCHAR() - * - * Description: The character corresponding to a hexadecimal digit, - * preferring upper case - */ - -#define UCHAR(i) ("0123456789ABCDEF" [i]) - -/* ------------------------------------------------------------------------ - * Macro: WORD() - * - * Description: Assembles a word at an unaligned character pointer - */ - -#define WORD(ptr) ((int) (((byte *) (ptr)) [0] | \ - ((byte *) (ptr)) [1] << 8 | ((byte *) (ptr)) [2] << 16 | \ - ((byte *) (ptr)) [3] << 24)) - -/* ------------------------------------------------------------------------ - * Macro: XDIGIT() - * - * Description: The hexadecimal digit corresponding to a character - */ - -#define XDIGIT(c) ((byte) (c) < 'A'? (c) - '0': \ - (byte) (c) < 'a'? (c) - 'A' + 10: (c) - 'a' + 10) - -/* ------------------------------------------------------------------------ - * Macro: WHETHER() - * - * Description: Converts a boolean value to a string - */ - -#define WHETHER(c) ((c)? "TRUE": "FALSE") - -#endif Added: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,66 @@ +# ... + +export SOURCEDIR := $(abspath .) +export BINDIR := $(SOURCEDIR)/../Bin +export BUILDDIR := $(SOURCEDIR)/Build + +export HEADERDIR := $(BUILDDIR)/Header/oslib +export CSTRONGDIR := $(BUILDDIR)/CStrong +export OBJDIR := $(BUILDDIR)/Objs +export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions + +export BYTEWIDE := $(SOURCEDIR)/ByteWide +export DEFMOD := $(BINDIR)/defmod +export REDUCEAOF := $(BINDIR)/reduceaof +export BINDHELP := $(BINDIR)/bindhelp + +export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) + +export CC := gcc +export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export LIBFILE := libfile +export MKDIR := mkdir -p +export RM := rm -rf +export CP := cp -r + +OSLIBLIB = $(BUILDDIR)/OSLib32.o +OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 + +.PHONY: all clean oslib cstrong BuildRequirements +all: oslib cstrong + +clean: + $(MAKE) -C Computer/oslib $@ + $(MAKE) -C Core/oslib $@ + $(MAKE) -C Macros/oslib $@ + $(MAKE) -C Toolbox/oslib $@ + $(MAKE) -C Types/oslib $@ + $(MAKE) -C User/oslib $@ + -$(RM) $(BUILDDIR) + +oslib: $(OSLIBLIB) +$(OSLIBLIB): BuildRequirements + $(MAKE) -C Computer/oslib oslib + $(MAKE) -C Core/oslib oslib + $(MAKE) -C Macros/oslib oslib + $(MAKE) -C Toolbox/oslib oslib + $(MAKE) -C Types/oslib oslib + $(MAKE) -C User/oslib oslib + cd $(OBJDIR) && $(LIBFILE) -c $@ */*.o + +cstrong: $(OSLIBCSTRONG) +$(OSLIBCSTRONG): BuildRequirements + $(MAKE) -C Computer/oslib cstrong + $(MAKE) -C Core/oslib cstrong + $(MAKE) -C Macros/oslib cstrong + $(MAKE) -C Toolbox/oslib cstrong + $(MAKE) -C Types/oslib cstrong + $(MAKE) -C User/oslib cstrong + cd $(BUILDDIR) && $(BINDHELP) $(CSTRONGDIR) $@ + +BuildRequirements: + if [ ! -d $(BINDIR) ]; then $(MKDIR) $(BINDIR); fi + if [ ! -d $(CSTRONGDIR) ]; then $(MKDIR) $(CSTRONGDIR); fi + if [ ! -d $(HEADERDIR) ]; then $(MKDIR) $(HEADERDIR); fi + if [ ! -d $(OBJDIR) ]; then $(MKDIR) $(OBJDIR); fi + if [ ! -d $(OBJEXCEPTDIR) ]; then $(MKDIR) $(OBJEXCEPTDIR); fi Added: branches/simplified-build/!OsLib/Source/Makefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.inc (rev 0) +++ branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-22 22:17:32 UTC (rev 250) @@ -0,0 +1,64 @@ +# ... + +ASMHEADERS = $(patsubst %,%.Hdr,$(S... [truncated message content] |
From: <jt...@us...> - 2007-04-29 21:55:40
|
Revision: 255 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=255&view=rev Author: jtytgat Date: 2007-04-29 14:55:38 -0700 (Sun, 29 Apr 2007) Log Message: ----------- Build changes to get clean AOF vs ELF builds done. Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Computer/oslib/Modules branches/simplified-build/!OsLib/Source/Core/oslib/Modules branches/simplified-build/!OsLib/Source/Macros/oslib/Modules branches/simplified-build/!OsLib/Source/Makefile branches/simplified-build/!OsLib/Source/Makefile.inc branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules branches/simplified-build/!OsLib/Source/Types/oslib/Modules branches/simplified-build/!OsLib/Source/User/oslib/Modules Added Paths: ----------- branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.ELFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.AOFHdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.ELFHdr Removed Paths: ------------- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSFind32.help branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/OSGBPB32.help branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/PDriver32.help branches/simplified-build/!OsLib/Source/Types/oslib/Types.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/Types.help branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.Hdr branches/simplified-build/!OsLib/Source/Types/oslib/Wimp32.help Modified: branches/simplified-build/!OsLib/Source/Computer/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Computer/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Computer/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,8 +2,8 @@ # List of modules comprising Computer # for inclusion in Make files independant of platform -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ ADFS \ CD \ CDFS \ @@ -36,12 +36,12 @@ SCSIFS \ ShareFS \ Socket \ -SysLog +SysLog -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ CDFSFiler \ -NetFiler +NetFiler -# modules defined other than by SWI definition -CMODULES += +# Modules defined other than by SWI definition +ASMMODULES = Modified: branches/simplified-build/!OsLib/Source/Core/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Core/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -1,8 +1,8 @@ #Source/Core/oslib/Modules # -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ BlendTable \ Buffer \ Cache \ @@ -31,18 +31,17 @@ SharedCLibrary \ Sound \ Squash \ -Territory +Territory -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ Shell -# modules defined other than by SWI definition -CMODULES += \ +# Modules defined other than by SWI definition +ASMMODULES = \ OSChangeDynamicAreaNoFail \ OSHeapResizeNoFail \ OSReadVarValSize \ XOSChangeDynamicAreaNoFail \ XOSHeapResizeNoFail \ -XOSReadVarValSize - +XOSReadVarValSize Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,72 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm 20031228 +@ os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if +@ the change was only partially performed + +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OS.Hdr" + +R .req r0 + + .global os_change_dynamic_area_no_fail + .type os_change_dynamic_area_no_fail, %function + + .text + +@ os_change_dynamic_area_no_fail +@ APCS Compliant +@Entry A1 = area type +@ A2 = required size change in bytes (signed integer) +@Exit R = actual size change in bytes (unsigned integer) +@ +@ C Prototype: +@extern int os_change_dynamic_area_no_fail( os_dynamic_area_no area, +@ os_dynamic_area_no size_increase +@ ); +@ +@ This code works around the problem that OS_ChangeDynamicArea throws an error if the move is only +@ partially performed. OSLib is then unable to return the amount by which the area has changed. +@ +@ The object code is patched into the library at build time by the MakeFile. + + +os_change_dynamic_area_no_fail: + SWI 0x2002a @ XOS_ChangeDynamicArea (PRM 1-377) + BVC 99f @ no error - normal return + + @Test for Error_ChDynamNotAllMoved - report any other error + LDR R3, =0x1c1 @ Error_ChDynamNotAllMoved + LDR R2, [R0] @ get error number in R2 [TV 011221] + CMP R2, R3 + SWINE 0x2B @ OS_GenerateError - no return + + @ ignore Error_ChDynamNotAllMoved + + @ exit +99: MOV R, R1 @ APCS return value + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,73 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/OSHeapResizeNoFail.asm 20031228 +@ osheap_resize_no_fail - Extend or shrink heap without throwing error if shrink fails +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software@ you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global osheap_resize_no_fail + .type osheap_resize_no_fail, %function + + .text + +@ osheap_resize_no_fail +@ APCS Compliant +@Entry A1 = pointer to heap +@ A2 = required size change in bytes (signed integer) +@Exit R = actual size change in bytes +@ +@ C Prototype: +@extern int osheap_resize_no_fail( byte* heap, +@ int size_increase +@ ); +@ +@ This code works around the problem that OSHeap_Resize throws an error if shrink fails. +@ OSLib is then unable to return the amount by which the heap shrunk. +@ It also negates R3 if the error occurs, to give a consistent sign regardless of error condition. +@ The object code is patched into the library at build time by the MakeFile + +osheap_resize_no_fail: + MOV R3, A2 @ required change + MOV R1, A1 @ pointer to heap + MOV R0, #5 @ OSHeap_Resize - reason code + SWI 0x2001d @ XOS_Heap (PRM 1-375) + BVC 99f @ no error - normal return + + @Test for Error_HeapExcessiveShrink - report any other error + LDR R1, =0x187 @ Error_HeapExcessiveShrink + LDR R2, [R0] @ get error number in R2; [TV 011221] + CMP R2, R1 + SWINE 0x2B @ OS_GenerateError - no return + + @ ignore Error_HeapExcessiveShrink + RSB R3, R3, #0 @ complement R3 to give actual change + + @ exit +99: MOV R, R3 @ APCS return value + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/OSReadVarValSize.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,94 @@ +@os_read_var_val_size - return length of a variable +@ Initial Release 23-Mar-99 Tony van der Hoff + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@ This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error +@ when R2 bit 31 is set to read the variable length. The object code is patched into the +@ library at build time by the MakeFile + +@#include "oslib/Types.Hdr" + +R .req r0 + + .global os_read_var_val_size + .type os_read_var_val_size, %function + + .text + +@ os_Read_var_val_size +@ APCS Compliant +@Entry R0 (a1) -> name of a variable (may be wildcarded) +@ R1 (a2) -> context pointer for wildcarded names +@ R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) +@ R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found +@ R4 (v1) -> integer to contain variable type +@Exit R = updated context pointer +@ +@ C Prototype: +@extern int os_read_var_val_size ( +@ char const *var, +@ int context, +@ os_var_type var_type, +@ int *used, +@ os_var_type *var_type_out); + +@ C prototype: int xos_read_var_val_size( char const *name, +@ int *context, +@ os_var_type var_type +@ ); +@ +@ + +os_read_var_val_size: + STMFD SP!, {A4, V1} + MOV R4, A3 @ variable type + MOV R3, A2 @ context in + MOV R2, #0x80000000 @ check variable + MOV R1, #0 @ unused + SWI 0x20023 @ XOS_ReadVarVal + BVC 90f @ no error + + @Ignore error if RO 3 or later + STMFD SP!, {R0, R2} @ keep results + MOV R0, #129 @ Get OS version + MOV R1, #0 + MOV R2, #0xFF + SWI 0x6 @ OS_Byte + LDMFD SP!, {R0, R2} @ restore state + CMP R1, #0xA3 @ test for RISC O S 3 + SWILO 0x2B @ RO2 - call OS_GenerateError + +90: LDR IP, [SP, #0] @ Result pointer + TEQ IP, #0 + STRNE R2, [IP] @ update result + LDR IP, [SP, #8] @ var-type out pointer + TEQ IP, #0 + STRNE R4, [IP] @ update var type + MOV R, R3 @ new context + +99: ADD SP, SP, #4 @ flatten stack + LDMFD SP!, {V1} @ restore state + +#ifdef __APCS_32__ + MOV PC, LR +#else + MOVS PC, LR @ exit +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,81 @@ +@Index: OSLib/!OsLib/Source/Core/oslib/XOSChangeDynamicAreaNoFail.asm 20031228 +@ os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if +@ the change was only partially performed +@ +@ Initial Release 08-Nov-01 Tony van der Hoff +@ Bug fix 21-Dec-01 TV +@ Bug Fix 20-Feb-02 TV +@ +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global xos_change_dynamic_area_no_fail + .type xos_change_dynamic_area_no_fail, %function + + .text + +@ os_change_dynamic_area_no_fail +@ APCS Compliant +@Entry A1 = area type +@ A2 = required size change in bytes (signed integer) +@ A3 -> actual size change in bytes (unsigned integer) +@ +@ C Prototype: +@extern os_error* os_change_dynamic_area_no_fail( os_dynamic_area_no area, +@ int size_increase, +@ int* size_change +@ ); +@ +@ This code works around the problem that OS_ChangeDynamicArea throws an error if the move is only +@ partially performed. OSLib is then unable to return the amount by which the area has changed. +@ The object code is patched into the library at build time by the MakeFile. + +xos_change_dynamic_area_no_fail: + MOV IP, LR @ + + SWI 0x2002a @ XOS_ChangeDynamicArea (PRM 1-377) + BVC 90f @ no error - normal return + + @Test for Error_ChDynamNotAllMoved - return any other error + @ fixed bug causing R1 (result) and R2 (A3) to be overwritten with scratch data [TV 020220] + STMFD SP,{R2} @ save workspace + LDR R3, =0x1c1 @ Error_ChDynamNotAllMoved + LDR R2, [R0] @ get error number in R2 [TV 011221] + CMP R2, R3 + LDMFD SP,{R2} @ restore workspace + BNE 99f @ return error + + @ ignore Error_ChDynamNotAllMoved + + @ valid return +90: TEQ A3, #0 @ check null pointer + STRNE R1, [A3] @ output R1 [TV 020220] + MOV R, #0 @ clear error pointer + + @ exit +99: +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,84 @@ +@ Index: OSLib/!OsLib/Source/Core/oslib/XOSHeapResizeNoFail.asm 20031228 +@ osheap_resize_no_fail - Extend or shrink heap without throwing error if shrink fails +@ Initial Release 08-Nov-00 Tony van der Hoff +@ Bug fix 21-Dec-01 TV +@ Bug Fix 20-Feb-02 TV + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@#include "oslib/OSHeap.Hdr" + +R .req r0 + + .global xosheap_resize_no_fail + .type xosheap_resize_no_fail, %function + + .text + +@ xosheap_resize_no_fail +@ APCS Compliant +@Entry A1 = pointer to heap +@ A2 = required size change in bytes (signed integer) +@ A3 -> actual size change in bytes (signed integer) +@Exit R = os_error code + +@ C Prototype: +@extern os_error *xosheap_resize_no_fail( byte* heap, +@ int size_increase, +@ int* size_change +@ ); +@ +@ This code works around the problem that OSHeap_Resize throws an error if shrink fails. +@ OSLib is then unable to return the amount by which the heap shrunk. +@ The object code is patched into the library at build time by the MakeFile + +xosheap_resize_no_fail: + MOV IP, LR @ + + MOV R3, A2 @ required change + MOV R1, A1 @ pointer to heap + MOV R0, #5 @ OSHeap_Resize - reason code + SWI 0x2001d @ XOS_Heap + BVC 90f @ no error - normal return + + @ Test for Error_HeapExcessiveShrink - report any other error + @ fixed bug causing R2 (A3) to be overwritten with scratch data [TV 020220] + STMFD SP,{R2} @ save workspace + LDR R1, =0x187 @Error_HeapExcessiveShrink + LDR R2, [R0] @ get error number in R2; [TV 011221] + CMP R2, R1 + LDMFD SP,{R2} @ restore workspace + BNE 99f @ return any other error + + @ ignore Error_HeapExcessiveShrink + RSB R3, R3, #0 @ complement R3 to give actual change + + @ valid return +90: TEQ A3, #0 @ check null pointer + STRNE R3, [A3] @ output R3 + MOV R, #0 @ clear error pointer + + @ exit +99: +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas (from rev 246, branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.asm) =================================================================== --- branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas (rev 0) +++ branches/simplified-build/!OsLib/Source/Core/oslib/XOSReadVarValSize.gas 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,96 @@ +@xos_read_var_val_size - return length of a variable +@ Initial Release 23-mar-99 Tony van der Hoff +@ History +@ 001230 TV Update for 32-bit compatibility + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@ +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public Licence as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public Licence +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + +@ This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error +@ when R2 bit 31 is set to read the variable length. The object code is patched into the +@ library at build time by the MakeFile + +@#include "oslib/Types.Hdr" + +R .req r0 + + .global xos_read_var_val_size + .type xos_read_var_val_size, %function + + .text + +@ xos_Read_var_val_size +@ APCS Compliant +@Entry R0 (a1) -> name of a variable (may be wildcarded) +@ R1 (a2) -> context pointer for wildcarded names +@ R2 (a3) = expand variable flag (os_VARTYPE_EXPANDED or 0) +@ R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found +@ R4 (v1) -> integer to contain variable type +@Exit R = 0, or pointer to error block +@ +@ C Prototype: +@extern os_error *xos_read_var_val_size ( +@ char const *var, +@ int context, +@ os_var_type var_type, +@ int *used, +@ int *context_out, +@ os_var_type *var_type_out ); + +xos_read_var_val_size: + MOV IP, LR + STMFD SP!, {A4, V1} + MOV R4, A3 @ expand variable flag + MOV R3, A2 @ context pointer + MOV R2, #0x80000000 @ check variable + MOV R1, #0 @ unused + SWI 0x20023 @ XOS_ReadVarVal + BVC 90f + + @Ignore error if RO 3 or later + STMFD SP!, {R0, R2} @ keep results + MOV R0, #129 @ Get OS version + MOV R1, #0 + MOV R2, #0xFF + SWI 0x20006 @ XOS_Byte + ADDVS SP, SP, #8 @ flatten stack + BVS 99f @ error exit + LDMFD SP!, {R, R2} @ restore state + CMP R1, #0xA3 @ test for RISC O S 3 + BLO 99f @ RO2 - Can't ignore error + + @ no real error +90: LDR LR, [SP, #0] @ a4 = pointer to result + TEQ LR, #0 + STRNE R2, [LR] @ save result + LDR LR, [SP, #8] @ v1 = pointer to context out + TEQ LR, #0 + STRNE R3, [LR] @ update context + LDR LR, [SP, #12] @ a3 = pointer to var type + TEQ LR, #0 + STRNE R4, [LR] @ variable type out + MOV R, #0 @ clear error pointer + +99: ADD SP, SP, #4 @ flatten stack + LDMFD SP!, {V1} @ restore arguments +#ifdef __APCS_32__ + MOV PC, IP +#else + MOVS PC, IP @ exit +#endif + + .end Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,227 @@ + [ :LNOT: :DEF: Macros_Hdr + GBLL Macros_Hdr + +;OSLib---efficient, type-safe, transparent, extensible, +; register-safe A P I coverage of RISC O S +;Copyright \xA9 1994 Jonathan Coxhead + +; OSLib is free software; you can redistribute it and/or modify +;it under the terms of the GNU General Public License as published by +;the Free Software Foundation; either version 1, or (at your option) +;any later version. +; +; OSLib is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +;along with this programme; if not, write to the Free Software +;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + + MACRO +$label Inc $c, $r1 +$label ADD$c $r1, $r1, #1 + MEND + + MACRO +$label IncS $c, $r1 +$label ADD$c.S $r1, $r1, #1 + MEND + + MACRO +$label Dec $c, $r1 +$label SUB$c $r1, $r1, #1 + MEND + + MACRO +$label DecS $c, $r1 +$label SUB$c.S $r1, $r1, #1 + MEND + + MACRO +$label Max $r1, $r2, $r3 + ;r1 = MAX (r2, r3) +$label CMP $r2, $r3 + MOVGT $r1, $r2 + MOVLE $r1, $r3 + MEND + + MACRO +$label Min $r1, $r2, $r3 + ;r1 = MIN (r2, r3) +$label CMP $r2, $r3 + MOVLT $r1, $r2 + MOVGE $r1, $r3 + MEND + + MACRO +$label MaxAB $r1, $r2 + ;r1 = MAX (r1, r2) +$label CMP $r1, $r2 + MOVLT $r1, $r2 + MEND + + MACRO +$label MinAB $r1, $r2 + ;r1 = MIN (r1, r2) +$label CMP $r1, $r2 + MOVGT $r1, $r2 + MEND + + MACRO +$label Abs $r1, $r2 + ;r1 = ABS (r2) +$label CMP $r2, #0 + MOVGE $r1, $r2 + RSBLT $r1, $r2, #0 + MEND + + MACRO +$label Sgn $r1, $r2 + ;r1 = SGN (r2) +$label CMP $r2, #0 + MOVGT $r1, #1 + MOVEQ $r1, #0 + MVNLT $r1, #0 + MEND + + MACRO +$label Dim $r1, $r2, $r3 + ;r1 = DIM (r2, r3) +$label CMP $r2, $r3 + SUBGT $r1, $r2, $r3 + MOVLE $r1, #0 + MEND + + MACRO +$label Sqr $c, $r1, $r2 + ;r1 = SQR (r2) +$label MUL$c $r1, $r2, $r2 + MEND + + MACRO +$label Bool $r1, $r2 + ;r1 = BOOL (r2) +$label TEQ $r2, #0 + MOVNE $r2, #True + MOVEQ $r2, #False + MEND + + MACRO +$label Int $r1, $r2 + ;r1 = INT (r2) +$label SUB $r1, $r2, #"0" + CMP $r1, #9 + SUBHI $r1, $r2, #"a" + CMPHI $r1, #5 + SUBHI $r1, $r2, #"A" + CMPHI $r1, #5 + ADDHI $r1, $r1, #10 + MEND + + MACRO +$label UChar $r1, $r2 + ;r1 = UCHAR (r2) +$label CMP $r2, #10 + ADDLT $r1, $r2, #"0" + ADDGE $r1, $r2, #"A"-10 + MEND + + MACRO +$label LChar $r1, $r2 + ;r1 = LCHAR (r2) +$label CMP $r2, #10 + ADDLT $r1, $r2, #"0" + ADDGE $r1, $r2, #"a"-10 + MEND + + MACRO +$label BinExp $c, $r1, $r2 + ;r1 = BINEXP (r2) +$label MOV$c $r1, #1 + MOV$c $r1, $r1, LSL $r2 + MEND + + MACRO +$label Align $c, $r1, $r2 + ;r1 = ALIGN (r2) +$label ADD$c $r1, $r2, #3 + BIC$c $r1, $r1, #3 + MEND + + MACRO +$label SetC + ;C=1 V=0 Z=0 N=0 +$label CMP PC, #0 + MEND + + MACRO +$label ClearFlags + ;C=0 V=0 Z=0 N=0 +$label CMN PC, #0 + MEND + + MACRO +$label ClrV +$label ClearFlags + MEND + + MACRO +$label ClrC +$label ClearFlags + MEND + + MACRO +$label ClrN +$label ClearFlags + MEND + + MACRO +$label SetV + ;C=0 V=1 Z=0 N=1 +$label CMP PC, #&80000000 + MEND + + MACRO +$label SetN + ;C=0 V=0 Z=0 N=1 +$label CMN PC, #&80000000 + MEND + + MACRO +$label SetZ + ;C=* V=* Z=1 N=0 +$label TST PC, #0 + MEND + + MACRO +$label ClrZ + ;C=* V=* Z=0 N=0 +$label TEQ PC, #0 + MEND + + MACRO +$label NOP +$label & 0 + MEND + + MACRO +$label DivRem $rc, $ra, $rb, $rtemp + ;rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt +$label MOV $rtemp, $rb + CMP $rtemp, $ra, LSR #1 +01 MOVLS $rtemp, $rtemp, LSL #1 + CMPLS $rtemp, $ra, LSR #1 + BLS %BT01 + MOV $rc, #0 +02 CMP $ra, $rtemp + SUBCS $ra, $ra, $rtemp + ADC $rc, $rc, $rc + MOV $rtemp, $rtemp, LSR #1 + CMP $rtemp, $rb + BCS %BT02 + MEND + + ] + END Copied: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,202 @@ +#ifndef Macros_Hdr +# define Macros_Hdr + +# ifndef Get_Types +# define Get_Types +# include "oslib/Types.Hdr" +# endif + +@OSLib---efficient, type-safe, transparent, extensible, +@ register-safe A P I coverage of RISC O S +@Copyright � 1994 Jonathan Coxhead + +@ OSLib is free software; you can redistribute it and/or modify +@it under the terms of the GNU General Public License as published by +@the Free Software Foundation; either version 1, or (at your option) +@any later version. +@ +@ OSLib is distributed in the hope that it will be useful, +@but WITHOUT ANY WARRANTY; without even the implied warranty of +@MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public License +@along with this programme; if not, write to the Free Software +@Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. + + .macro Inc c, r1 + ADD\c \r1, \r1, #1 + .endm + + .macro IncS c, r1 + ADD\cS \r1, \r1, #1 + .endm + + .macro Dec c, r1 + SUB\c \r1, \r1, #1 + .endm + + .macro DecS c, r1 + SUB\cS \r1, \r1, #1 + .endm + + @ r1 = MAX (r2, r3) + .macro Max r1, r2, r3 + CMP \r2, \r3 + MOVGT \r1, \r2 + MOVLE \r1, \r3 + .endm + + @ r1 = MIN (r2, r3) + .macro Min r1, r2, r3 + CMP \r2, \r3 + MOVLT \r1, \r2 + MOVGE \r1, \r3 + .endm + + @ r1 = MAX (r1, r2) + .macro MaxAB r1, r2 + CMP \r1, \r2 + MOVLT \r1, \r2 + .endm + + @ r1 = MIN (r1, r2) + .macro MinAB r1, r2 + CMP \r1, \r2 + MOVGT \r1, \r2 + .endm + + @ r1 = ABS (r2) + .macro Abs r1, r2 + CMP \r2, #0 + MOVGE \r1, \r2 + RSBLT \r1, \r2, #0 + .endm + + @ r1 = SGN (r2) + .macro Sgn r1, r2 + CMP \r2, #0 + MOVGT \r1, #1 + MOVEQ \r1, #0 + MVNLT \r1, #0 + .endm + + @ r1 = DIM (r2, r3) + .macro Dim r1, r2, r3 + CMP \r2, \r3 + SUBGT \r1, \r2, \r3 + MOVLE \r1, #0 + .endm + + @ r1 = SQR (r2) + .macro Sqr c, r1, r2 + MUL\c \r1, \r2, \r2 + .endm + + @ r1 = BOOL (r2) + .macro Bool r1, r2 + TEQ \r2, #0 + MOVNE \r2, #True + MOVEQ \r2, #False + .endm + + @ r1 = INT (r2) + .macro Int r1, r2 + SUB \r1, \r2, #"0" + CMP \r1, #9 + SUBHI \r1, \r2, #"a" + CMPHI \r1, #5 + SUBHI \r1, \r2, #"A" + CMPHI \r1, #5 + ADDHI \r1, \r1, #10 + .endm + + @ r1 = UCHAR (r2) + .macro UChar r1, r2 + CMP \r2, #10 + ADDLT \r1, \r2, #"0" + ADDGE \r1, \r2, #"A"-10 + .endm + + @ r1 = LCHAR (r2) + .macro LChar r1, r2 + CMP \r2, #10 + ADDLT \r1, \r2, #"0" + ADDGE \r1, \r2, #"a"-10 + .endm + + @ r1 = BINEXP (r2) + .macro BinExp c, r1, r2 + MOV\c \r1, #1 + MOV\c \r1, \r1, LSL \r2 + .endm + + @ r1 = ALIGN (r2) + .macro Align c, r1, r2 + ADD\c \r1, \r2, #3 + BIC\c \r1, \r1, #3 + .endm + + @ C=1 V=0 Z=0 N=0 + .macro SetC + CMP PC, #0 + .endm + + @ C=0 V=0 Z=0 N=0 + .macro ClearFlags + CMN PC, #0 + .endm + + .macro ClrV + ClearFlags + .endm + + .macro ClrC + ClearFlags + .endm + + .macro ClrN + ClearFlags + .endm + + @ C=0 V=1 Z=0 N=1 + .macro SetV + CMP PC, #&80000000 + .endm + + @ C=0 V=0 Z=0 N=1 + .macro SetN + CMN PC, #&80000000 + .endm + + @ C=* V=* Z=1 N=0 + .macro SetZ + TST PC, #0 + .endm + + @ C=* V=* Z=0 N=0 + .macro ClrZ + TEQ PC, #0 + .endm + + .macro NOP + & 0 + .endm + + @ rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt + .macro DivRem rc, ra, rb, rtemp + MOV \rtemp, \rb + CMP \rtemp, \ra, LSR #1 +1: MOVLS \rtemp, \rtemp, LSL #1 + CMPLS \rtemp, \ra, LSR #1 + BLS 1b + MOV \rc, #0 +2: CMP \ra, \rtemp + SUBCS \ra, \ra, \rtemp + ADC \rc, \rc, \rc + MOV \rtemp, \rtemp, LSR #1 + CMP \rtemp, \rb + BCS 2b + .endm + +#endif Deleted: branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Macros.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,227 +0,0 @@ - [ :LNOT: :DEF: Macros_Hdr - GBLL Macros_Hdr - -;OSLib---efficient, type-safe, transparent, extensible, -; register-safe A P I coverage of RISC O S -;Copyright \xA9 1994 Jonathan Coxhead - -; OSLib is free software; you can redistribute it and/or modify -;it under the terms of the GNU General Public License as published by -;the Free Software Foundation; either version 1, or (at your option) -;any later version. -; -; OSLib is distributed in the hope that it will be useful, -;but WITHOUT ANY WARRANTY; without even the implied warranty of -;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -;along with this programme; if not, write to the Free Software -;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. - - MACRO -$label Inc $c, $r1 -$label ADD$c $r1, $r1, #1 - MEND - - MACRO -$label IncS $c, $r1 -$label ADD$c.S $r1, $r1, #1 - MEND - - MACRO -$label Dec $c, $r1 -$label SUB$c $r1, $r1, #1 - MEND - - MACRO -$label DecS $c, $r1 -$label SUB$c.S $r1, $r1, #1 - MEND - - MACRO -$label Max $r1, $r2, $r3 - ;r1 = MAX (r2, r3) -$label CMP $r2, $r3 - MOVGT $r1, $r2 - MOVLE $r1, $r3 - MEND - - MACRO -$label Min $r1, $r2, $r3 - ;r1 = MIN (r2, r3) -$label CMP $r2, $r3 - MOVLT $r1, $r2 - MOVGE $r1, $r3 - MEND - - MACRO -$label MaxAB $r1, $r2 - ;r1 = MAX (r1, r2) -$label CMP $r1, $r2 - MOVLT $r1, $r2 - MEND - - MACRO -$label MinAB $r1, $r2 - ;r1 = MIN (r1, r2) -$label CMP $r1, $r2 - MOVGT $r1, $r2 - MEND - - MACRO -$label Abs $r1, $r2 - ;r1 = ABS (r2) -$label CMP $r2, #0 - MOVGE $r1, $r2 - RSBLT $r1, $r2, #0 - MEND - - MACRO -$label Sgn $r1, $r2 - ;r1 = SGN (r2) -$label CMP $r2, #0 - MOVGT $r1, #1 - MOVEQ $r1, #0 - MVNLT $r1, #0 - MEND - - MACRO -$label Dim $r1, $r2, $r3 - ;r1 = DIM (r2, r3) -$label CMP $r2, $r3 - SUBGT $r1, $r2, $r3 - MOVLE $r1, #0 - MEND - - MACRO -$label Sqr $c, $r1, $r2 - ;r1 = SQR (r2) -$label MUL$c $r1, $r2, $r2 - MEND - - MACRO -$label Bool $r1, $r2 - ;r1 = BOOL (r2) -$label TEQ $r2, #0 - MOVNE $r2, #True - MOVEQ $r2, #False - MEND - - MACRO -$label Int $r1, $r2 - ;r1 = INT (r2) -$label SUB $r1, $r2, #"0" - CMP $r1, #9 - SUBHI $r1, $r2, #"a" - CMPHI $r1, #5 - SUBHI $r1, $r2, #"A" - CMPHI $r1, #5 - ADDHI $r1, $r1, #10 - MEND - - MACRO -$label UChar $r1, $r2 - ;r1 = UCHAR (r2) -$label CMP $r2, #10 - ADDLT $r1, $r2, #"0" - ADDGE $r1, $r2, #"A"-10 - MEND - - MACRO -$label LChar $r1, $r2 - ;r1 = LCHAR (r2) -$label CMP $r2, #10 - ADDLT $r1, $r2, #"0" - ADDGE $r1, $r2, #"a"-10 - MEND - - MACRO -$label BinExp $c, $r1, $r2 - ;r1 = BINEXP (r2) -$label MOV$c $r1, #1 - MOV$c $r1, $r1, LSL $r2 - MEND - - MACRO -$label Align $c, $r1, $r2 - ;r1 = ALIGN (r2) -$label ADD$c $r1, $r2, #3 - BIC$c $r1, $r1, #3 - MEND - - MACRO -$label SetC - ;C=1 V=0 Z=0 N=0 -$label CMP PC, #0 - MEND - - MACRO -$label ClearFlags - ;C=0 V=0 Z=0 N=0 -$label CMN PC, #0 - MEND - - MACRO -$label ClrV -$label ClearFlags - MEND - - MACRO -$label ClrC -$label ClearFlags - MEND - - MACRO -$label ClrN -$label ClearFlags - MEND - - MACRO -$label SetV - ;C=0 V=1 Z=0 N=1 -$label CMP PC, #&80000000 - MEND - - MACRO -$label SetN - ;C=0 V=0 Z=0 N=1 -$label CMN PC, #&80000000 - MEND - - MACRO -$label SetZ - ;C=* V=* Z=1 N=0 -$label TST PC, #0 - MEND - - MACRO -$label ClrZ - ;C=* V=* Z=0 N=0 -$label TEQ PC, #0 - MEND - - MACRO -$label NOP -$label & 0 - MEND - - MACRO -$label DivRem $rc, $ra, $rb, $rtemp - ;rc := ra DIV rb; ra := ra REM rb; rb preserved, rtemp corrupt -$label MOV $rtemp, $rb - CMP $rtemp, $ra, LSR #1 -01 MOVLS $rtemp, $rtemp, LSL #1 - CMPLS $rtemp, $ra, LSR #1 - BLS %BT01 - MOV $rc, #0 -02 CMP $ra, $rtemp - SUBCS $ra, $ra, $rtemp - ADC $rc, $rc, $rc - MOV $rtemp, $rtemp, LSR #1 - CMP $rtemp, $rb - BCS %BT02 - MEND - - ] - END Modified: branches/simplified-build/!OsLib/Source/Macros/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Macros/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Macros/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,7 +2,6 @@ # List of modules comprising Macros # for inclusion in Make files independant of platform -# modules with no SWIs -MODULES += \ -Macros \ - +# Modules defined by handwritten .h, .AOFHdr and .ELFHdr files. +HDRMODULES = \ +Macros Modified: branches/simplified-build/!OsLib/Source/Makefile =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile 2007-04-29 21:55:38 UTC (rev 255) @@ -3,6 +3,11 @@ # Build type: CROSSGCC_AOF (default), CROSSGCC_ELF [NORCROFT_AOF: not supported yet] BUILDTYPE ?= CROSSGCC_AOF +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +else ifeq ($(BUILDTYPE),CROSSGCC_AOF) +else +$(error Unknown BUILDTYPE value) +endif include Makefile.setup.$(BUILDTYPE) .PHONY: all install release-oslib release-cstrong clean oslib cstrong BuildRequirements @@ -31,31 +36,31 @@ cd $(BUILDDIR) && $(GCCSDK_INSTALL_CROSSBIN)/zip -, -9r $(RELEASEDIR)/$(BUILDTYPE)/OSLibStrongHelp $(OSLIBCSTRONG) clean: + $(MAKE) -C Types/oslib $@ $(MAKE) -C Computer/oslib $@ $(MAKE) -C Core/oslib $@ $(MAKE) -C Macros/oslib $@ $(MAKE) -C Toolbox/oslib $@ - $(MAKE) -C Types/oslib $@ $(MAKE) -C User/oslib $@ -$(RM) $(BUILDDIR) oslib: $(OSLIBLIB) $(OSLIBLIB): BuildRequirements + $(MAKE) -C Types/oslib oslib $(MAKE) -C Computer/oslib oslib $(MAKE) -C Core/oslib oslib $(MAKE) -C Macros/oslib oslib $(MAKE) -C Toolbox/oslib oslib - $(MAKE) -C Types/oslib oslib $(MAKE) -C User/oslib oslib cd $(OBJDIR) && $(LIBFILE) $@ */*.o cstrong: $(OSLIBCSTRONG) $(OSLIBCSTRONG): BuildRequirements + $(MAKE) -C Types/oslib cstrong $(MAKE) -C Computer/oslib cstrong $(MAKE) -C Core/oslib cstrong $(MAKE) -C Macros/oslib cstrong $(MAKE) -C Toolbox/oslib cstrong - $(MAKE) -C Types/oslib cstrong $(MAKE) -C User/oslib cstrong cd $(BUILDDIR) && $(BINDHELP) $(CSTRONGDIR) $@ Modified: branches/simplified-build/!OsLib/Source/Makefile.inc =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.inc 2007-04-29 21:55:38 UTC (rev 255) @@ -1,19 +1,25 @@ # ... -ASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES)) -CHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES)) +# SWIMODULES and MODULES all have their .swi file. The former have one or +# more SWI's defined, the latter no SWI's at all. +# HDRMODULES only have handwritten .h, .AOFHdr and .ELFHdr files. +# ASMMODULES only have handwritten .asm (AOF) and .gas (ELF) assembler files. + +ASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES) $(HDRMODULES)) +CHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES) $(HDRMODULES)) CSTRONG = $(patsubst %,%.help,$(SWIMODULES) $(MODULES)) SWIOBJS = $(patsubst %,%.o,$(SWIMODULES)) -ASMOBJS = $(patsubst %,%.o,$(CMODULES)) +ASMOBJS = $(patsubst %,%.o,$(ASMMODULES)) -# To be generated from .swi files (only used for removing those files) -GENASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES)) -GENCHEADERS = $(patsubst %,%.h,$(SWIMODULES)) -GENCSTRONG = $(patsubst %,%.help,$(SWIMODULES)) +# Generated files from .swi files (only used for removing those files in clean +# rule) +GENASMHEADERS = $(patsubst %,%.Hdr,$(SWIMODULES) $(MODULES) $(HDRMODULES)) +GENCHEADERS = $(patsubst %,%.h,$(SWIMODULES) $(MODULES)) +GENCSTRONG = $(patsubst %,%.help,$(SWIMODULES) $(MODULES)) .PHONY: oslib cstrong clean -# Building one subdirectory in Source can not happen in parallel because ViaFile -# creation. +# Building inside one subdirectory of Source can not happen in parallel +# because of ViaFile creation in defmod. .NOTPARALLEL: # Targets: @@ -29,18 +35,28 @@ -$(RM) l/* -$(RM) $(GENASMHEADERS) $(GENCHEADERS) $(GENCSTRONG) $(SWIOBJS) $(ASMOBJS) -# convert arg to lower case +# Convert arg to lower case tolower = $(shell echo $(1) | tr '[A-Z]' '[a-z]';) #------------------------------------------------------------------------ # general rules: .SUFFIXES: -.SUFFIXES: .o .h .swi .Hdr .help .asm +.SUFFIXES: .o .h .swi .Hdr .AOFHdr .ELFHdr .help .asm .gas +# Source files: .h .swi .AOFHdr .ELFHdr .asm .gas +# Derived files: .o .h .help + # Assmebler header generation: .swi.Hdr: $(DEFMOD) -hdr < $< > $@ +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +.ELFHdr.Hdr: + if [ -s "$<" ]; then $(CP) $< $@; fi +else +.AOFHdr.Hdr: + if [ -s "$<" ]; then $(CP) $< $@; fi +endif # C header generation: .swi.h: @@ -58,6 +74,11 @@ $(DEFMOD) -cstrong -o $(CSTRONGDIR) < $< @touch $@ -# Object code generation (from .asm file): +# Object code generation (from .asm or .gas file): +ifeq ($(BUILDTYPE),CROSSGCC_ELF) +.gas.o: + $(AS) -o $@ $< +else .asm.o: - $(AS) -mapcs-32 -Wa,-apcs32 -o $@ $< + $(AS) -o $@ $< +endif Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-04-29 21:55:38 UTC (rev 255) @@ -25,12 +25,14 @@ export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := gcc -export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types +export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs-32 -Wa,-apcs32 export LIBFILE := libfile -c export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install +ASMEXT = .asm + OSLIBLIB = $(BUILDDIR)/OSLib32.o OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-04-29 21:55:38 UTC (rev 255) @@ -19,18 +19,20 @@ export BYTEWIDE := $(SOURCEDIR)/ByteWide export DEFMOD := $(BINDIR)/defmod -asmtype gccelf -export REDUCEAOF := $(BINDIR)/reduceaof +export REDUCEAOF := @echo Not needed for ELF build: reduceaof export BINDHELP := $(BINDIR)/bindhelp export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := arm-unknown-riscos-gcc -export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -export LIBFILE := arm-unknown-riscos-ar -r +export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs32 +export LIBFILE := arm-unknown-riscos-ar rs export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install +ASMEXT = .gas + OSLIBLIB = $(BUILDDIR)/OSLib32.o OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 Modified: branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Toolbox/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -1,8 +1,8 @@ # OSLib/Source/Toolbox/oslib/Modules # Modules definition for Toolbox Make -# modules containing SWIs -SWIMODULES += \ +# Modules containing SWIs +SWIMODULES = \ ActionButton \ Button \ ColourDbox \ @@ -38,17 +38,16 @@ Toolbox \ Window \ WindowSupportExternal \ -WritableField +WritableField -# modules with no SWIs -MODULES += \ +# Modules with no SWIs +MODULES = \ Adjuster \ FileDbox \ KeyboardShortcut \ Label \ LabelledBox \ -ResEd +ResEd -# modules defined other than by SWI definition -CMODULES += - +# Modules defined other than by SWI definition +ASMMODULES = Copied: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/ColTrans32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DOSFS32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/DeviceFS32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileCore32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/FileSwch32.help =================================================================== Modified: branches/simplified-build/!OsLib/Source/Types/oslib/Modules =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/Modules 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/Modules 2007-04-29 21:55:38 UTC (rev 255) @@ -2,8 +2,8 @@ # List of modules comprising Macros # for inclusion in Make files independant of platform -# modules with no SWIs -MODULES += \ +# Modules defined by handwritten .h, .AOFHdr and .ELFHdr files. +HDRMODULES = \ ColTrans32 \ DeviceFS32 \ DOSFS32 \ @@ -18,4 +18,3 @@ PDriver32 \ Types \ Wimp32 - Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.Hdr =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSArgs32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,20 @@ +;/* OSCore32.Hdr +;** Used by OSCore.HDR to create the short synonyms for 32-bit file handles +;** +;** Tony van der Hoff 10-11-01 +;*/ + + [ :LNOT: :DEF: OSCore32_Hdr + GBLL OSCore32_Hdr + + [ :LNOT: :DEF: OSF32_Hdr + GET OSLIB:oslib.Hdr.OSF32 + ] + + [ :LNOT: :DEF: OSLIB_F8 + ] + + ] + + + END Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,6 @@ +@ OSCore32.Hdr +@ Used by OSCore.Hdr to create the short synonyms for 32-bit file handles +@ +@ Tony van der Hoff 10-11-01 + +#include "oslib/OSF32.Hdr" Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,20 +0,0 @@ -;/* OSCore32.Hdr -;** Used by OSCore.HDR to create the short synonyms for 32-bit file handles -;** -;** Tony van der Hoff 10-11-01 -;*/ - - [ :LNOT: :DEF: OSCore32_Hdr - GBLL OSCore32_Hdr - - [ :LNOT: :DEF: OSF32_Hdr - GET OSLIB:oslib.Hdr.OSF32 - ] - - [ :LNOT: :DEF: OSLIB_F8 - ] - - ] - - - END Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSCore32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.AOFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,18 @@ +; OSF32.h +; creates a short-form synonym for OS_FW +; +; Tony van der Hoff 10-11-01 +; + + [ :LNOT: :DEF: OSF32_Hdr + GBLL OSF32_Hdr + + [ :LNOT: :DEF: OSLIB_F8 + GBLS $OS_F +;$OS_F SETS OS_FW ; TV 20021128 +OS_F SETS OS_FW + ] + + ] + + END Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr) =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr (rev 0) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.ELFHdr 2007-04-29 21:55:38 UTC (rev 255) @@ -0,0 +1,11 @@ +@ OSF32.h +@ creates a short-form synonym for OS_FW +@ +@ Tony van der Hoff 10-11-01 + +#ifndef OSF32_Hdr +# define OSF32_Hdr + +# define OS_F OS_FW + +#endif Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr =================================================================== --- branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr 2007-04-28 13:28:42 UTC (rev 254) +++ branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.Hdr 2007-04-29 21:55:38 UTC (rev 255) @@ -1,18 +0,0 @@ -; OSF32.h -; creates a short-form synonym for OS_FW -; -; Tony van der Hoff 10-11-01 -; - - [ :LNOT: :DEF: OSF32_Hdr - GBLL OSF32_Hdr - - [ :LNOT: :DEF: OSLIB_F8 - GBLS $OS_F -;$OS_F SETS OS_FW ; TV 20021128 -OS_F SETS OS_FW - ] - - ] - - END Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSF32.help =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.AOFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr) =================================================================== Copied: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.ELFHdr (from rev 246, branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr) =================================================================== Deleted: branches/simplified-build/!OsLib/Source/Types/oslib/OSFSCtrl32.Hdr ============... [truncated message content] |
From: <jt...@us...> - 2007-05-06 16:02:53
|
Revision: 265 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=265&view=rev Author: jtytgat Date: 2007-05-06 09:02:51 -0700 (Sun, 06 May 2007) Log Message: ----------- - Defined TOPHEADERDIR. - Defined CXX - Exported ASMEXT, OSLIBLIB and OSLIBCSTRONG. - Use the CPP preprocessor for assembler targets. - Makefile.setup.CROSSGCC_ELF: removed -mapcs32 assembler option (non existing option). Modified Paths: -------------- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-05-06 15:59:17 UTC (rev 264) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_AOF 2007-05-06 16:02:51 UTC (rev 265) @@ -12,7 +12,8 @@ export BUILDDIR := $(SOURCEDIR)/Build export RELEASEDIR := $(SOURCEDIR)/../Release -export HEADERDIR := $(BUILDDIR)/Header/oslib +export TOPHEADERDIR := $(BUILDDIR)/Header +export HEADERDIR := $(TOPHEADERDIR)/oslib export CSTRONGDIR := $(BUILDDIR)/CStrong export OBJDIR := $(BUILDDIR)/Objs export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions @@ -25,14 +26,15 @@ export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := gcc -export AS := gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs-32 -Wa,-apcs32 +export CXX := g++ +export AS := gcc -c -xassembler-with-cpp -I.. -I$(SOURCEDIR)/Types -mapcs-32 -Wa,-apcs32 export LIBFILE := libfile -c export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install -ASMEXT = .asm +export ASMEXT := .asm -OSLIBLIB = $(BUILDDIR)/OSLib32.o -OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 +export OSLIBLIB := $(BUILDDIR)/OSLib32.o +export OSLIBCSTRONG := $(BUILDDIR)/OSLib,3d6 Modified: branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF =================================================================== --- branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-05-06 15:59:17 UTC (rev 264) +++ branches/simplified-build/!OsLib/Source/Makefile.setup.CROSSGCC_ELF 2007-05-06 16:02:51 UTC (rev 265) @@ -12,7 +12,8 @@ export BUILDDIR := $(SOURCEDIR)/Build export RELEASEDIR := $(SOURCEDIR)/../Release -export HEADERDIR := $(BUILDDIR)/Header/oslib +export TOPHEADERDIR := $(BUILDDIR)/Header +export HEADERDIR := $(TOPHEADERDIR)/oslib export CSTRONGDIR := $(BUILDDIR)/CStrong export OBJDIR := $(BUILDDIR)/Objs export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions @@ -25,14 +26,15 @@ export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH) export CC := arm-unknown-riscos-gcc -export AS := arm-unknown-riscos-gcc -c -xassembler -I.. -I$(SOURCEDIR)/Types -mapcs32 +export CXX := arm-unknown-riscos-g++ +export AS := arm-unknown-riscos-gcc -c -xassembler-with-cpp -I.. -I$(SOURCEDIR)/Types export LIBFILE := arm-unknown-riscos-ar rs export MKDIR := mkdir -p export RM := rm -rf export CP := cp -r export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install -ASMEXT = .gas +export ASMEXT := .gas -OSLIBLIB = $(BUILDDIR)/OSLib32.o -OSLIBCSTRONG = $(BUILDDIR)/OSLib,3d6 +export OSLIBLIB := $(BUILDDIR)/OSLib32.o +export OSLIBCSTRONG := $(BUILDDIR)/OSLib,3d6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2007-06-20 00:13:16
|
Revision: 276 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=276&view=rev Author: jtytgat Date: 2007-06-19 17:13:15 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Update of svn:ignore properties Property Changed: ---------------- branches/simplified-build/!OsLib/Source/ branches/simplified-build/!OsLib/Source/Macros/oslib/ branches/simplified-build/!OsLib/Source/Types/oslib/ Property changes on: branches/simplified-build/!OsLib/Source ___________________________________________________________________ Name: svn:ignore - HelpData OSLib,3d6 *.o *.o,* o *.list + Build Property changes on: branches/simplified-build/!OsLib/Source/Macros/oslib ___________________________________________________________________ Name: svn:ignore + Macros.Hdr Property changes on: branches/simplified-build/!OsLib/Source/Types/oslib ___________________________________________________________________ Name: svn:ignore + Types.Hdr This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |