summaryrefslogtreecommitdiff
path: root/Makefile-riscos
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile-riscos')
-rw-r--r--Makefile-riscos52
1 files changed, 52 insertions, 0 deletions
diff --git a/Makefile-riscos b/Makefile-riscos
new file mode 100644
index 0000000..d7c938b
--- /dev/null
+++ b/Makefile-riscos
@@ -0,0 +1,52 @@
+# Toolchain definitions for building for RISC OS using the GCCSDK cross-compiler
+GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
+GCCSDK_INSTALL_ENV ?= /home/riscos/env
+
+CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+AR := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
+LD := $(CC)
+
+CP := cp
+RM := rm
+MKDIR := mkdir
+MV := mv
+ECHO := echo
+MAKE := make
+PERL := perl
+PKGCONFIG := $(GCCSDK_INSTALL_ENV)/ro-pkg-config
+INSTALL := install
+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 :=
+
+ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
+ EXEEXT := ,e1f
+else
+ EXEEXT := ,ff8
+endif
+
+# Default installation prefix
+PREFIX ?= $(GCCSDK_INSTALL_ENV)
+
+include build/Makefile.common