diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2021-08-15 23:31:39 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2021-08-15 23:31:39 +0100 |
commit | deb692c00afecca0d73394feef6e99e51606b9b4 (patch) | |
tree | 988fb7a4ebb419ea58d4316bdab09711de7d51b2 | |
parent | ce3664d296b9b2459c4251321cb3f90adc32972d (diff) | |
download | librufl-deb692c00afecca0d73394feef6e99e51606b9b4.tar.gz librufl-deb692c00afecca0d73394feef6e99e51606b9b4.tar.bz2 |
Make it possible to build for non-RISC OS hosts
Linking fails, and the path to the OSLib headers is hard-coded,
but it's a start.
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -14,7 +14,10 @@ TESTRUNNER := $(ECHO) # Toolchain flags WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs -pedantic + -Wmissing-declarations -Wnested-externs +ifeq ($(HOST),arm-unknown-riscos) + WARNFLAGS := $(WARNFLAGS) -pedantic +endif # BeOS/Haiku/AmigaOS4 standard library headers create warnings ifneq ($(BUILD),i586-pc-haiku) ifneq ($(findstring amigaos,$(BUILD)),amigaos) @@ -35,6 +38,12 @@ ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) CFLAGS := $(CFLAGS) -I$(PREFIX)/include LDFLAGS := $(LDFLAGS) -lOSLib32 TESTLDFLAGS := $(TESTLDFLAGS) -static + else + # Regardless of the host platform we're building for, we + # still need the RISC OS build environment because we need the + # OSLib headers. + # XXX: is there a way to avoid this path being hard-coded? + CFLAGS := $(CFLAGS) -I/opt/netsurf/arm-unknown-riscos/env/include endif endif |