2008-08-29 21:08:38 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
ROOT=../../..
|
|
|
|
|
|
|
|
OS = w32
|
|
|
|
CC = gcc
|
|
|
|
MKDIR = mkdir -p
|
|
|
|
|
|
|
|
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
2008-09-03 19:24:50 +00:00
|
|
|
OS = w32
|
|
|
|
CC = mingw32-gcc
|
|
|
|
COPY = copy
|
|
|
|
RM = rm
|
2008-08-29 21:08:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(findstring Linux,$(shell uname)),Linux)
|
2008-09-03 19:24:50 +00:00
|
|
|
OS = linux
|
|
|
|
CC = gcc
|
|
|
|
COPY = cp
|
|
|
|
RM = rm -f
|
2008-08-29 21:08:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
SOURCES= \
|
2008-08-29 21:08:38 +00:00
|
|
|
src/api.c \
|
2008-09-03 19:24:50 +00:00
|
|
|
src/dummies.c \
|
2008-08-29 21:08:38 +00:00
|
|
|
src/lcd.c \
|
2008-09-03 19:24:50 +00:00
|
|
|
src/proxy.c \
|
|
|
|
$(ROOT)/apps/gui/scrollbar.c \
|
|
|
|
$(ROOT)/apps/gui/gwps-common.c \
|
2008-08-29 21:08:38 +00:00
|
|
|
$(ROOT)/apps/gui/wps_parser.c \
|
|
|
|
$(ROOT)/apps/gui/wps_debug.c \
|
|
|
|
$(ROOT)/apps/recorder/peakmeter.c \
|
|
|
|
$(ROOT)/apps/recorder/icons.c \
|
2008-09-03 19:24:50 +00:00
|
|
|
$(ROOT)/apps/misc.c \
|
|
|
|
$(ROOT)/apps/status.c \
|
|
|
|
$(ROOT)/firmware/common/ctype.c \
|
2008-08-29 21:08:38 +00:00
|
|
|
$(ROOT)/firmware/common/timefuncs.c \
|
|
|
|
$(ROOT)/firmware/common/unicode.c \
|
2008-09-03 19:24:50 +00:00
|
|
|
$(ROOT)/firmware/font.c \
|
2008-08-29 21:08:38 +00:00
|
|
|
$(ROOT)/firmware/font_cache.c \
|
2008-09-03 19:24:50 +00:00
|
|
|
$(ROOT)/firmware/id3.c \
|
2008-08-29 21:08:38 +00:00
|
|
|
$(ROOT)/firmware/lru.c \
|
|
|
|
$(ROOT)/firmware/mp3data.c \
|
|
|
|
$(ROOT)/firmware/replaygain.c
|
|
|
|
|
|
|
|
# $(ROOT)/apps/recorder/bmp.c
|
|
|
|
# $(ROOT)/apps/abrepeat.c \
|
|
|
|
# $(ROOT)/apps/action.c \
|
|
|
|
# $(ROOT)/apps/cuesheet.c \
|
|
|
|
# $(ROOT)/apps/gui/statusbar.c \
|
|
|
|
# $(ROOT)/apps/gui/gwps.c \
|
|
|
|
|
|
|
|
INCLUDE=-I src/include \
|
|
|
|
-I $(ROOT)/apps/gui \
|
|
|
|
-I $(ROOT)/firmware/export \
|
|
|
|
-I $(ROOT)/firmware/include \
|
|
|
|
-I $(ROOT)/apps/recorder \
|
|
|
|
-I $(ROOT)/apps \
|
|
|
|
-I src
|
|
|
|
|
|
|
|
CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
|
|
|
|
|
|
|
|
all:
|
|
|
|
@echo To build, run the buildall.sh script
|
|
|
|
|
|
|
|
build: build-$(OS)
|
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
build-w32: $(SOURCES)
|
2008-08-29 21:08:38 +00:00
|
|
|
@echo CC [$(TARGET)]
|
2008-09-03 19:24:50 +00:00
|
|
|
@$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -DBUILD_DLL $(SOURCES) -shared -o libwps_$(MODEL).dll
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
build-linux: $(SOURCES)
|
2008-08-29 21:08:38 +00:00
|
|
|
@echo CC [$(TARGET)]
|
2008-09-03 19:24:50 +00:00
|
|
|
@$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -shared -Wl,-soname,libwps_$(MODEL).so,-olibwps_$(MODEL).so -fPIC $(SOURCES)
|
2008-08-29 21:08:38 +00:00
|
|
|
|
|
|
|
clean: clean-$(OS)
|
|
|
|
|
|
|
|
clean-w32:
|
|
|
|
$(RM) "libwps_$(MODEL).dll"
|
|
|
|
|
|
|
|
clean-linux:
|
2008-09-03 19:24:50 +00:00
|
|
|
$(RM) "libwps_$(MODEL).so"
|
2008-08-29 21:08:38 +00:00
|
|
|
|
|
|
|
shared: shared-$(OS)
|
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
shared-w32: $(SOURCES)
|
2008-08-29 21:08:38 +00:00
|
|
|
@echo CC [IRIVER_H10_5GB]
|
2008-09-03 19:24:50 +00:00
|
|
|
@$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -DBUILD_DLL -shared $(SOURCES) -o ../gui/bin/libwps_h10_5gb.dll
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
shared-linux: $(SOURCES)
|
2008-08-29 21:08:38 +00:00
|
|
|
@echo CC [IRIVER_H10_5GB]
|
2008-09-03 19:24:50 +00:00
|
|
|
@$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -shared -Wl,-soname,libwps_h10_5gb.so,-olibwps_h10_5gb.so -fPIC $(SOURCES)
|
|
|
|
@$(COPY) libwps_h10_5gb.so ../gui/bin/libwps_h10_5gb.so
|