summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.norcroft
blob: 5acb7c4f386bc3041a121b4c2727bfcce1fe4236 (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
# Norcroft specific toolchain setup

CCDEF := -D
CCOPT := -Otime
CCNOOPT :=
CCDBG := -g
CCINC := -I
CCLIB := -L
# TODO: Norcroft CC cannot do assembler as C
CCAS :=
CCSHR :=

CXXDEF := -D
CXXOPT := -O2
CXXNOOPT := -O0
CXXDBG := -g
CXXINC := -I
CXXLIB := -L
CXXSHR := -fPIC

LDDBG := -g
LDSHR :=

ARFLG := -c

# Definitions of various attributes
CFLAGS := $(CFLAGS) -D_ALIGNED=""

# Extensions for coverage target
ifeq ($(MAKECMDGOALS),coverage)
  $(error Coverage is not supported with Norcroft)
endif

# Extensions for profile target
ifeq ($(MAKECMDGOALS),profile)
  $(error Profile is not supported with Norcroft)
endif

# RISC OS module extensions
ifeq ($(COMPONENT_TYPE),riscos-module)
  ifneq ($(BUILD),arm-unknown-riscos)
    $(error Attempting to build a RISC OS module for a non-RISC OS target)
  endif

  CFLAGS := $(CFLAGS) -zM
  CXXFLAGS := $(CXXFLAGS) -zM
  LDFLAGS := $(LDFLAGS) -zM
endif

###############################################################################
# Other settings
###############################################################################

# Determine if the compiler supports simultaneous build & dep.
CC_CANNOT_DEP := yes