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] |