1
0
Fork 0
forked from len0rd/rockbox

New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.

Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2008-11-20 11:27:31 +00:00
parent f66c303467
commit c6b3d38a15
221 changed files with 2081 additions and 3657 deletions

View file

@ -1,180 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \
-I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
ifdef SOFTWARECODECS
CODECLIBS = -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack
endif
# Set up the bitmap libraries
BITMAPLIBS =
LINKBITMAPS =
ifneq ($(strip $(BMP2RB_MONO)),)
BITMAPLIBS += pluginbitmapsmono
LINKBITMAPS += -lpluginbitmapsmono
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
BITMAPLIBS += pluginbitmapsnative
LINKBITMAPS += -lpluginbitmapsnative
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
BITMAPLIBS += pluginbitmapsremotemono
LINKBITMAPS += -lpluginbitmapsremotemono
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
BITMAPLIBS += pluginbitmapsremotenative
LINKBITMAPS += -lpluginbitmapsremotenative
endif
LDS := plugin.lds
LINKFILE := $(OBJDIR)/pluginlink.lds
DEPFILE = $(OBJDIR)/dep-plugins
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
# This sets up 'SUBDIRS' based on the directories mentioned in SUBDIRS
include $(TOOLSDIR)/makesubdirs.inc
ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock)
SOURCES = $(SRC)
ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
# as created by the cross-compiler for win32:
DEFS := $(SRC:%.c=$(OBJDIR)/%.def)
DIRS = .
.PHONY: $(SUBDIRS)
all: build
dep: $(DEPFILE)
build: $(DEPFILE) $(BITMAPLIBS)
$(call PRINTS,MAKE rocks)$(MAKE) rocks
$(call PRINTS,MAKE subdirs)$(MAKE) subdirs
rocks: $(ROCKS)
subdirs: $(SUBDIRS)
$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS
$(call PRINTS,create credits.raw)perl credits.pl < $< > $@
$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
pluginbitmapsmono:
$(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
pluginbitmapsnative:
$(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
pluginbitmapsremotemono:
$(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
pluginbitmapsremotenative:
$(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
ifndef SIMVER
$(OBJDIR)/%.rock: $(OBJDIR)/%.o $(LINKFILE)
$(SILENT)$(CC) $(CFLAGS) -o $(OBJDIR)/$*.elf $< -L$(BUILDDIR) \
$(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc \
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
$(call PRINTS,LINK $(@F))$(OC) -O binary $(OBJDIR)/$*.elf $(OBJDIR)/$*.rock
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \
$(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
pluginlib:
$(SILENT)mkdir -p $(OBJDIR)/lib
$(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
$(SUBDIRS):
$(SILENT)mkdir -p $(OBJDIR)/$@
$(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
LINKBITMAPS="$(LINKBITMAPS)"
clean:
$(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
$(BUILDDIR)/credits.raw $(OBJS) $(DEFS)
$(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
$(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
$(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
$(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
$(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
$(SILENT)$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy
$(SILENT)$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine
@rm -rf $(BUILDDIR)/pluginbitmaps
-include $(DEPFILE)

View file

@ -1,74 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id $
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -O3
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-beatbox
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/beatbox.rock
else ## simulators
OUTPUT = $(OUTDIR)/beatbox.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/beatbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/beatbox.map
$(OUTPUT): $(OBJDIR)/beatbox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning beatbox)rm -rf $(OBJDIR)/beatbox
$(SILENT)rm -f $(OBJDIR)/beatbox.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-mono
BMP2RB = $(BMP2RB_MONO)
OUTPUT = $(BUILDDIR)/libpluginbitmapsmono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-native
BMP2RB = $(BMP2RB_NATIVE)
OUTPUT = $(BUILDDIR)/libpluginbitmapsnative.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -574,13 +574,13 @@ star_tiles.8x8.bmp
#endif
#elif LCD_DEPTH > 1 /* grey */
#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98
star_tiles.10x10.grey.bmp
star_tiles.10x10x2.bmp
#elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80
star_tiles.8x8.grey.bmp
star_tiles.8x8x2.bmp
#endif
#else /* monochrome */
#if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62
star_tiles.6x7.mono.bmp
star_tiles.6x7x1.bmp
#endif
#endif
@ -669,14 +669,14 @@ matrix_normal.bmp
/* pictureflow */
#if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE)
#if (LCD_WIDTH < 200)
pictureflow_logo.100x18x16.bmp
pictureflow_logo.100x18x16.bmp
#else
pictureflow_logo.193x34x16.bmp
pictureflow_logo.193x34x16.bmp
#endif
#if (LCD_HEIGHT < 100 )
pictureflow_emptyslide.50x50x16.bmp
pictureflow_emptyslide.50x50x16.bmp
#else
pictureflow_emptyslide.100x100x16.bmp
pictureflow_emptyslide.100x100x16.bmp
#endif
#endif
@ -689,53 +689,53 @@ matrix_normal.bmp
#if defined HAVE_LCD_COLOR
#if SMALLER_DIMENSION <= 80
sliding_puzzle.80x80x16.bmp
sliding_puzzle.80x80x16.bmp
#elif SMALLER_DIMENSION <= 108
sliding_puzzle.108x108x16.bmp
sliding_puzzle.108x108x16.bmp
#elif SMALLER_DIMENSION <= 128
sliding_puzzle.128x128x16.bmp
sliding_puzzle.128x128x16.bmp
#elif SMALLER_DIMENSION <= 132
sliding_puzzle.132x132x16.bmp
sliding_puzzle.132x132x16.bmp
#elif SMALLER_DIMENSION <= 176
sliding_puzzle.176x176x16.bmp
sliding_puzzle.176x176x16.bmp
#elif SMALLER_DIMENSION <= 240
sliding_puzzle.240x240x16.bmp
sliding_puzzle.240x240x16.bmp
#endif
#elif (LCD_DEPTH > 1)
#if SMALLER_DIMENSION <= 96
sliding_puzzle.96x96x2.bmp
sliding_puzzle.96x96x2.bmp
#elif SMALLER_DIMENSION <= 110
sliding_puzzle.108x108x2.bmp
sliding_puzzle.108x108x2.bmp
#elif SMALLER_DIMENSION <= 128
sliding_puzzle.128x128x2.bmp
sliding_puzzle.128x128x2.bmp
#endif
#else /* mono targets, one size currently */
sliding_puzzle.80x64x1.bmp
sliding_puzzle.80x64x1.bmp
#endif
/* Logo */
#if LCD_DEPTH == 16
#if (LCD_WIDTH >= 320)
rockboxlogo.220x68x16.bmp
rockboxlogo.220x68x16.bmp
#elif (LCD_WIDTH > 160)
rockboxlogo.128x40x16.bmp
rockboxlogo.128x40x16.bmp
#else
rockboxlogo.90x28x16.bmp
rockboxlogo.90x28x16.bmp
#endif
#elif LCD_DEPTH == 2
#if (LCD_WIDTH > 138)
rockboxlogo.138x46x2.bmp
rockboxlogo.138x46x2.bmp
#else
rockboxlogo.91x32x2.bmp
rockboxlogo.91x32x2.bmp
#endif
#elif LCD_DEPTH == 1
#if (LCD_WIDTH > 112)
/* Such a screen isn't currently in any target */
rockboxlogo.112x30x1.bmp
rockboxlogo.112x30x1.bmp
#else
rockboxlogo.91x32x1.bmp
rockboxlogo.91x32x1.bmp
#endif
#endif

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

Before After
Before After

View file

@ -0,0 +1,59 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
PBMPINCDIR = $(BUILDDIR)/pluginbitmaps
PFLAGS += -I$(PBMPINCDIR)
ifneq ($(strip $(BMP2RB_MONO)),)
PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES)
endif
ifdef PBMP # does player use bitmaps?
PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o)
PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP))
PBMPHFILES := $(shell echo $(PBMPHFILES) | sed -e 's/\.[0-9x]\+\.bmp/.h/g' -e 's/\.bmp/.h/g' -e 's/apps\/plugins\/bitmaps\/\(mono\|native\|remote_mono\|remote_native\)/pluginbitmaps/g')
$(PBMPHFILES): $(PLUGIN_BITMAPS)
$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS)
$(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1
# pattern rules to create .c files from .bmp, one for each subdir:
$(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@
endif

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono
BMP2RB = $(BMP2RB_REMOTEMONO)
OUTPUT = $(BUILDDIR)/libpluginbitmapsremotemono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative
BMP2RB = $(BMP2RB_REMOTENATIVE)
OUTPUT = $(BUILDDIR)/libpluginbitmapsremotenative.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -18,7 +18,7 @@ clock_smallsegments_remote.112x64x1.bmp
/* Logo */
#if (LCD_REMOTE_DEPTH == 1)
remote_rockboxlogo.91x32x1.bmp
remote_rockboxlogo.91x32x1.bmp
#elif (LCD_REMOTE_DEPTH == 2)
remote_rockboxlogo.91x32x2.bmp
remote_rockboxlogo.91x32x2.bmp
#endif

View file

@ -20,7 +20,7 @@
**************************************************************************/
#include "plugin.h"
#include "time.h"
#include "fixedpoint.h"
#include "lib/fixedpoint.h"
PLUGIN_HEADER

View file

@ -20,8 +20,8 @@
****************************************************************************/
#include "plugin.h"
#include "configfile.h" /* Part of libplugin */
#include "helper.h"
#include "lib/configfile.h" /* Part of libplugin */
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -25,9 +25,9 @@
#ifdef HAVE_LCD_BITMAP
#include "xlcd.h"
#include "pluginlib_actions.h"
#include "fixedpoint.h"
#include "lib/xlcd.h"
#include "lib/pluginlib_actions.h"
#include "lib/fixedpoint.h"
PLUGIN_HEADER

View file

@ -24,7 +24,7 @@
#if MEM <= 8 && !defined(SIMULATOR)
#include "overlay.h"
#include "lib/overlay.h"
PLUGIN_HEADER

View file

@ -1,114 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(BUILDDIR)/pluginbitmaps -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) \
-I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-chessbox
SRC = chessbox.c gnuchess.c opening.c chessbox_pgn.c
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
LDS := archos.lds
OUTPUT = $(OUTDIR)/chessbox.ovl
else ## iRiver target
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/chessbox.rock
endif
else ## simulators
OUTPUT = $(OUTDIR)/chessbox.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/chessbox.map
$(OUTPUT): $(OBJDIR)/chessbox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox
$(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,4 @@
chessbox.c
gnuchess.c
opening.c
chessbox_pgn.c

View file

@ -43,7 +43,7 @@ extern const fb_data chessbox_pieces[];
PLUGIN_HEADER
/* Tile size defined by the assigned bitmap */
#include "chessbox_pieces.h"
#include "pluginbitmaps/chessbox_pieces.h"
#define TILE_WIDTH BMPWIDTH_chessbox_pieces
#define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26)

View file

@ -0,0 +1,58 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
CHESSBOX_SRCDIR = $(APPSDIR)/plugins/chessbox
CHESSBOX_OBJDIR = $(BUILDDIR)/apps/plugins/chessbox
CHESSBOX_SRC := $(call preprocess, $(CHESSBOX_SRCDIR)/SOURCES)
CHESSBOX_OBJ := $(call c2obj, $(CHESSBOX_SRC))
OTHER_SRC += $(CHESSBOX_SRC)
ifndef SIMVER
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
## archos recorder targets
CHESSBOX_INLDS := $(CHESSBOX_SRCDIR)/archos.lds
ROCKS += $(CHESSBOX_OBJDIR)/chessbox.ovl
else
### all other targets
CHESSBOX_INLDS := $(APPSDIR)/plugins/plugin.lds
ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock
endif
CHESSBOX_OVLFLAGS = -T$(CHESSBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$*.map
CHESSBOX_OUTLDS = $(CHESSBOX_OBJDIR)/chessbox.lds
else
### simulator
ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock
CHESSBOX_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile
endif
ifeq ($(CPU),sh)
# sh need to retain its' -Os
CHESSBOXFLAGS = $(PLUGINFLAGS)
else
CHESSBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2
endif
$(CHESSBOX_OUTLDS): $(CHESSBOX_INLDS) $(CHESSBOX_OBJ)
$(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@)
$(CHESSBOX_OBJDIR)/chessbox.rock: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB)
$(CHESSBOX_OBJDIR)/chessbox.ovl: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB)
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(CHESSBOX_OBJDIR)/$*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(CHESSBOX_OVLFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $(CHESSBOX_OBJDIR)/$*.elf $@
# special pattern rule for compiling chessbox with extra flags
$(CHESSBOX_OBJDIR)/%.o: $(CHESSBOX_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(CHESSBOX_SRCDIR)/chessbox.make
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(CHESSBOXFLAGS) -c $< -o $@

View file

@ -21,9 +21,9 @@
****************************************************************************/
#include "plugin.h"
#include "xlcd.h"
#include "configfile.h"
#include "helper.h"
#include "lib/xlcd.h"
#include "lib/configfile.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -1,112 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $$Id: $$
#
INCLUDES = -I$(APPSDIR) -I.. -I. -I$(APPSDIR)/plugins/lib \
$(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
-I$(BUILDDIR)/pluginbitmaps
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-clock
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/clock.rock
else ## simulators
OUTPUT = $(OUTDIR)/clock.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/clock.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/clock.map
$(OUTPUT): $(OBJDIR)/clock.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning clock)rm -rf $(OBJDIR)/clock
$(SILENT)rm -f $(OBJDIR)/clock.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -21,8 +21,8 @@
#include "plugin.h"
#include "time.h"
#include "pluginlib_actions.h"
#include "xlcd.h"
#include "lib/pluginlib_actions.h"
#include "lib/xlcd.h"
#include "clock.h"
#include "clock_counter.h"

View file

@ -0,0 +1,21 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
CLOCKSRCDIR := $(APPSDIR)/plugins/clock
CLOCKBUILDDIR := $(BUILDDIR)/apps/plugins/clock
ROCKS += $(CLOCKBUILDDIR)/clock.rock
CLOCK_SRC := $(call preprocess, $(CLOCKSRCDIR)/SOURCES)
CLOCK_OBJ := $(call c2obj, $(CLOCK_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(CLOCK_SRC)
$(CLOCKBUILDDIR)/clock.rock: $(CLOCK_OBJ)

View file

@ -23,7 +23,7 @@
#ifndef _CLOCK_BITMAP_STRINGS_
#define _CLOCK_BITMAP_STRINGS_
#include "plugin.h"
#include "picture.h"
#include "lib/picture.h"
void draw_string(struct screen* display, const struct picture* bitmaps,
char* str, int x, int y);

View file

@ -23,24 +23,24 @@
#include "clock_bitmaps.h"
/* bitmaps */
#include "clock_binary.h"
#include "clock_digits.h"
#include "clock_smalldigits.h"
#include "clock_segments.h"
#include "clock_smallsegments.h"
#include "pluginbitmaps/clock_binary.h"
#include "pluginbitmaps/clock_digits.h"
#include "pluginbitmaps/clock_smalldigits.h"
#include "pluginbitmaps/clock_segments.h"
#include "pluginbitmaps/clock_smallsegments.h"
#include "clock_logo.h"
#include "clock_messages.h"
#include "pluginbitmaps/clock_logo.h"
#include "pluginbitmaps/clock_messages.h"
#if NB_SCREENS==2
#include "clock_binary_remote.h"
#include "clock_digits_remote.h"
#include "clock_smalldigits_remote.h"
#include "clock_segments_remote.h"
#include "clock_smallsegments_remote.h"
#include "pluginbitmaps/clock_binary_remote.h"
#include "pluginbitmaps/clock_digits_remote.h"
#include "pluginbitmaps/clock_smalldigits_remote.h"
#include "pluginbitmaps/clock_segments_remote.h"
#include "pluginbitmaps/clock_smallsegments_remote.h"
#include "clock_logo_remote.h"
#include "clock_messages_remote.h"
#include "pluginbitmaps/clock_logo_remote.h"
#include "pluginbitmaps/clock_messages_remote.h"
#endif

View file

@ -21,7 +21,7 @@
#ifndef _CLOCK_BITMAPS_
#define _CLOCK_BITMAPS_
#include "picture.h"
#include "lib/picture.h"
extern const struct picture logos[];
extern const struct picture messages[];

View file

@ -2,7 +2,7 @@
#define _CLOCK_MESSAGE_
#include "clock.h"
#include "plugin.h"
#include "picture.h"
#include "lib/picture.h"
struct counter{
int ticks_at_last_unpause;/* to count the time from last pause to now */

View file

@ -20,8 +20,8 @@
****************************************************************************/
#include "clock_draw_analog.h"
#include "xlcd.h"
#include "fixedpoint.h"
#include "lib/xlcd.h"
#include "lib/fixedpoint.h"
#include "clock_bitmaps.h"
#include "clock_bitmap_strings.h"

View file

@ -21,7 +21,7 @@
#include "clock_draw_binary.h"
#include "clock_bitmap_strings.h"
#include "clock_bitmaps.h"
#include "picture.h"
#include "lib/picture.h"
const struct picture* binary_skin[]={binary,digits,segments};

View file

@ -23,7 +23,7 @@
#include "clock_draw_digital.h"
#include "clock_bitmap_strings.h"
#include "clock_bitmaps.h"
#include "picture.h"
#include "lib/picture.h"
const struct picture* digits_skin[]={digits,segments};
const struct picture* smalldigits_skin[]={smalldigits,smallsegments};

View file

@ -23,7 +23,7 @@
#include "clock_bitmaps.h"
#include "clock_draw.h"
#include "clock_settings.h"
#include "picture.h"
#include "lib/picture.h"
static int max_skin[]={
[ANALOG]=2,

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -21,10 +21,10 @@
*
***************************************************************************/
#include "plugin.h"
#include "grey.h"
#include "playergfx.h"
#include "xlcd.h"
#include "fixedpoint.h"
#include "lib/grey.h"
#include "lib/playergfx.h"
#include "lib/xlcd.h"
#include "lib/fixedpoint.h"
PLUGIN_HEADER

View file

@ -24,8 +24,8 @@
#include "plugin.h"
#ifdef HAVE_LCD_BITMAP
#include "pluginlib_actions.h"
#include "helper.h"
#include "lib/pluginlib_actions.h"
#include "lib/helper.h"
PLUGIN_HEADER
#define DEFAULT_WAIT_TIME 3

View file

@ -20,8 +20,8 @@
****************************************************************************/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "configfile.h"
#include "lib/pluginlib_actions.h"
#include "lib/configfile.h"
#define MAX_DICES 12
#define INITIAL_NB_DICES 1

View file

@ -1,173 +0,0 @@
################################################################
#
# $Id$
#
# $Log: Makefile,v $
# Revision 1.13 2006-12-13 06:52:09 kkurbjun
# Free more plugin memory
#
# Revision 1.12 2006-12-13 05:46:51 kkurbjun
# Will it fit?
#
# Revision 1.11 2006-12-13 04:44:17 kkurbjun
# Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet).
#
# Revision 1.10 2006-10-27 21:47:55 amiconn
# Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less.
#
# Revision 1.9 2006-10-23 22:33:36 amiconn
# Consistent style of 'make' messages. Always use ranlib after ar.
#
# Revision 1.8 2006-10-23 14:09:28 markun
# rearrange compiler options to avoid conflicts with header files on FreeBSD
#
# Revision 1.7 2006-10-22 00:21:56 amiconn
# Speed up build process in general by using internal functions of make instead of spawning sub-shells where possible.
#
# Revision 1.6 2006-09-29 20:04:35 barrywardell
# Cleaner implementation of the recent OSX simulator build fix. No need to define SHARED_FLAG in each Makefile. Just have configure create it in the root Makefile instead.
#
# Revision 1.5 2006-09-29 16:15:08 barrywardell
# Allow UI simulator to be build on OS (Slightly updated version of FS5767)
#
# Revision 1.4 2006-07-27 13:27:19 linus
# Moved the X5 button driver to the target tree
#
# Revision 1.3 2006-04-14 21:07:56 kkurbjun
# Start of profiling support for doom.
#
# Revision 1.2 2006-03-29 21:16:45 kkurbjun
# Use rockbox endian defines
#
# Revision 1.1 2006-03-28 15:44:01 dave
# Patch #2969 - Doom! Currently only working on the H300.
#
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \
-Wno-strict-prototypes $(PROFILE_OPTS)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
# The arm code compiles too large for the plugin buffer when set to optimize for speed
ifeq ($(CPU), arm)
CFLAGS += -Os
ifndef SIMVER
ifeq ($(TARGET), IRIVER_H100)
CFLAGS += -mstructure-size-boundary=8
endif
endif
else
CFLAGS += -O2
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-doom
SRC = info.c doomdef.c doomstat.c dstrings.c tables.c \
f_finale.c f_wipe.c d_net.c d_items.c g_game.c m_menu.c m_argv.c \
m_cheat.c m_random.c am_map.c p_ceilng.c p_doors.c p_genlin.c \
p_enemy.c p_floor.c p_inter.c p_lights.c p_map.c p_maputl.c p_plats.c \
p_pspr.c p_setup.c p_sight.c p_spec.c p_switch.c p_mobj.c p_telept.c \
p_tick.c p_saveg.c p_user.c r_bsp.c r_data.c r_draw.c r_main.c \
r_plane.c r_segs.c r_sky.c r_things.c wi_stuff.c v_video.c st_lib.c \
st_stuff.c hu_stuff.c hu_lib.c s_sound.c z_zone.c z_bmalloc.c sounds.c \
d_main.c m_misc.c m_bbox.c i_system.c i_sound.c i_video.c \
w_wad.c rockdoom.c d_deh.c ../../../firmware/common/sscanf.c
# sscanf isn't built into the core right now - should remove from here if that
# changes
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
#OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
#OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/doom.rock
else ## simulators
OUTPUT = $(OUTDIR)/doom.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/doom.map
$(OUTPUT): $(OBJDIR)/doom.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the sdl simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
-E -P - >$@
clean:
$(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom
$(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE)
-include $(DEPFILE)

62
apps/plugins/doom/SOURCES Normal file
View file

@ -0,0 +1,62 @@
info.c
doomdef.c
doomstat.c
dstrings.c
tables.c
f_finale.c
f_wipe.c
d_net.c
d_items.c
g_game.c
m_menu.c
m_argv.c
m_cheat.c
m_random.c
am_map.c
p_ceilng.c
p_doors.c
p_genlin.c
p_enemy.c
p_floor.c
p_inter.c
p_lights.c
p_map.c
p_maputl.c
p_plats.c
p_pspr.c
p_setup.c
p_sight.c
p_spec.c
p_switch.c
p_mobj.c
p_telept.c
p_tick.c
p_saveg.c
p_user.c
r_bsp.c
r_data.c
r_draw.c
r_main.c
r_plane.c
r_segs.c
r_sky.c
r_things.c
wi_stuff.c
v_video.c
st_lib.c
st_stuff.c
hu_stuff.c
hu_lib.c
s_sound.c
z_zone.c
z_bmalloc.c
sounds.c
d_main.c
m_misc.c
m_bbox.c
i_system.c
i_sound.c
i_video.c
w_wad.c
rockdoom.c
d_deh.c

View file

@ -0,0 +1,54 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
DOOMSRCDIR := $(APPSDIR)/plugins/doom
DOOMBUILDDIR := $(BUILDDIR)/apps/plugins/doom
ROCKS += $(DOOMBUILDDIR)/doom.rock
DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES)
DOOM_OBJ := $(call c2obj, $(DOOM_SRC))
DOOM_OBJ += $(DOOMBUILDDIR)/sscanf.o
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(DOOM_SRC)
DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes
# The arm code compiles too large for the plugin buffer when set to optimize for speed
ifeq ($(CPU), arm)
DOOMCFLAGS += -Os
ifndef SIMVER
ifeq ($(TARGET), IRIVER_H100)
DOOMCCFLAGS += -mstructure-size-boundary=8
endif
endif
else
DOOMCFLAGS += -O2
endif
$(DOOMBUILDDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CP $<)cp $< $@
$(DOOMBUILDDIR)/sscanf.o: $(DOOMBUILDDIR)/sscanf.c
$(DOOMBUILDDIR)/doom.rock: $(DOOM_OBJ)
# for some reason, this doesn't match the implicit rule in plugins.make,
# so we have to duplicate the link command here
$(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(PLUGINLDFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@
# new rule needed to use extra compile flags
$(DOOMBUILDDIR)/%.o: $(DOOMSRCDIR)/%.c $(DOOMSRCDIR)/doom.make
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(DOOMCFLAGS) -c $< -o $@

View file

@ -117,7 +117,7 @@
#include "rockmacros.h"
#ifndef HAVE_LCD_COLOR
#include "../lib/grey.h"
#include "lib/grey.h"
GREY_INFO_STRUCT_IRAM
static unsigned char greybuffer[LCD_WIDTH] IBSS_ATTR; /* off screen buffer */
static unsigned char *gbuf;

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "configfile.h"
#include "lib/configfile.h"
#ifdef HAVE_LCD_CHARCELLS

View file

@ -22,14 +22,14 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#ifdef HAVE_LCD_BITMAP
#include "pluginlib_actions.h"
#include "fixedpoint.h"
#include "lib/pluginlib_actions.h"
#include "lib/fixedpoint.h"
#ifndef HAVE_LCD_COLOR
#include "grey.h"
#include "lib/grey.h"
#endif
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)

View file

@ -19,8 +19,8 @@
*
****************************************************************************/
#include "plugin.h"
#include "oldmenuapi.h"
#include "helper.h"
#include "lib/oldmenuapi.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -22,10 +22,10 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
#include "grey.h"
#include "lib/grey.h"
PLUGIN_HEADER

View file

@ -26,8 +26,8 @@
*/
#include "plugin.h"
#include "highscore.h"
#include "helper.h"
#include "lib/highscore.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -20,8 +20,8 @@
****************************************************************************/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "picture.h"
#include "lib/pluginlib_actions.h"
#include "lib/picture.h"
PLUGIN_HEADER

View file

@ -22,7 +22,7 @@
****************************************************************************/
#include "plugin.h"
#include "playback_control.h"
#include "lib/playback_control.h"
#ifdef HAVE_LCD_BITMAP

View file

@ -1,75 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
-I$(BUILDDIR)/pluginbitmaps -I$(APPSDIR)/plugins/lib
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-jpeg
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/jpeg.rock
else ## simulators
OUTPUT = $(OUTDIR)/jpeg.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/jpeg.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/jpeg.map
$(OUTPUT): $(OBJDIR)/jpeg.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning jpeg)rm -rf $(OBJDIR)/jpeg
$(SILENT)rm -f $(OBJDIR)/jpeg.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,21 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
JPEGSRCDIR := $(APPSDIR)/plugins/jpeg
JPEGBUILDDIR := $(BUILDDIR)/apps/plugins/jpeg
ROCKS += $(JPEGBUILDDIR)/jpeg.rock
JPEG_SRC := $(call preprocess, $(JPEGSRCDIR)/SOURCES)
JPEG_OBJ := $(call c2obj, $(JPEG_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(JPEG_SRC)
$(JPEGBUILDDIR)/jpeg.rock: $(JPEG_OBJ)

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "md5.h"
#include "lib/md5.h"
PLUGIN_HEADER
#define KEYBOX_FILE PLUGIN_DIR "/apps/keybox.dat"

View file

@ -23,7 +23,7 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -1,50 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
# ../.. for the plugin.h in the apps dir
# .. for stuff in the plugins dir
# . for stuff in the pluginlib dir
INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
# Sectioned compilation for target
ifndef SIMVER
CFLAGS += -ffunction-sections -fdata-sections
endif
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-pluginlib
DIRS = .
OUTPUT = $(BUILDDIR)/libplugin.a
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
-include $(DEPFILE)

View file

@ -19,7 +19,7 @@
*
**************************************************************************/
#include "plugin.h"
#include "playergfx.h"
#include "lib/playergfx.h"
PLUGIN_HEADER

View file

@ -23,8 +23,8 @@
#include "plugin.h"
#ifdef HAVE_LCD_BITMAP
#include "grey.h"
#include "xlcd.h"
#include "lib/grey.h"
#include "lib/xlcd.h"
PLUGIN_HEADER

View file

@ -31,7 +31,7 @@
*/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
PLUGIN_HEADER
@ -54,7 +54,7 @@ PLUGIN_HEADER
# define MAZE_RDOWN (BUTTON_PLAY | BUTTON_REPEAT)
#else
# include "pluginlib_actions.h"
# include "lib/pluginlib_actions.h"
# define MAZE_NEW PLA_START
# define MAZE_QUIT PLA_QUIT
# define MAZE_SOLVE PLA_FIRE

View file

@ -20,10 +20,10 @@
*
****************************************************************************/
#include "plugin.h"
#include "configfile.h"
#include "helper.h"
#include "pluginlib_actions.h"
#include "playback_control.h"
#include "lib/configfile.h"
#include "lib/helper.h"
#include "lib/pluginlib_actions.h"
#include "lib/playback_control.h"
/* Include standard plugin macro */
PLUGIN_HEADER

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "lib/pluginlib_actions.h"
PLUGIN_HEADER

View file

@ -1,77 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id $
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
MIDIOPTS = -O2
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) $(MIDIOPTS) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-midiplay
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/midiplay.rock
else ## simulators
OUTPUT = $(OUTDIR)/midiplay.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/midiplay.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/midiplay.map
$(OUTPUT): $(OBJDIR)/midiplay.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning midiplay)rm -rf $(OBJDIR)/midiplay
$(SILENT)rm -f $(OBJDIR)/midiplay.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,28 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
MIDISRCDIR := $(APPSDIR)/plugins/midi
MIDIBUILDDIR := $(BUILDDIR)/apps/plugins/midi
ROCKS += $(MIDIBUILDDIR)/midi.rock
MIDI_SRC := $(call preprocess, $(MIDISRCDIR)/SOURCES)
MIDI_OBJ := $(call c2obj, $(MIDI_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(MIDI_SRC)
$(MIDIBUILDDIR)/midi.rock: $(MIDI_OBJ)
# for some reason, this doesn't match the implicit rule in plugins.make,
# so we have to duplicate the link command here
$(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(PLUGINLDFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@

View file

@ -19,7 +19,7 @@
*
**************************************************************************/
#include "plugin.h"
#include "playergfx.h"
#include "lib/playergfx.h"
PLUGIN_HEADER

View file

@ -1,78 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/plugins/lib -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -DMPEGPLAYER
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-mpegplayer
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DIRS = .
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/mpegplayer.rock
all: $(OUTPUT)
.PHONY: libmad-mpegplayer
$(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer
libmad-mpegplayer:
$(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer
$(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a
ifndef SIMVER
$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/mpegplayer.map
$(OUTPUT): $(OBJDIR)/mpegplayer.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
# This is the SDL simulator version
$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -lmad-mpegplayer -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of sdl-simulator
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer
$(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -22,8 +22,8 @@
****************************************************************************/
#include "plugin.h"
#include "mpegplayer.h"
#include "../../codecs/libmad/bit.h"
#include "../../codecs/libmad/mad.h"
#include "codecs/libmad/bit.h"
#include "codecs/libmad/mad.h"
/** Audio stream and thread **/
struct pts_queue_slot;

View file

@ -1,5 +1,5 @@
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#include "lib/configfile.h"
#include "lib/oldmenuapi.h"

View file

@ -101,7 +101,7 @@
*****************************************************************************/
#include "plugin.h"
#include "mpegplayer.h"
#include "helper.h"
#include "lib/helper.h"
#include "mpeg_settings.h"
#include "mpeg2.h"
#include "video_out.h"

View file

@ -85,7 +85,7 @@ enum mpeg_malloc_reason_t
#else
#include "grey.h"
#include "lib/grey.h"
#define DRAW_BLACK GREY_BLACK
#define DRAW_DARKGRAY GREY_DARKGRAY
#define DRAW_LIGHTGRAY GREY_LIGHTGRAY

View file

@ -0,0 +1,21 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
MPEGSRCDIR := $(APPSDIR)/plugins/mpegplayer
MPEGBUILDDIR := $(BUILDDIR)/apps/plugins/mpegplayer
ROCKS += $(MPEGBUILDDIR)/mpegplayer.rock
MPEG_SRC := $(call preprocess, $(MPEGSRCDIR)/SOURCES)
MPEG_OBJ := $(call c2obj, $(MPEG_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(MPEG_SRC)
$(MPEGBUILDDIR)/mpegplayer.rock: $(MPEG_OBJ) $(CODECDIR)/libmad-mpeg.a

View file

@ -22,7 +22,7 @@
****************************************************************************/
#include "plugin.h"
#include "mpegplayer.h"
#include "grey.h"
#include "lib/grey.h"
#include "mpeg_settings.h"
#ifndef HAVE_LCD_COLOR

View file

@ -23,7 +23,7 @@
#include "plugin.h"
#include "mpegplayer.h"
#include "mpeg2dec_config.h"
#include "grey.h"
#include "lib/grey.h"
#include "video_out.h"
#include "mpeg_settings.h"

View file

@ -22,11 +22,11 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#ifdef HAVE_LCD_BITMAP
#include "xlcd.h"
#include "configfile.h"
#include "lib/xlcd.h"
#include "lib/configfile.h"
PLUGIN_HEADER

View file

@ -1,108 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-pacbox
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DIRS = .
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/pacbox.rock
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/pacbox.map
$(OUTPUT): $(OBJDIR)/pacbox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox
$(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,27 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
PACBOXSRCDIR := $(APPSDIR)/plugins/pacbox
PACBOXBUILDDIR := $(BUILDDIR)/apps/plugins/pacbox
ROCKS += $(PACBOXBUILDDIR)/pacbox.rock
PACBOX_SRC := $(call preprocess, $(PACBOXSRCDIR)/SOURCES)
PACBOX_OBJ := $(call c2obj, $(PACBOX_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(PACBOX_SRC)
PACBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2
$(PACBOXBUILDDIR)/pacbox.rock: $(PACBOX_OBJ)
$(PACBOXBUILDDIR)/%.o: $(PACBOXSRCDIR)/%.c $(PLUGINBITMAPLIB) $(PACBOXSRCDIR)/pacbox.make
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PACBOXFLAGS) -c $< -o $@

View file

@ -24,10 +24,10 @@
****************************************************************************/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "helper.h"
#include "bmp.h"
#include "picture.h"
#include "lib/pluginlib_actions.h"
#include "lib/helper.h"
#include "lib/bmp.h"
#include "lib/picture.h"
#include "pluginbitmaps/pictureflow_logo.h"
#include "pluginbitmaps/pictureflow_emptyslide.h"

View file

@ -25,14 +25,14 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#ifdef HAVE_LCD_BITMAP
#ifndef HAVE_LCD_COLOR
#include "grey.h"
#include "lib/grey.h"
#endif
#include "fixedpoint.h"
#include "lib/fixedpoint.h"
PLUGIN_HEADER

76
apps/plugins/plugins.make Normal file
View file

@ -0,0 +1,76 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# single-file plugins:
PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)
OTHER_SRC += $(PLUGINS_SRC)
ROCKS := $(PLUGINS_SRC:.c=.rock)
ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS))
# libplugin.a
PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a
PLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES)
OTHER_SRC += $(PLUGINLIB_SRC)
PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o)
PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o)
PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ))
# multifile plugins (subdirs):
PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS)
# include <dir>.make from each subdir (yay!)
$(foreach dir,$(PLUGINSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make))
### build data / rules
PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds
PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link
OTHER_INC += -I$(APPSDIR)/plugins
# special compile flags for plugins:
PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS)
$(ROCKS): $(PLUGINLIB) $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINBITMAPLIB)
$(PLUGINLIB): $(PLUGINLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
$(PLUGINLINK_LDS): $(PLUGIN_LDS)
$(call PRINTS,PP $(@F))
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
$(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS
$(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F)
# special dependencies
$(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a
# special pattern rule for compiling plugin lib (with -ffunction-sections)
$(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -ffunction-sections -c $< -o $@
# special pattern rule for compiling plugins with extra flags
$(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(PLUGINBITMAPLIB)
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@
ifdef SIMVER
PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
else
PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map
endif
$(BUILDDIR)/%.rock: $(BUILDDIR)/%.o $(PLUGINLINK_LDS)
$(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(PLUGINLDFLAGS)
$(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@

View file

@ -20,7 +20,7 @@
****************************************************************************/
#include "plugin.h"
#include "bmp.h"
#include "lib/bmp.h"
#if defined(HAVE_LCD_COLOR)

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "oldmenuapi.h"
#include "lib/oldmenuapi.h"
PLUGIN_HEADER

View file

@ -1,111 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $$Id: $$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
-I$(BUILDDIR)/pluginbitmaps
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-reversi
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/reversi.rock
else ## simulators
OUTPUT = $(OUTDIR)/reversi.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/reversi.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/reversi.map
$(OUTPUT): $(OBJDIR)/reversi.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning reversi)rm -rf $(OBJDIR)/reversi
$(SILENT)rm -f $(OBJDIR)/reversi.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -47,7 +47,7 @@ further options:
#include "reversi-strategy.h"
#include "reversi-gui.h"
#include "../lib/oldmenuapi.h"
#include "lib/oldmenuapi.h"
PLUGIN_HEADER

View file

@ -0,0 +1,28 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
REVERSISRCDIR := $(APPSDIR)/plugins/reversi
REVERSIBUILDDIR := $(BUILDDIR)/apps/plugins/reversi
ROCKS += $(REVERSIBUILDDIR)/reversi.rock
REVERSI_SRC := $(call preprocess, $(REVERSISRCDIR)/SOURCES)
REVERSI_OBJ := $(call c2obj, $(REVERSI_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(REVERSI_SRC)
$(REVERSIBUILDDIR)/reversi.rock: $(REVERSI_OBJ)
# for some reason, this doesn't match the implicit rule in plugins.make,
# so we have to duplicate the link command here
$(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(PLUGINLDFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@

View file

@ -29,7 +29,7 @@
*/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "lib/pluginlib_actions.h"
/* This macros must always be included. Should be placed at the top by
convention, although the actual position doesn't matter */
@ -489,6 +489,14 @@ static char* messages[] =
#define ROBOT 0
#define KITTEN 1
/* if SYSFONT_WIDTH is 0 (which it is during dependency generation) gcc
will abort (div by 0) and this plugin won't get any dependencies
*/
#if SYSFONT_WIDTH < 1
#define SYSFONT_WIDTH 10
#define SYSFONT_HEIGHT 10
#endif
/*Screen dimensions.*/
#define X_MIN 0
#define X_MAX ((LCD_WIDTH/SYSFONT_WIDTH) - 1)

View file

@ -21,9 +21,9 @@
*
****************************************************************************/
#include "plugin.h"
#include "highscore.h"
#include "playergfx.h"
#include "helper.h"
#include "lib/highscore.h"
#include "lib/playergfx.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -24,7 +24,7 @@
#if MEM <= 8 && !defined(SIMULATOR)
#include "overlay.h"
#include "lib/overlay.h"
PLUGIN_HEADER

View file

@ -1,119 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -finline-functions
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-rockboy
SRC = cpu.c emu.c events.c fastmem.c hw.c lcd.c lcdc.c loader.c \
mem.c menu.c rbsound.c rockboy.c rtc.c save.c sound.c sys_rockbox.c \
../../../firmware/common/sscanf.c
#CFLAGS += -DDYNAREC
#SRC += dynarec.c
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
ifneq (,$(findstring RECORDER,$(TARGET))) ## Archos recorder targets
LDS := archos.lds
OUTPUT = $(OUTDIR)/rockboy.ovl
else ## iRiver target
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/rockboy.rock
endif
else ## simulators
OUTPUT = $(OUTDIR)/rockboy.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/rockboy.map
$(OUTPUT): $(OBJDIR)/rockboy.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the sdl simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
-E -P - >$@
clean:
$(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy
$(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,16 @@
cpu.c
emu.c
events.c
fastmem.c
hw.c
lcd.c
lcdc.c
loader.c
mem.c
menu.c
rbsound.c
rockboy.c
rtc.c
save.c
sound.c
sys_rockbox.c

View file

@ -0,0 +1,53 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy
ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy
ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES)
ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC))
ROCKBOY_OBJ += $(ROCKBOY_OBJDIR)/sscanf.o
OTHER_SRC += $(ROCKBOY_SRC)
ifndef SIMVER
ifneq (,$(findstring RECORDER,$(TARGET)))
## archos recorder targets
ROCKBOY_INLDS := $(ROCKBOY_SRCDIR)/archos.lds
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl
else
### all other targets
ROCKBOY_INLDS := $(APPSDIR)/plugins/plugin.lds
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
endif
ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(ROCKBOY_OBJDIR)/$*.map
ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.lds
else
### simulator
ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
ROCKBOY_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile
endif
$(ROCKBOY_OBJDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CP $<)cp $< $@
$(ROCKBOY_OBJDIR)/sscanf.o: $(ROCKBOY_OBJDIR)/sscanf.c
$(ROCKBOY_OUTLDS): $(ROCKBOY_INLDS) $(ROCKBOY_OBJ)
$(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@)
$(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
$(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(ROCKBOY_OBJDIR)/$*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(ROCKBOY_OVLFLAGS)
$(call PRINTS,LD $(@F))$(OC) -O binary $(ROCKBOY_OBJDIR)/$*.elf $@

View file

@ -61,8 +61,8 @@
*/
#include "plugin.h"
#include "pluginlib_actions.h"
#include "helper.h"
#include "lib/pluginlib_actions.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -29,7 +29,6 @@
*/
#include "plugin.h"
#include "errno.h"
#include "lib/bmp.h"
#include "lib/rgb_hsv.h"

View file

@ -1,105 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-searchengine
SRC = searchengine.c parser.c token.c dbinterface.c
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/searchengine.rock
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/searchengine.map
$(OUTPUT): $(OBJDIR)/searchengine.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine
$(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -1,90 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $$Id: $$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
-I$(BUILDDIR)/pluginbitmaps
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-shortcuts
SOURCES := shortcuts_common.c shortcuts_view.c shortcuts_append.c
VIEW_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_view.o
APPEND_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_append.o
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
endif
OUTPUT = $(OUTDIR)/shortcuts_view.rock $(OUTDIR)/shortcuts_append.rock
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/shortcuts_view.elf: $(VIEW_OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(VIEW_OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_view.map
$(OUTDIR)/shortcuts_view.rock: $(OBJDIR)/shortcuts_view.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
$(OBJDIR)/shortcuts_append.elf: $(APPEND_OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(APPEND_OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_append.map
$(OUTDIR)/shortcuts_append.rock: $(OBJDIR)/shortcuts_append.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTDIR)/shortcuts_view.rock: $(VIEW_OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(VIEW_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
$(OUTDIR)/shortcuts_append.rock: $(APPEND_OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(APPEND_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning shortcuts)rm -rf $(OBJDIR)/shortcuts
$(SILENT)rm -f $(OBJDIR)/shortcuts* $(DEPFILE)
-include $(DEPFILE)

View file

@ -0,0 +1,25 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
SHCUTSRCDIR := $(APPSDIR)/plugins/shortcuts
SHCUTBUILDDIR := $(BUILDDIR)/apps/plugins/shortcuts
ROCKS += $(SHCUTBUILDDIR)/shortcuts_view.rock
ROCKS += $(SHCUTBUILDDIR)/shortcuts_append.rock
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(SHCUTSRCDIR)/shortcuts_common.c \
$(SHCUTSRCDIR)/shortcuts_view.c \
$(SHCUTSRCDIR)/shortcuts_append.c
$(SHCUTBUILDDIR)/shortcuts_view.rock: \
$(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_view.o
$(SHCUTBUILDDIR)/shortcuts_append.rock: \
$(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_append.o

View file

@ -19,7 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "bmp.h"
#include "lib/bmp.h"
#ifdef HAVE_LCD_BITMAP
PLUGIN_HEADER

View file

@ -19,7 +19,7 @@
*
**************************************************************************/
#include "plugin.h"
#include "playergfx.h"
#include "lib/playergfx.h"
PLUGIN_HEADER

View file

@ -34,6 +34,14 @@ PLUGIN_HEADER
#include "pluginbitmaps/sokoban_tiles.h"
#define SOKOBAN_TILESIZE BMPWIDTH_sokoban_tiles
/* If tilesize is 0 (which it is during dependency generation) gcc will abort
(div by 0) and this plugin won't get any dependencies
*/
#if SOKOBAN_TILESIZE < 1
#define SOKOBAN_TILESIZE 10
#endif
/* SOKOBAN_TILESIZE is the number of pixels for each block.
* Set dynamically so all targets can support levels
* that fill their entire screen, less the stat box.

View file

@ -20,11 +20,11 @@
****************************************************************************/
#include "plugin.h"
#include "playback_control.h"
#include "configfile.h"
#include "lib/playback_control.h"
#include "lib/configfile.h"
#include "button.h"
#include "lcd.h"
#include "oldmenuapi.h"
#include "lib/oldmenuapi.h"
#ifdef HAVE_LCD_BITMAP

View file

@ -20,9 +20,7 @@
****************************************************************************/
#include "plugin.h"
#include "math.h"
#include "stdio.h"
#include "helper.h"
#include "lib/helper.h"
PLUGIN_HEADER

View file

@ -18,7 +18,7 @@
****************************************************************************/
#include "plugin.h"
#include "helper.h"
#include "lib/helper.h"
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */

View file

@ -1,75 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
-I$(BUILDDIR)/pluginbitmaps
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-sudoku
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/sudoku.rock
else ## simulators
OUTPUT = $(OUTDIR)/sudoku.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/sudoku.map
$(OUTPUT): $(OBJDIR)/sudoku.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku
$(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -69,9 +69,9 @@ Example ".ss" file, and one with a saved state:
#include "generator.h"
/* The bitmaps */
#include "sudoku_normal.h"
#include "sudoku_inverse.h"
#include "sudoku_start.h"
#include "pluginbitmaps/sudoku_normal.h"
#include "pluginbitmaps/sudoku_inverse.h"
#include "pluginbitmaps/sudoku_start.h"
#define BITMAP_HEIGHT (BMPHEIGHT_sudoku_normal/10)
#define BITMAP_STRIDE BMPWIDTH_sudoku_normal

View file

@ -0,0 +1,21 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
SUDOKUSRCDIR := $(APPSDIR)/plugins/sudoku
SUDOKUBUILDDIR := $(BUILDDIR)/apps/plugins/sudoku
ROCKS += $(SUDOKUBUILDDIR)/sudoku.rock
SUDOKU_SRC := $(call preprocess, $(SUDOKUSRCDIR)/SOURCES)
SUDOKU_OBJ := $(call c2obj, $(SUDOKU_SRC))
# add source files to OTHER_SRC to get automatic dependencies
OTHER_SRC += $(SUDOKU_SRC)
$(SUDOKUBUILDDIR)/sudoku.rock: $(SUDOKU_OBJ)

View file

@ -20,8 +20,8 @@
****************************************************************************/
#include "plugin.h"
#include "oldmenuapi.h"
#include "helper.h"
#include "lib/oldmenuapi.h"
#include "lib/helper.h"
PLUGIN_HEADER

Some files were not shown because too many files have changed in this diff Show more