summaryrefslogtreecommitdiff
path: root/Makefile-ronative
blob: d4c4f90028cbe1b87d1739e8f36215202d5714b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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
# As good a way of doing nothing as we get, really (FX 1 == set user flag, X ignores errors)
PKGCONFIG := X FX 1
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 -I$(GCCSDK_INSTALL_ENV)/include
RELEASECFLAGS = $(CFLAGS) -DNDEBUG -O2
DEBUGCFLAGS = $(CFLAGS) -O0 -g
ARFLAGS := -cru
LDFLAGS = -L$(GCCSDK_INSTALL_ENV)/lib -lparserutils -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$$Hubbubpwd Set %0 <FileSwitch$$CurrentFilingSystem>:|<FileSwitch$$<FileSwitch$$CurrentFilingSystem>$$CSD>|mUnset Alias$$Hubbubpwd)
$(shell Hubbubpwd Hubbub$$Dir)
TOP := <Hubbub$$Dir>

# Tell everyone that we're building on RISC OS, so they can work around things.
HOST := riscos

include build/Makefile.common