notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try to handle exec-gp2xmenu exit
[ginge.git]
/
loader
/
Makefile
diff --git
a/loader/Makefile
b/loader/Makefile
index
49cf11f
..
f326814
100644
(file)
--- a/
loader/Makefile
+++ b/
loader/Makefile
@@
-2,11
+2,15
@@
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
CROSS_COMPILE ?= arm-linux-
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
-CFLAGS += -Wall -ggdb
-LDFLAGS += -static -ggdb
+CFLAGS += -Wall -ggdb -DLOADER
+LDFLAGS += -ggdb
+#LDFLAGS += -nodefaultlibs # NYET
ifndef DEBUG
CFLAGS += -O2 -fno-strict-aliasing
ifndef DEBUG
CFLAGS += -O2 -fno-strict-aliasing
-LDFLAGS += -s -O2
+LDFLAGS += -O2
+endif
+ifdef DBG
+CFLAGS += -DDBG=$(DBG)
endif
ifeq "$(ARCH)" "ia32"
endif
ifeq "$(ARCH)" "ia32"
@@
-17,17
+21,43
@@
ASFLAGS += --32
endif
ifeq "$(ARCH)" "arm"
ASFLAGS += -mfloat-abi=soft
endif
ifeq "$(ARCH)" "arm"
ASFLAGS += -mfloat-abi=soft
-OBJ += sys_cacheflush.o
+OBJ += syscalls.o emu_arm.o
+endif
+ifdef PND
+CFLAGS += -DPND
+TAG = _pnd
+endif
+ifdef WIZ
+CFLAGS += -DWIZ
+OBJ += wiz_video_arm.o
+TAG = _wiz
endif
vpath %.c = ../common/
endif
vpath %.c = ../common/
+vpath %.s = ../common/
+
+TARGET_S = ginge_sloader$(TAG)
+TARGET_D = ginge_dyn$(TAG)
-OBJ += loader.o loader_$(ARCH).o patches.o emu.o host_fb.o host_pnd.o
+OBJ += emu.o host.o host_fb.o cmn.o llibc.o
+OBJ_S += $(OBJ) loader.o loader_$(ARCH).o patches.o
+OBJ_D += $(OBJ) dl.o
-ginge_sloader: LDFLAGS += -Wl,-T script_$(ARCH).lds
+all: $(TARGET_S) $(TARGET_D)
-ginge_sloader: $(OBJ)
- $(CC) -o $@ $^ $(LDFLAGS)
+$(TARGET_S): LDFLAGS += -Wl,-T script_$(ARCH).lds
+$(TARGET_D): LDFLAGS += -ldl -Wl,--version-script=ginge_dyn.symver
+
+$(TARGET_S): $(OBJ_S)
+ $(CC) -o $@ $^ -static $(LDFLAGS)
+
+$(TARGET_D): $(OBJ_D)
+ $(CC) -o $@ $^ -shared $(LDFLAGS)
clean:
clean:
- $(RM) loader $(OBJ)
+ $(RM) $(TARGET_S) $(TARGET_D) $(OBJ_S) $(OBJ_D)
+
+# basic deps
+dl.o patches.o: override.c
+*.o: header.h
+host_fb.o: libpicofe/linux/fbdev.c