notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow arguments and fix environment handling
[ginge.git]
/
loader
/
Makefile
diff --git
a/loader/Makefile
b/loader/Makefile
index
67dd24c
..
49cf11f
100644
(file)
--- a/
loader/Makefile
+++ b/
loader/Makefile
@@
-1,9
+1,15
@@
+ARCH ?= arm
+CROSS_COMPILE ?= arm-linux-
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
CFLAGS += -Wall -ggdb
LDFLAGS += -static -ggdb
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
CFLAGS += -Wall -ggdb
LDFLAGS += -static -ggdb
+ifndef DEBUG
+CFLAGS += -O2 -fno-strict-aliasing
+LDFLAGS += -s -O2
+endif
-if
ndef ARCH
+if
eq "$(ARCH)" "ia32"
ARCH = ia32
CFLAGS += -m32
LDFLAGS += -m32
ARCH = ia32
CFLAGS += -m32
LDFLAGS += -m32
@@
-14,11
+20,14
@@
ASFLAGS += -mfloat-abi=soft
OBJ += sys_cacheflush.o
endif
OBJ += sys_cacheflush.o
endif
-OBJ += loader.o loader_$(ARCH).o patches.o emu.o
+vpath %.c = ../common/
+
+OBJ += loader.o loader_$(ARCH).o patches.o emu.o host_fb.o host_pnd.o
-loader: $(OBJ)
+ginge_sloader: LDFLAGS += -Wl,-T script_$(ARCH).lds
-loader: LDFLAGS += -Wl,-T script_$(ARCH).lds
+ginge_sloader: $(OBJ)
+ $(CC) -o $@ $^ $(LDFLAGS)
clean:
$(RM) loader $(OBJ)
clean:
$(RM) loader $(OBJ)