-
Notifications
You must be signed in to change notification settings - Fork 13
/
common.mk
38 lines (29 loc) · 950 Bytes
/
common.mk
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
# Disable makepp's builtin rules as they're not particularly cross-compile-y
makepp_no_builtin := 1
include $(ROOT)/config.mk
# Commands
CC := $(PREFIX)gcc
AR := $(PREFIX)ar
OBJCOPY := $(PREFIX)objcopy
PYTHON := hostpython
# Flags
CFLAGS := -g -Wall -O2 -pipe -fomit-frame-pointer -std=gnu99 -Werror
CPPFLAGS :=
CPPDEPS :=
PYCFLAGS := -pipe -fomit-frame-pointer -fno-strict-aliasing -Werror -Wno-error=char-subscripts -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable
LDFLAGS :=
LDDEPS :=
# Get machine-specific stuff
include $(ROOT)/config/$(ARCH)/$(ARCH).mk
include $(ROOT)/config/$(ARCH)/$(MACH).mk
PYTHONVER := 2.7.3
PYTHONVERMINOR := 2.7
# Rules
ifndef USE_BINARIES
%.o: %.c $(prebuild $(CPPDEPS))
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(input) -o $(output)
%.o: %.S $(prebuild $(CPPDEPS))
$(CC) $(ASFLAGS) $(CPPFLAGS) -c $(input) -o $(output)
%.o: %.s
$(CC) $(ASFLAGS) -c $(input) -o $(output)
endif