summaryrefslogtreecommitdiff
path: root/utils/wpseditor/libwps/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/libwps/Makefile')
-rw-r--r--utils/wpseditor/libwps/Makefile113
1 files changed, 50 insertions, 63 deletions
diff --git a/utils/wpseditor/libwps/Makefile b/utils/wpseditor/libwps/Makefile
index c5d0a39de1..879cc8e4db 100644
--- a/utils/wpseditor/libwps/Makefile
+++ b/utils/wpseditor/libwps/Makefile
@@ -8,15 +8,13 @@
8# 8#
9ROOT=../../.. 9ROOT=../../..
10 10
11OS = w32 11ifneq ($or($(findstring MINGW,$(shell uname)),$(findstring Windows_NT,$(OS))),)
12CC = gcc
13MKDIR = mkdir -p
14
15ifeq ($(findstring MINGW,$(shell uname)),MINGW)
16 OS = w32 12 OS = w32
17 CC = mingw32-gcc 13 CC = mingw32-gcc
18 COPY = copy 14 COPY = copy
19 RM = rm 15 RM = del
16 EXT = .dll
17 LDFLAGS = -DBUILD_DLL
20endif 18endif
21 19
22ifeq ($(findstring Linux,$(shell uname)),Linux) 20ifeq ($(findstring Linux,$(shell uname)),Linux)
@@ -24,39 +22,48 @@ ifeq ($(findstring Linux,$(shell uname)),Linux)
24 CC = gcc 22 CC = gcc
25 COPY = cp 23 COPY = cp
26 RM = rm -f 24 RM = rm -f
25 EXT = .so
26 LDFLAGS = -fPIC
27endif 27endif
28 28
29 29TARGETS=IRIVER_H10 \
30 IRIVER_H10_5GB \
31 IPOD_COLOR \
32 IPOD_NANO \
33 IPOD_VIDEO \
34 GIGABEAT_F \
35 GIGABEAT_S \
36 SANSA_E200 \
37 SANSA_C200
30 38
31SOURCES= \ 39SOURCES= \
32 src/api.c \ 40 src/api.c \
33 src/dummies.c \ 41 src/dummies.c \
34 src/lcd.c \ 42 src/lcd.c \
35 src/proxy.c \ 43 src/proxy.c \
36 $(ROOT)/apps/gui/scrollbar.c \ 44 $(ROOT)/apps/gui/scrollbar.c \
37 $(ROOT)/apps/gui/gwps-common.c \ 45 $(ROOT)/apps/gui/gwps-common.c \
38 $(ROOT)/apps/gui/wps_parser.c \ 46 $(ROOT)/apps/gui/wps_parser.c \
39 $(ROOT)/apps/gui/wps_debug.c \ 47 $(ROOT)/apps/gui/wps_debug.c \
40 $(ROOT)/apps/recorder/peakmeter.c \ 48 $(ROOT)/apps/recorder/peakmeter.c \
41 $(ROOT)/apps/recorder/icons.c \ 49 $(ROOT)/apps/recorder/icons.c \
42 $(ROOT)/apps/misc.c \ 50 $(ROOT)/apps/misc.c \
43 $(ROOT)/apps/status.c \ 51 $(ROOT)/apps/status.c \
44 $(ROOT)/firmware/common/ctype.c \ 52 $(ROOT)/firmware/common/ctype.c \
45 $(ROOT)/firmware/common/timefuncs.c \ 53 $(ROOT)/firmware/common/timefuncs.c \
46 $(ROOT)/firmware/common/unicode.c \ 54 $(ROOT)/firmware/common/unicode.c \
47 $(ROOT)/firmware/font.c \ 55 $(ROOT)/firmware/font.c \
48 $(ROOT)/firmware/font_cache.c \ 56 $(ROOT)/firmware/font_cache.c \
49 $(ROOT)/firmware/id3.c \ 57 $(ROOT)/firmware/id3.c \
50 $(ROOT)/firmware/lru.c \ 58 $(ROOT)/firmware/lru.c \
51 $(ROOT)/firmware/mp3data.c \ 59 $(ROOT)/firmware/mp3data.c \
52 $(ROOT)/firmware/replaygain.c 60 $(ROOT)/firmware/replaygain.c
53 61# $(ROOT)/apps/recorder/bmp.c
54# $(ROOT)/apps/recorder/bmp.c 62# $(ROOT)/apps/abrepeat.c \
55# $(ROOT)/apps/abrepeat.c \ 63# $(ROOT)/apps/action.c \
56# $(ROOT)/apps/action.c \ 64# $(ROOT)/apps/cuesheet.c \
57# $(ROOT)/apps/cuesheet.c \ 65# $(ROOT)/apps/gui/statusbar.c \
58# $(ROOT)/apps/gui/statusbar.c \ 66# $(ROOT)/apps/gui/gwps.c \
59# $(ROOT)/apps/gui/gwps.c \
60 67
61INCLUDE=-I src/include \ 68INCLUDE=-I src/include \
62 -I $(ROOT)/apps/gui \ 69 -I $(ROOT)/apps/gui \
@@ -68,34 +75,14 @@ INCLUDE=-I src/include \
68 75
69CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE 76CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
70 77
71all: 78RESULTS := $(patsubst %,libwps_%$(EXT),$(TARGETS))
72 @echo To build, run the buildall.sh script
73
74build: build-$(OS)
75
76build-w32: $(SOURCES)
77 @echo CC [$(TARGET)]
78 @$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -DBUILD_DLL $(SOURCES) -shared -o libwps_$(MODEL).dll
79
80build-linux: $(SOURCES)
81 @echo CC [$(TARGET)]
82 @$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -shared -Wl,-soname,libwps_$(MODEL).so,-olibwps_$(MODEL).so -fPIC $(SOURCES)
83
84clean: clean-$(OS)
85
86clean-w32:
87 $(RM) "libwps_$(MODEL).dll"
88
89clean-linux:
90 $(RM) "libwps_$(MODEL).so"
91 79
92shared: shared-$(OS) 80all: $(RESULTS)
81 @$(COPY) $(RESULTS) ../gui/bin/
93 82
94shared-w32: $(SOURCES) 83libwps_%$(EXT): $(SOURCES)
95 @echo CC [IRIVER_H10_5GB] 84 @echo CC [$(subst libwps_,,$(subst $(EXT),,$@))]
96 @$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -DBUILD_DLL -shared $(SOURCES) -o ../gui/bin/libwps_h10_5gb.dll 85 @$(CC) $(INCLUDE) $(CFLAGS) -D$(subst libwps_,,$(subst $(EXT),,$@)) $(LDFLAGS) -shared -o $@ $+
97 86
98shared-linux: $(SOURCES) 87clean:
99 @echo CC [IRIVER_H10_5GB] 88 $(RM) $(RESULTS)
100 @$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -shared -Wl,-soname,libwps_h10_5gb.so,-olibwps_h10_5gb.so -fPIC $(SOURCES)
101 @$(COPY) libwps_h10_5gb.so ../gui/bin/libwps_h10_5gb.so