update build, use common fb code
[ginge.git] / loader / Makefile
... / ...
CommitLineData
1ARCH ?= arm
2CROSS_COMPILE ?= arm-linux-
3CC = $(CROSS_COMPILE)gcc
4AS = $(CROSS_COMPILE)as
5CFLAGS += -Wall -ggdb
6LDFLAGS += -static -ggdb
7ifndef DEBUG
8CFLAGS += -O2 -fno-strict-aliasing
9LDFLAGS += -s -O2
10endif
11
12ifeq "$(ARCH)" "ia32"
13ARCH = ia32
14CFLAGS += -m32
15LDFLAGS += -m32
16ASFLAGS += --32
17endif
18ifeq "$(ARCH)" "arm"
19ASFLAGS += -mfloat-abi=soft
20OBJ += sys_cacheflush.o
21endif
22
23vpath %.c = ../common/
24
25OBJ += loader.o loader_$(ARCH).o patches.o emu.o host_fb.o host_pnd.o
26
27ginge_sloader: LDFLAGS += -Wl,-T script_$(ARCH).lds
28
29ginge_sloader: $(OBJ)
30 $(CC) -o $@ $^ $(LDFLAGS)
31
32clean:
33 $(RM) loader $(OBJ)