2008-08-29 21:08:38 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
ROOT=../../..
|
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
ifneq ($or($(findstring MINGW,$(shell uname)),$(findstring Windows_NT,$(OS))),)
|
2008-09-03 19:24:50 +00:00
|
|
|
OS = w32
|
|
|
|
CC = mingw32-gcc
|
2008-09-04 15:19:59 +00:00
|
|
|
COPY = copy /Y
|
|
|
|
COPY_TO = ..\\gui\\bin
|
2008-09-04 14:49:53 +00:00
|
|
|
RM = del
|
|
|
|
EXT = .dll
|
|
|
|
LDFLAGS = -DBUILD_DLL
|
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
|
2008-09-04 15:19:59 +00:00
|
|
|
COPY = cp -f
|
|
|
|
COPY_TO = ../gui/bin
|
2008-09-03 19:24:50 +00:00
|
|
|
RM = rm -f
|
2008-09-04 14:49:53 +00:00
|
|
|
EXT = .so
|
|
|
|
LDFLAGS = -fPIC
|
2008-08-29 21:08:38 +00:00
|
|
|
endif
|
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
TARGETS=IRIVER_H10 \
|
|
|
|
IRIVER_H10_5GB \
|
|
|
|
IPOD_COLOR \
|
|
|
|
IPOD_NANO \
|
|
|
|
IPOD_VIDEO \
|
2008-09-05 18:57:47 +00:00
|
|
|
IPOD_3G \
|
|
|
|
IPOD_4G \
|
|
|
|
IPOD_MINI \
|
|
|
|
IPOD_MINI2G \
|
|
|
|
IPOD_1G2G \
|
2008-09-04 14:49:53 +00:00
|
|
|
GIGABEAT_F \
|
|
|
|
GIGABEAT_S \
|
|
|
|
SANSA_E200 \
|
2008-09-05 18:57:47 +00:00
|
|
|
SANSA_C200 \
|
|
|
|
IRIVER_H100 \
|
|
|
|
IRIVER_H120 \
|
|
|
|
IRIVER_H300 \
|
|
|
|
IAUDIO_X5 \
|
|
|
|
IAUDIO_M5 \
|
|
|
|
IAUDIO_M3 \
|
|
|
|
|
2008-09-03 19:24:50 +00:00
|
|
|
SOURCES= \
|
2008-09-04 14:49:53 +00:00
|
|
|
src/api.c \
|
|
|
|
src/dummies.c \
|
|
|
|
src/lcd.c \
|
|
|
|
src/proxy.c \
|
|
|
|
$(ROOT)/apps/gui/scrollbar.c \
|
2009-07-27 07:34:50 +00:00
|
|
|
$(ROOT)/apps/gui/music_screen.c \
|
|
|
|
$(ROOT)/apps/gui/wps_engine/wps_display.c \
|
|
|
|
$(ROOT)/apps/gui/wps_engine/wps_tokens.c \
|
|
|
|
$(ROOT)/apps/gui/wps_engine/wps_parser.c \
|
|
|
|
$(ROOT)/apps/gui/wps_parser/wps_debug.c \
|
2008-09-04 14:49:53 +00:00
|
|
|
$(ROOT)/apps/recorder/peakmeter.c \
|
|
|
|
$(ROOT)/apps/recorder/icons.c \
|
|
|
|
$(ROOT)/apps/misc.c \
|
|
|
|
$(ROOT)/apps/status.c \
|
|
|
|
$(ROOT)/firmware/common/ctype.c \
|
|
|
|
$(ROOT)/firmware/common/timefuncs.c \
|
|
|
|
$(ROOT)/firmware/common/unicode.c \
|
|
|
|
$(ROOT)/firmware/font.c \
|
|
|
|
$(ROOT)/firmware/font_cache.c \
|
|
|
|
$(ROOT)/firmware/id3.c \
|
|
|
|
$(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 \
|
2008-08-29 21:08:38 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2008-09-04 21:05:16 +00:00
|
|
|
CFLAGS = -g -Wall -Wno-format -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
RESULTS := $(patsubst %,libwps_%$(EXT),$(TARGETS))
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
all: $(RESULTS)
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
libwps_%$(EXT): $(SOURCES)
|
|
|
|
@echo CC [$(subst libwps_,,$(subst $(EXT),,$@))]
|
|
|
|
@$(CC) $(INCLUDE) $(CFLAGS) -D$(subst libwps_,,$(subst $(EXT),,$@)) $(LDFLAGS) -shared -o $@ $+
|
2008-09-04 15:19:59 +00:00
|
|
|
@$(COPY) $@ $(COPY_TO)
|
2008-08-29 21:08:38 +00:00
|
|
|
|
2008-09-04 14:49:53 +00:00
|
|
|
clean:
|
|
|
|
$(RM) $(RESULTS)
|