ARCH ?= arm CROSS_COMPILE ?= arm-linux- CC = $(CROSS_COMPILE)gcc AS = $(CROSS_COMPILE)as CFLAGS += -Wall -ggdb LDFLAGS += -static -ggdb -lpthread -lrt ifndef DEBUG CFLAGS += -O2 -fno-strict-aliasing LDFLAGS += -s -O2 endif ifeq "$(ARCH)" "ia32" ARCH = ia32 CFLAGS += -m32 LDFLAGS += -m32 ASFLAGS += --32 endif ifeq "$(ARCH)" "arm" ASFLAGS += -mfloat-abi=soft OBJ += sys_cacheflush.o endif vpath %.c = ../common/ TARGET = ginge_sloader OBJ += loader.o loader_$(ARCH).o patches.o emu.o host_fb.o host_pnd.o $(TARGET): LDFLAGS += -Wl,-T script_$(ARCH).lds $(TARGET): $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) clean: $(RM) $(TARGET) $(OBJ)