r5270 jmb - in /trunk/libparserutils: Makefile-ronative build/Makefile.common test/Makefile

netsurf at semichrome.net netsurf at semichrome.net
Sun Sep 7 14:32:02 BST 2008


Author: jmb
Date: Sun Sep  7 08:32:01 2008
New Revision: 5270

URL: http://source.netsurf-browser.org?rev=5270&view=rev
Log:
Native RO makefile. Don't expect anything other than make/make debug to actually work thanks to insane amounts of buggy behaviour in the OS/runtime that I can't find the energy to work around.

Added:
    trunk/libparserutils/Makefile-ronative
Modified:
    trunk/libparserutils/build/Makefile.common
    trunk/libparserutils/test/Makefile

Added: trunk/libparserutils/Makefile-ronative
URL: http://source.netsurf-browser.org/trunk/libparserutils/Makefile-ronative?rev=5270&view=auto
==============================================================================
--- trunk/libparserutils/Makefile-ronative (added)
+++ trunk/libparserutils/Makefile-ronative Sun Sep  7 08:32:01 2008
@@ -1,0 +1,56 @@
+# Toolchain definitions for building on RISC OS
+GCCSDK_INSTALL_ENV ?= <NSLibs$$Dir>
+
+CC := gcc
+AR := ar
+LD := gcc
+
+CP := cp
+RM := rm
+MKDIR := mkdir
+MV := mv
+ECHO := echo
+MAKE := make
+PERL := perl
+PKGCONFIG := echo
+INSTALL := echo
+SED := sed
+TOUCH := touch
+LCOV := echo
+GENHTML := echo
+
+# Toolchain flags
+WARNFLAGS := -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
+	-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+	-Wmissing-declarations -Wnested-externs -Werror -pedantic
+CFLAGS = -std=c99 -D_BSD_SOURCE -I$(TOP)/include/ $(WARNFLAGS) \
+	-mpoke-function-name
+RELEASECFLAGS = $(CFLAGS) -DNDEBUG -O2
+DEBUGCFLAGS = $(CFLAGS) -O0 -g
+ARFLAGS := -cru
+LDFLAGS = -L$(TOP)/
+
+CPFLAGS :=
+RMFLAGS := -f
+MKDIRFLAGS := -p
+MVFLAGS := 
+ECHOFLAGS := 
+MAKEFLAGS :=
+PKGCONFIGFLAGS :=
+TOUCHFLAGS :=
+
+EXEEXT :=
+
+# Default installation prefix
+PREFIX ?= $(GCCSDK_INSTALL_ENV)
+
+# This is nasty, but needed because $(CURDIR) will 
+# contain colons, and thus confuse make mightily
+$(shell SetMacro Alias$$LPUpwd Set %0 <FileSwitch$$CurrentFilingSystem>:|<FileSwitch$$<FileSwitch$$CurrentFilingSystem>$$CSD>|mUnset Alias$$LPUpwd)
+$(shell LPUpwd LibParserUtils$$Dir)
+TOP := <LibParserUtils$$Dir>
+
+# Tell everyone that we're building on RISC OS, so they can work around things.
+HOST := riscos
+
+include build/Makefile.common

Modified: trunk/libparserutils/build/Makefile.common
URL: http://source.netsurf-browser.org/trunk/libparserutils/build/Makefile.common?rev=5270&r1=5269&r2=5270&view=diff
==============================================================================
--- trunk/libparserutils/build/Makefile.common (original)
+++ trunk/libparserutils/build/Makefile.common Sun Sep  7 08:32:01 2008
@@ -7,8 +7,8 @@
 COMPONENT := libparserutils
 
 # Environment
-EXPORT := $(CURDIR)/dist
-TOP := $(CURDIR)
+TOP ?= $(CURDIR)
+EXPORT := $(TOP)/dist
 RELEASEDIR := build/Release
 DEBUGDIR := build/Debug
 COVERAGEDIR := build/coverage

Modified: trunk/libparserutils/test/Makefile
URL: http://source.netsurf-browser.org/trunk/libparserutils/test/Makefile?rev=5270&r1=5269&r2=5270&view=diff
==============================================================================
--- trunk/libparserutils/test/Makefile (original)
+++ trunk/libparserutils/test/Makefile Sun Sep  7 08:32:01 2008
@@ -71,8 +71,14 @@
 endef
 
 # Build rules for each test binary -- they all depend on the debug library
+# Except when building on RISC OS, of course because then make utterly fails to
+# detect that the debug library exists.
 define compile_test
+ifeq ($(HOST),riscos)
+$(2): $(1)
+else
 $(2): $$(TOP)/$$(COMPONENT)-debug.a $(1)
+endif
 	@$$(ECHO) $$(ECHOFLAGS) "==> $(1)"
 	@$$(CC) -c -g $$(DEBUGCFLAGS) -o $$@.o $(1)
 	@$$(LD) -g -o $$@ $$@.o $$(LDFLAGS) -lparserutils-debug




More information about the netsurf-commits mailing list