wip, most of my SD static bins work
[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 -lpthread -lrt
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
25TARGET = ginge_sloader
26OBJ += loader.o loader_$(ARCH).o patches.o emu.o host_fb.o host_pnd.o
27
28$(TARGET): LDFLAGS += -Wl,-T script_$(ARCH).lds
29
30$(TARGET): $(OBJ)
31 $(CC) -o $@ $^ $(LDFLAGS)
32
33clean:
34 $(RM) $(TARGET) $(OBJ)