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