notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better port to newer libpicofe
[ginge.git]
/
loader
/
Makefile
diff --git
a/loader/Makefile
b/loader/Makefile
index
d50bcd5
..
b11da94
100644
(file)
--- a/
loader/Makefile
+++ b/
loader/Makefile
@@
-2,12
+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 -lpthread -lrt
+CFLAGS += -Wall -ggdb
-DLOADER
+LDFLAGS += -ggdb -lpthread -lrt
ifndef DEBUG
CFLAGS += -O2 -fno-strict-aliasing
LDFLAGS += -s -O2
endif
ifndef DEBUG
CFLAGS += -O2 -fno-strict-aliasing
LDFLAGS += -s -O2
endif
+ifdef DBG
+CFLAGS += -DDBG=$(DBG)
+endif
ifeq "$(ARCH)" "ia32"
ARCH = ia32
ifeq "$(ARCH)" "ia32"
ARCH = ia32
@@
-17,18
+20,46
@@
ASFLAGS += --32
endif
ifeq "$(ARCH)" "arm"
ASFLAGS += -mfloat-abi=soft
endif
ifeq "$(ARCH)" "arm"
ASFLAGS += -mfloat-abi=soft
-OBJ += sys_cacheflush.o
+OBJ += sys_cacheflush.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)
-TARGET = ginge_sloader
-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
+OBJ += ../common/libpicofe/input.o
+OBJ += ../common/libpicofe/linux/plat.o
+OBJ += ../common/libpicofe/linux/in_evdev.o
+OBJ_S += $(OBJ) loader.o loader_$(ARCH).o patches.o
+OBJ_D += $(OBJ) dl.o
-$(TARGET): LDFLAGS += -Wl,-T script_$(ARCH).lds
+all: $(TARGET_S) $(TARGET_D)
-$(TARGET): $(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) $(TARGET) $(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