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/Makefile100
1 files changed, 100 insertions, 0 deletions
diff --git a/utils/wpseditor/libwps/Makefile b/utils/wpseditor/libwps/Makefile
new file mode 100644
index 0000000000..3779a9ed30
--- /dev/null
+++ b/utils/wpseditor/libwps/Makefile
@@ -0,0 +1,100 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9ROOT=../../..
10
11OS = w32
12CC = gcc
13MKDIR = mkdir -p
14
15ifeq ($(findstring MINGW,$(shell uname)),MINGW)
16OS = w32
17CC = mingw32-gcc
18COPY = copy
19RM = rm
20endif
21
22ifeq ($(findstring Linux,$(shell uname)),Linux)
23OS = linux
24CC = gcc
25COPY = cp
26RM = rm -f
27endif
28
29
30
31COMMON= \
32 src/dummies.c \
33 src/api.c \
34 src/lcd.c \
35 $(ROOT)/apps/gui/wps_parser.c \
36 $(ROOT)/apps/gui/wps_debug.c \
37 $(ROOT)/firmware/font.c \
38 $(ROOT)/apps/misc.c \
39 $(ROOT)/apps/gui/gwps-common.c \
40 $(ROOT)/apps/status.c \
41 $(ROOT)/apps/recorder/peakmeter.c \
42 $(ROOT)/apps/recorder/icons.c \
43 $(ROOT)/apps/gui/scrollbar.c \
44 $(ROOT)/firmware/common/timefuncs.c \
45 $(ROOT)/firmware/common/unicode.c \
46 $(ROOT)/firmware/common/ctype.c \
47 $(ROOT)/firmware/id3.c \
48 $(ROOT)/firmware/font_cache.c \
49 $(ROOT)/firmware/lru.c \
50 $(ROOT)/firmware/mp3data.c \
51 $(ROOT)/firmware/replaygain.c
52
53# $(ROOT)/apps/recorder/bmp.c
54# $(ROOT)/apps/abrepeat.c \
55# $(ROOT)/apps/action.c \
56# $(ROOT)/apps/cuesheet.c \
57# $(ROOT)/apps/gui/statusbar.c \
58# $(ROOT)/apps/gui/gwps.c \
59
60INCLUDE=-I src/include \
61 -I $(ROOT)/apps/gui \
62 -I $(ROOT)/firmware/export \
63 -I $(ROOT)/firmware/include \
64 -I $(ROOT)/apps/recorder \
65 -I $(ROOT)/apps \
66 -I src
67
68CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
69
70all:
71 @echo To build, run the buildall.sh script
72
73build: build-$(OS)
74
75build-w32: src/proxy.c $(COMMON)
76 @echo CC [$(TARGET)]
77 @$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -DBUILD_DLL $(COMMON) -shared src/proxy.c -o libwps_$(MODEL).dll
78
79build-linux: src/proxy.c $(COMMON)
80 @echo CC [$(TARGET)]
81 @$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -shared -Wl,-soname,libwps_$(MODEL).so,-olibwps_$(MODEL).so -fPIC $(COMMON) src/proxy.c
82
83clean: clean-$(OS)
84
85clean-w32:
86 $(RM) "libwps_$(MODEL).dll"
87
88clean-linux:
89 $(RM) "libwps_$(MODEL).so.1"
90
91shared: shared-$(OS)
92
93shared-w32: src/proxy.c $(COMMON)
94 @echo CC [IRIVER_H10_5GB]
95 @$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -DBUILD_DLL $(COMMON) -shared src/proxy.c -o ../gui/bin/libwps.dll
96
97shared-linux: src/proxy.c $(COMMON)
98 @echo CC [IRIVER_H10_5GB]
99 @$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -shared -Wl,-soname,libwps.so,-olibwps.so -fPIC $(COMMON) src/proxy.c
100 @$(COPY) libwps.so ../gui/bin/libwps.so