A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+2081 -3657
-268
apps/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. \ 11 - -I$(BUILDDIR) -I$(BUILDDIR)/bitmaps -I$(OBJDIR) 12 - 13 - DEPFILE = $(OBJDIR)/dep-apps 14 - 15 - LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds 16 - 17 - ROMLDS := $(FIRMDIR)/rom.lds 18 - 19 - ifdef SOFTWARECODECS 20 - CODECS=build-codecs 21 - 22 - # This sets up the parameters for building and linking libspeex for core voice 23 - VOICE=libspeex-rockbox 24 - LINKVOICE= -lspeex-rockbox 25 - 26 - endif 27 - 28 - # Set up the bitmap libraries 29 - BITMAPLIBS = 30 - LINKBITMAPS = 31 - ifneq ($(strip $(BMP2RB_MONO)),) 32 - BITMAPLIBS += bitmapsmono 33 - LINKBITMAPS += -lbitmapsmono 34 - endif 35 - ifneq ($(strip $(BMP2RB_NATIVE)),) 36 - BITMAPLIBS += bitmapsnative 37 - LINKBITMAPS += -lbitmapsnative 38 - endif 39 - ifneq ($(strip $(BMP2RB_REMOTEMONO)),) 40 - BITMAPLIBS += bitmapsremotemono 41 - LINKBITMAPS += -lbitmapsremotemono 42 - endif 43 - ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) 44 - BITMAPLIBS += bitmapsremotenative 45 - LINKBITMAPS += -lbitmapsremotenative 46 - endif 47 - 48 - # This sets up 'SRC' based on the files mentioned in SOURCES 49 - include $(TOOLSDIR)/makesrc.inc 50 - 51 - DEFINES = $(DEBUG) 52 - 53 - DIRS = . 54 - 55 - ifdef APPEXTRA 56 - DIRS += $(subst :, ,$(APPEXTRA)) 57 - INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA))) 58 - endif 59 - 60 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(DEFINES) \ 61 - -DTARGET_ID=$(TARGET_ID) \ 62 - -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} \ 63 - -DTARGET_NAME=\"$(MODELNAME)\" 64 - 65 - OBJS2 := $(OBJDIR)/lang.o $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) 66 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 67 - SOURCES = $(SRC) 68 - LINKFILE = $(OBJDIR)/linkage.lds 69 - LINKROM = $(OBJDIR)/linkrom.lds 70 - MAXINFILE = $(OBJDIR)/romstart.temp 71 - MAXOUTFILE = $(OBJDIR)/romstart 72 - 73 - LIBROCKBOX = $(BUILDDIR)/librockbox.a 74 - 75 - ifdef SIMVER 76 - # this is a sim build 77 - 78 - all: simbuild 79 - 80 - else 81 - # regular target build 82 - 83 - ifdef DEBUG 84 - REALBIN = $(OBJDIR)/rockbox.elf 85 - else 86 - # this is not needed to get built when doing debug builds 87 - REALBIN = $(BUILDDIR)/$(BINARY) 88 - endif 89 - 90 - all: build 91 - 92 - endif 93 - 94 - build: $(DEPFILE) $(BITMAPLIBS) build-codecs build-pluginlib 95 - ifdef ENABLEDPLUGINS 96 - $(call PRINTS,MAKE in plugins)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins 97 - endif 98 - $(call PRINTS,MAKE in apps)$(MAKE) $(REALBIN) $(FLASHFILE) $(ARCHOSROM) 99 - 100 - simbuild: $(DEPFILE) $(BITMAPLIBS) build-codecs build-pluginlib 101 - ifdef ENABLEDPLUGINS 102 - $(call PRINTS,MAKE in plugins)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins 103 - endif 104 - $(call PRINTS,MAKE in apps)$(MAKE) $(BUILDDIR)/$(BINARY) 105 - 106 - build-codecs: 107 - ifdef SOFTWARECODECS 108 - $(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib 109 - $(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs 110 - endif 111 - 112 - build-pluginlib: 113 - ifdef ENABLEDPLUGINS 114 - $(SILENT)$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib 115 - endif 116 - 117 - bitmapsmono: 118 - $(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono 119 - 120 - bitmapsnative: 121 - $(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native 122 - 123 - bitmapsremotemono: 124 - $(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono 125 - 126 - bitmapsremotenative: 127 - $(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native 128 - 129 - rocks: build-codecs build-pluginlib 130 - $(SILENT)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins 131 - 132 - libspeex-rockbox: 133 - $(SILENT)mkdir -p $(OBJDIR)/libspeex-rockbox 134 - $(call PRINTS,MAKE in libspeex for rockbox core)$(MAKE) -C $(APPSDIR)/codecs/libspeex ROCKBOX_VOICE_CODEC=1 OBJDIR=$(OBJDIR)/libspeex-rockbox OUTPUT=$(BUILDDIR)/libspeex-rockbox.a 135 - 136 - $(LINKFILE): $(LDS) 137 - $(call PRINTS,Build $(@F))cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ 138 - 139 - $(LINKROM): $(ROMLDS) 140 - $(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ 141 - 142 - $(MAXOUTFILE): 143 - $(SILENT)echo '#include "config.h"' > $(MAXINFILE) 144 - $(SILENT)echo "ROM_START" >> $(MAXINFILE) 145 - $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE) 146 - $(SILENT)rm $(MAXINFILE) 147 - 148 - $(OBJDIR)/rombox.elf : $(LINKROM) $(LIBROCKBOX) $(VOICE) 149 - $(call PRINTS,MAKE objs)$(MAKE) objs 150 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lgcc $(LINKVOICE) $(LINKBITMAPS) -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(OBJDIR)/rombox.map 151 - 152 - objs: $(OBJS) 153 - 154 - ifndef SIMVER 155 - 156 - $(OBJDIR)/rockbox.elf : $(LINKFILE) $(LIBROCKBOX) $(VOICE) $(BITMAPLIBS) 157 - $(call PRINTS,MAKE objs)$(MAKE) objs 158 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKVOICE) $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map 159 - 160 - $(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf 161 - $(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ 162 - 163 - $(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf 164 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 165 - 166 - $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin 167 - $(TOOLSDIR)/sh2d -sh1 $< > $@ 168 - 169 - # 170 - # If there's a flashfile defined for this target (rockbox.ucl for Archos 171 - # models) Then check if the mkfirmware script fails, as then it is (likely) 172 - # because the image is too big and we need to create a compressed image 173 - # instead. 174 - # 175 - $(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) $(BITMAPLIBS) 176 - $(call PRINTS,Build firmware file)($(MKFIRMWARE) $< $@; \ 177 - stat=$$?; \ 178 - if test -n "$(FLASHFILE)"; then \ 179 - if test "$$stat" -ne 0; then \ 180 - echo "Image too big, making a compressed version!"; \ 181 - $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ 182 - $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ 183 - fi \ 184 - fi ) 185 - 186 - else 187 - # this is a simulator build 188 - 189 - ifeq ($(SIMVER), win32) 190 - # OK, this is ugly but we need it on the link line to make it do right 191 - EXTRAOBJ = $(BUILDDIR)/sim/uisw32-res.o 192 - LDOPTS += -lwinmm 193 - endif 194 - 195 - # OS X's ld does not support -Map 196 - ifeq ($(UNAME), Darwin) 197 - SIMULATOR_MAP= 198 - else 199 - #SIMULATOR_MAP=-Wl,-Map,$(OBJDIR)/rockbox.map 200 - endif 201 - 202 - $(BUILDDIR)/$(BINARY) : $(BUILDDIR)/libsim.a \ 203 - $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(VOICE) $(BITMAPLIBS) 204 - $(call PRINTS,MAKE objs)$(MAKE) objs 205 - $(call PRINTS,LD $(BINARY))$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKVOICE) $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP) 206 - endif 207 - 208 - $(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin 209 - $(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null 2>&1 210 - 211 - $(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE) 212 - $(call PRINTS,UCLPACK rombox)$(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \ 213 - perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \ 214 - if test $$? -ne 0; then \ 215 - echo "removing UCL file again, making it a fake one"; \ 216 - echo "fake" > $@; \ 217 - fi 218 - 219 - $(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin 220 - $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@ 221 - 222 - # make.inc contains the $(DEPFILE) generation 223 - include $(TOOLSDIR)/make.inc 224 - 225 - # apps/features.txt is a file that (is preprocessed and) lists named features 226 - # based on defines in the config-*.h files. The named features will be passed 227 - # to genlang and thus (translated) phrases can be used based on those names. 228 - # button.h is included for the HAS_BUTTON_HOLD define. 229 - # 230 - 231 - features: $(OBJDIR)/features 232 - 233 - $(OBJDIR)/features: features.txt 234 - $(SILENT)mkdir -p $(OBJDIR) 235 - $(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ 236 - $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \ 237 - grep -v "^\#" | grep -v "^$$" > $@; \ 238 - for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done ; \ 239 - echo "$$feat" >$(OBJDIR)/genlang-features 240 - 241 - $(OBJDIR)/lang.o: lang/$(LANGUAGE).lang $(OBJDIR)/features 242 - $(SILENT)for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done; \ 243 - perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< 244 - $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ 245 - 246 - clean: 247 - $(call PRINTS,cleaning apps)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \ 248 - $(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \ 249 - $(OBJDIR)/lang.o $(OBJDIR)/build.lang $(BUILDDIR)/lang.[ch] \ 250 - $(LINKFILE) $(BUILDDIR)/rockbox.ucl $(LINKROM) \ 251 - $(BUILDDIR)/rombox.ucl $(OBJDIR)/rombox.bin $(OBJDIR)/rombox.elf \ 252 - $(MAXOUTFILE) $(DEPFILE) 253 - $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono 254 - $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native 255 - $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono 256 - $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native 257 - $(SILENT)$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins 258 - $(SILENT)$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs 259 - $(SILENT)rm -rf $(OBJDIR)/recorder $(OBJDIR)/player 260 - $(SILENT)rm -rf $(BUILDDIR)/bitmaps 261 - $(SILENT)rm -rf $(BUILDDIR)/pluginbitmaps 262 - ifdef SIMVER 263 - $(SILENT)$(MAKE) -C $(SIMDIR) clean 264 - endif 265 - 266 - ifneq ($(MAKECMDGOALS),clean) 267 - -include $(DEPFILE) 268 - endif
+25
apps/apps.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 11 + SRC += $(call preprocess, $(APPSDIR)/SOURCES) 12 + 13 + # apps/features.txt is a file that (is preprocessed and) lists named features 14 + # based on defines in the config-*.h files. The named features will be passed 15 + # to genlang and thus (translated) phrases can be used based on those names. 16 + # button.h is included for the HAS_BUTTON_HOLD define. 17 + # 18 + features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt 19 + $(SILENT)mkdir -p $(dir $@) 20 + $(call PRINTS,PP $(<F)) 21 + $(SILENT)$(CC) $(PPCFLAGS) \ 22 + -E -P -imacros "config.h" -imacros "button.h" -x c $< | \ 23 + grep -v "^\#" | grep -v "^$$" > $@; \ 24 + for f in `cat $@`; do feat="$$feat:$$f" ; done ; \ 25 + echo "$$feat" >$(BUILDDIR)/apps/genlang-features
+51
apps/bitmaps/bitmaps.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + BITMAPDIR = $(ROOTDIR)/apps/bitmaps 11 + BMPINCDIR = $(BUILDDIR)/bitmaps 12 + 13 + INCLUDES += -I$(BMPINCDIR) 14 + 15 + ifneq ($(strip $(BMP2RB_MONO)),) 16 + BMP = $(call preprocess, $(BITMAPDIR)/mono/SOURCES) 17 + endif 18 + ifneq ($(strip $(BMP2RB_NATIVE)),) 19 + BMP += $(call preprocess, $(BITMAPDIR)/native/SOURCES) 20 + endif 21 + ifneq ($(strip $(BMP2RB_REMOTEMONO)),) 22 + BMP += $(call preprocess, $(BITMAPDIR)/remote_mono/SOURCES) 23 + endif 24 + ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) 25 + BMP += $(call preprocess, $(BITMAPDIR)/remote_native/SOURCES) 26 + endif 27 + 28 + BMPOBJ = $(BMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) 29 + 30 + BMPHFILES = $(BMPINCDIR)/usblogo.h $(BMPINCDIR)/remote_usblogo.h \ 31 + $(BMPINCDIR)/default_icons.h $(BMPINCDIR)/remote_default_icons.h \ 32 + $(BMPINCDIR)/rockboxlogo.h $(BMPINCDIR)/remote_rockboxlogo.h 33 + 34 + $(BMPHFILES): $(BMPOBJ) 35 + 36 + # pattern rules to create .c files from .bmp, one for each subdir: 37 + $(BUILDDIR)/apps/bitmaps/mono/%.c: $(ROOTDIR)/apps/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb 38 + $(SILENT)mkdir -p $(dir $@) $(BMPINCDIR) 39 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(BMPINCDIR) $< > $@ 40 + 41 + $(BUILDDIR)/apps/bitmaps/native/%.c: $(ROOTDIR)/apps/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb 42 + $(SILENT)mkdir -p $(dir $@) $(BMPINCDIR) 43 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(BMPINCDIR) $< > $@ 44 + 45 + $(BUILDDIR)/apps/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb 46 + $(SILENT)mkdir -p $(dir $@) $(BMPINCDIR) 47 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(BMPINCDIR) $< > $@ 48 + 49 + $(BUILDDIR)/apps/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb 50 + $(SILENT)mkdir -p $(dir $@) $(BMPINCDIR) 51 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(BMPINCDIR) $< > $@
-32
apps/bitmaps/mono/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-mono 21 - 22 - BMP2RB = $(BMP2RB_MONO) 23 - OUTPUT = $(BUILDDIR)/libbitmapsmono.a 24 - BMPINCDIR = $(BUILDDIR)/bitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - $(SILENT)rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-32
apps/bitmaps/native/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-native 21 - 22 - BMP2RB = $(BMP2RB_NATIVE) 23 - OUTPUT = $(BUILDDIR)/libbitmapsnative.a 24 - BMPINCDIR = $(BUILDDIR)/bitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - $(SILENT)rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-32
apps/bitmaps/remote_mono/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono 21 - 22 - BMP2RB = $(BMP2RB_REMOTEMONO) 23 - OUTPUT = $(BUILDDIR)/libbitmapsremotemono.a 24 - BMPINCDIR = $(BUILDDIR)/bitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - $(SILENT)rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-32
apps/bitmaps/remote_native/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative 21 - 22 - BMP2RB = $(BMP2RB_REMOTENATIVE) 23 - OUTPUT = $(BUILDDIR)/libbitmapsremotenative.a 24 - BMPINCDIR = $(BUILDDIR)/bitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - $(SILENT)rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-256
apps/codecs/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ 11 - -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - ifdef SOFTWARECODECS 20 - CODECLIBS = -lspc -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack -lalac -lfaad -lm4a -lspeex -ldemac -lwma -lasap 21 - OUTPUT = libspc libmad liba52 libffmpegFLAC libwma libtremor libwavpack libmusepack libalac libfaad libm4a libspeex libdemac libasap 22 - endif 23 - 24 - # we "borrow" the plugin LDS file 25 - LDS := $(APPSDIR)/plugins/plugin.lds 26 - 27 - LINKCODEC := $(OBJDIR)/codeclink.lds 28 - DEPFILE = $(OBJDIR)/dep-codecs 29 - 30 - # This sets up 'SRC' based on the files mentioned in SOURCES 31 - include $(TOOLSDIR)/makesrc.inc 32 - 33 - ROCKS := $(SRC:%.c=$(OBJDIR)/%.codec) 34 - SOURCES = $(SRC) 35 - ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) 36 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 37 - # as created by the cross-compiler for win32: 38 - DEFS := $(SRC:%.c=$(OBJDIR)/%.def) 39 - DIRS = . 40 - 41 - CODECLIB := $(BUILDDIR)/libcodec.a 42 - CODECDEPS = $(LINKCODEC) $(CODECLIB) 43 - 44 - .PHONY: libspc libmad liba52 libffmpegFLAC libtremor libspeex libwavpack libmusepack libalac libfaad libm4a libdemac libwma libasap 45 - 46 - all: $(LINKCODEC) $(ROCKS) 47 - 48 - ifndef SIMVER 49 - $(BUILDDIR)/%.a : % $(CODECDEPS) 50 - 51 - # special dependencies 52 - $(OBJDIR)/spc.elf : $(BUILDDIR)/libspc.a 53 - $(OBJDIR)/mpa.elf : $(BUILDDIR)/libmad.a 54 - $(OBJDIR)/a52.elf : $(BUILDDIR)/liba52.a 55 - $(OBJDIR)/flac.elf : $(BUILDDIR)/libffmpegFLAC.a 56 - $(OBJDIR)/vorbis.elf : $(BUILDDIR)/libtremor.a 57 - $(OBJDIR)/speex.elf : $(BUILDDIR)/libspeex.a 58 - $(OBJDIR)/mpc.elf : $(BUILDDIR)/libmusepack.a 59 - $(OBJDIR)/wavpack.elf : $(BUILDDIR)/libwavpack.a 60 - $(OBJDIR)/alac.elf : $(BUILDDIR)/libalac.a $(BUILDDIR)/libm4a.a 61 - $(OBJDIR)/aac.elf : $(BUILDDIR)/libfaad.a $(BUILDDIR)/libm4a.a 62 - $(OBJDIR)/shorten.elf : $(BUILDDIR)/libffmpegFLAC.a 63 - $(OBJDIR)/ape.elf : $(BUILDDIR)/libdemac.a 64 - $(OBJDIR)/wma.elf : $(BUILDDIR)/libwma.a 65 - $(OBJDIR)/wavpack_enc.elf: $(BUILDDIR)/libwavpack.a 66 - $(OBJDIR)/asap.elf : $(BUILDDIR)/libasap.a 67 - 68 - # standard dependencies 69 - $(OBJDIR)/%.elf: $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(CODECLIB) 70 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $^ \ 71 - -L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) \ 72 - -Wl,--gc-sections,-Map,$(OBJDIR)/$*.map 73 - 74 - $(OBJDIR)/%.codec : $(OBJDIR)/%.elf 75 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 76 - else 77 - 78 - ifeq ($(SIMVER), x11) 79 - ################################################### 80 - # This is the X11 simulator version 81 - 82 - $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT) 83 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< $(OBJDIR)/codec_crt0.o -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ 84 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 85 - # 'x' must be kept or you'll have "Win32 error 5" 86 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 87 - # #define ERROR_ACCESS_DENIED 5L 88 - else 89 - $(SILENT)chmod -x $@ 90 - endif 91 - 92 - else # end of x11-simulator 93 - ifeq ($(SIMVER), sdl) 94 - ################################################### 95 - # This is the SDL simulator version 96 - 97 - $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT) 98 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< $(OBJDIR)/codec_crt0.o -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ 99 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 100 - # 'x' must be kept or you'll have "Win32 error 5" 101 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 102 - # #define ERROR_ACCESS_DENIED 5L 103 - else 104 - $(SILENT)chmod -x $@ 105 - endif 106 - 107 - else # end of sdl-simulator 108 - ################################################### 109 - # This is the win32 simulator version 110 - DLLTOOLFLAGS = --export-all 111 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 112 - 113 - $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT) 114 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< $(OBJDIR)/codec_crt0.o 115 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(OBJDIR)/codec_crt0.o\ 116 - $(BUILDDIR)/libcodec.a $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) \ 117 - -o $@ 118 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 119 - # 'x' must be kept or you'll have "Win32 error 5" 120 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 121 - # #define ERROR_ACCESS_DENIED 5L 122 - else 123 - $(SILENT)chmod -x $@ 124 - endif 125 - endif # end of win32-simulator 126 - endif 127 - 128 - endif # end of simulator section 129 - 130 - include $(TOOLSDIR)/make.inc 131 - 132 - $(BUILDDIR)/libcodec.a: 133 - $(SILENT)mkdir -p $(OBJDIR)/lib 134 - $(call PRINTS,MAKE in codecs/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib 135 - 136 - $(LINKCODEC): $(LDS) 137 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ 138 - 139 - $(BUILDDIR)/libspc.a: libspc 140 - 141 - libspc: 142 - $(SILENT)mkdir -p $(OBJDIR)/libspc 143 - $(call PRINTS,MAKE in libspc)$(MAKE) -C libspc OBJDIR=$(OBJDIR)/libspc OUTPUT=$(BUILDDIR)/libspc.a 144 - 145 - $(BUILDDIR)/libmad.a: libmad 146 - 147 - libmad: 148 - $(SILENT)mkdir -p $(OBJDIR)/libmad 149 - $(call PRINTS,MAKE in libmad)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a 150 - 151 - $(BUILDDIR)/liba52.a: liba52 152 - 153 - liba52: 154 - $(SILENT)mkdir -p $(OBJDIR)/liba52 155 - $(call PRINTS,MAKE in liba52)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a 156 - 157 - $(BUILDDIR)/libwma.a: libwma 158 - 159 - libwma: 160 - $(SILENT)mkdir -p $(OBJDIR)/libwma 161 - $(call PRINTS,MAKE in libwma)$(MAKE) -C libwma OBJDIR=$(OBJDIR)/libwma OUTPUT=$(BUILDDIR)/libwma.a 162 - 163 - $(BUILDDIR)/libffmpegFLAC.a: libffmpegFLAC 164 - 165 - libffmpegFLAC: 166 - $(SILENT)mkdir -p $(OBJDIR)/libffmpegFLAC 167 - $(call PRINTS,MAKE in libffmpegFLAC)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a 168 - 169 - $(BUILDDIR)/libtremor.a: libtremor 170 - 171 - libtremor: 172 - $(SILENT)mkdir -p $(OBJDIR)/libtremor 173 - $(call PRINTS,MAKE in libtremor)$(MAKE) -C libtremor OBJDIR=$(OBJDIR)/libtremor OUTPUT=$(BUILDDIR)/libtremor.a 174 - 175 - $(BUILDDIR)/libspeex.a: libspeex 176 - 177 - libspeex: 178 - $(SILENT)mkdir -p $(OBJDIR)/libspeex 179 - $(call PRINTS,MAKE in libspeex)$(MAKE) -C libspeex OBJDIR=$(OBJDIR)/libspeex OUTPUT=$(BUILDDIR)/libspeex.a 180 - 181 - $(BUILDDIR)/libwavpack.a: libwavpack 182 - 183 - libwavpack: 184 - $(SILENT)mkdir -p $(OBJDIR)/libwavpack 185 - $(call PRINTS,MAKE in libwavpack)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a 186 - 187 - $(BUILDDIR)/libmusepack.a: libmusepack 188 - 189 - libmusepack: 190 - $(SILENT)mkdir -p $(OBJDIR)/libmusepack 191 - $(call PRINTS,MAKE in libmusepack)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a 192 - 193 - $(BUILDDIR)/libalac.a: libalac 194 - 195 - libalac: 196 - $(SILENT)mkdir -p $(OBJDIR)/libalac 197 - $(call PRINTS,MAKE in libalac)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a 198 - 199 - $(BUILDDIR)/libm4a.a: libm4a 200 - 201 - libm4a: 202 - $(SILENT)mkdir -p $(OBJDIR)/libm4a 203 - $(call PRINTS,MAKE in libm4a)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a 204 - 205 - $(BUILDDIR)/libfaad.a: libfaad 206 - 207 - libfaad: 208 - $(SILENT)mkdir -p $(OBJDIR)/libfaad 209 - $(call PRINTS,MAKE in libfaad)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a 210 - 211 - $(BUILDDIR)/libdemac.a: libdemac 212 - 213 - libdemac: 214 - $(SILENT)mkdir -p $(OBJDIR)/libdemac 215 - $(call PRINTS,MAKE in libdemac)$(MAKE) -C demac/libdemac OBJDIR=$(OBJDIR)/libdemac OUTPUT=$(BUILDDIR)/libdemac.a 216 - 217 - $(BUILDDIR)/libasap.a: libasap 218 - 219 - libasap: 220 - $(SILENT)mkdir -p $(OBJDIR)/libasap 221 - $(call PRINTS,MAKE in libasap)$(MAKE) -C libasap OBJDIR=$(OBJDIR)/libasap OUTPUT=$(BUILDDIR)/libasap.a 222 - clean: 223 - $(call PRINTS,cleaning codecs)rm -fr \ 224 - $(OBJDIR)/libspc $(BUILDDIR)/libspc.a \ 225 - $(OBJDIR)/libmad $(BUILDDIR)/libmad.a \ 226 - $(OBJDIR)/liba52 $(BUILDDIR)/liba52.a \ 227 - $(OBJDIR)/libffmpegFLAC $(BUILDDIR)/libffmpegFLAC.a \ 228 - $(OBJDIR)/libtremor $(BUILDDIR)/libtremor.a \ 229 - $(OBJDIR)/libspeex $(BUILDDIR)/libSpeex.a \ 230 - $(OBJDIR)/libwavpack $(BUILDDIR)/libwavpack.a \ 231 - $(OBJDIR)/libmusepack $(BUILDDIR)/libmusepack.a \ 232 - $(OBJDIR)/libalac $(BUILDDIR)/libalac.a \ 233 - $(OBJDIR)/libfaad $(BUILDDIR)/libfaad.a \ 234 - $(OBJDIR)/libm4a $(BUILDDIR)/libm4a.a \ 235 - $(OBJDIR)/libdemac $(BUILDDIR)/libdemac.a \ 236 - $(OBJDIR)/libwma $(BUILDDIR)/libwma.a 237 - $(OBJDIR)/libasap $(BUILDDIR)/libasap.a 238 - $(SILENT)$(MAKE) -C libspc clean OBJDIR=$(OBJDIR)/libspc 239 - $(SILENT)$(MAKE) -C libmad clean OBJDIR=$(OBJDIR)/libmad 240 - $(SILENT)$(MAKE) -C liba52 clean OBJDIR=$(OBJDIR)/liba52 241 - $(SILENT)$(MAKE) -C libffmpegFLAC clean OBJDIR=$(OBJDIR)/libffmpegFLAC 242 - $(SILENT)$(MAKE) -C libtremor clean OBJDIR=$(OBJDIR)/libtremor 243 - $(SILENT)$(MAKE) -C libspeex clean OBJDIR=$(OBJDIR)/libspeex 244 - $(SILENT)$(MAKE) -C libwavpack clean OBJDIR=$(OBJDIR)/libwavpack 245 - $(SILENT)$(MAKE) -C libmusepack clean OBJDIR=$(OBJDIR)/libmusepack 246 - $(SILENT)$(MAKE) -C libalac clean OBJDIR=$(OBJDIR)/libalac 247 - $(SILENT)$(MAKE) -C libfaad clean OBJDIR=$(OBJDIR)/libfaad 248 - $(SILENT)$(MAKE) -C libm4a clean OBJDIR=$(OBJDIR)/libm4a 249 - $(SILENT)$(MAKE) -C demac/libdemac clean OBJDIR=$(OBJDIR)/libdemac 250 - $(SILENT)$(MAKE) -C libwma clean OBJDIR=$(OBJDIR)/libwma 251 - $(SILENT)$(MAKE) -C libasap clean OBJDIR=$(OBJDIR)/libasap 252 - $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib 253 - 254 - ifneq ($(MAKECMDGOALS),clean) 255 - -include $(DEPFILE) 256 - endif
-1
apps/codecs/ape.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "codeclib.h" 23 - #define ROCKBOX 24 23 #include <codecs/demac/libdemac/demac.h> 25 24 26 25 CODEC_HEADER
-49
apps/codecs/codec.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2005 Jens Arnold 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - 22 - /* Global declarations to be used in rockbox software codecs */ 23 - 24 - #include "config.h" 25 - #include "system.h" 26 - 27 - #include <sys/types.h> 28 - 29 - extern struct codec_api *ci; 30 - 31 - /* Get these functions 'out of the way' of the standard functions. Not doing 32 - * so confuses the cygwin linker, and maybe others. These functions need to 33 - * be implemented elsewhere */ 34 - #define malloc(x) codec_malloc(x) 35 - #define calloc(x,y) codec_calloc(x,y) 36 - #define realloc(x,y) codec_realloc(x,y) 37 - #define free(x) codec_free(x) 38 - #define alloca(x) __builtin_alloca(x) 39 - 40 - void* codec_malloc(size_t size); 41 - void* codec_calloc(size_t nmemb, size_t size); 42 - void* codec_realloc(void* ptr, size_t size); 43 - void codec_free(void* ptr); 44 - 45 - #define abs(x) ((x)>0?(x):-(x)) 46 - #define labs(x) abs(x) 47 - 48 - void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); 49 -
+103
apps/codecs/codecs.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + CODECDIR = $(BUILDDIR)/apps/codecs 11 + CODECS_SRC := $(call preprocess, $(APPSDIR)/codecs/SOURCES) 12 + OTHER_SRC += $(CODECS_SRC) 13 + 14 + CODECS := $(CODECS_SRC:.c=.codec) 15 + CODECS := $(subst $(ROOTDIR),$(BUILDDIR),$(CODECS)) 16 + 17 + # the codec helper library 18 + include $(APPSDIR)/codecs/lib/libcodec.make 19 + 20 + # the codec libraries 21 + include $(APPSDIR)/codecs/demac/libdemac.make 22 + include $(APPSDIR)/codecs/liba52/liba52.make 23 + include $(APPSDIR)/codecs/libalac/libalac.make 24 + include $(APPSDIR)/codecs/libasap/libasap.make 25 + include $(APPSDIR)/codecs/libfaad/libfaad.make 26 + include $(APPSDIR)/codecs/libffmpegFLAC/libffmpegFLAC.make 27 + include $(APPSDIR)/codecs/libm4a/libm4a.make 28 + include $(APPSDIR)/codecs/libmad/libmad.make 29 + include $(APPSDIR)/codecs/libmusepack/libmusepack.make 30 + include $(APPSDIR)/codecs/libspc/libspc.make 31 + include $(APPSDIR)/codecs/libspeex/libspeex.make 32 + include $(APPSDIR)/codecs/libtremor/libtremor.make 33 + include $(APPSDIR)/codecs/libwavpack/libwavpack.make 34 + include $(APPSDIR)/codecs/libwma/libwma.make 35 + 36 + # compile flags for codecs 37 + CODECFLAGS = $(CFLAGS) -I$(APPSDIR)/codecs -I$(APPSDIR)/codecs/lib \ 38 + -DCODEC 39 + 40 + CODEC_LDS := $(APPSDIR)/plugins/plugin.lds # codecs and plugins use same file 41 + CODECLINK_LDS := $(CODECDIR)/codec.link 42 + CODEC_CRT0 := $(CODECDIR)/codec_crt0.o 43 + 44 + CODECLIBS := $(DEMACLIB) $(A52LIB) $(ALACLIB) $(ASAPLIB) \ 45 + $(FAADLIB) $(FFMPEGFLACLIB) $(M4ALIB) $(MADLIB) $(MUSEPACKLIB) \ 46 + $(SPCLIB) $(SPEEXLIB) $(TREMORLIB) $(WAVPACKLIB) $(WMALIB) \ 47 + $(CODECLIB) 48 + 49 + $(CODECS): $(CODEC_CRT0) $(CODECLINK_LDS) 50 + 51 + $(CODECLINK_LDS): $(CODEC_LDS) 52 + $(call PRINTS,PP $(@F)) 53 + $(call preprocess2file, $<, $@) 54 + 55 + # codec/library dependencies 56 + $(CODECDIR)/spc.codec : $(CODECDIR)/libspc.a 57 + $(CODECDIR)/mpa.codec : $(CODECDIR)/libmad.a 58 + $(CODECDIR)/a52.codec : $(CODECDIR)/liba52.a 59 + $(CODECDIR)/flac.codec : $(CODECDIR)/libffmpegFLAC.a 60 + $(CODECDIR)/vorbis.codec : $(CODECDIR)/libtremor.a 61 + $(CODECDIR)/speex.codec : $(CODECDIR)/libspeex.a 62 + $(CODECDIR)/mpc.codec : $(CODECDIR)/libmusepack.a 63 + $(CODECDIR)/wavpack.codec : $(CODECDIR)/libwavpack.a 64 + $(CODECDIR)/alac.codec : $(CODECDIR)/libalac.a $(CODECDIR)/libm4a.a 65 + $(CODECDIR)/aac.codec : $(CODECDIR)/libfaad.a $(CODECDIR)/libm4a.a 66 + $(CODECDIR)/shorten.codec : $(CODECDIR)/libffmpegFLAC.a 67 + $(CODECDIR)/ape.codec : $(CODECDIR)/libdemac.a 68 + $(CODECDIR)/wma.codec : $(CODECDIR)/libwma.a 69 + $(CODECDIR)/wavpack_enc.codec: $(CODECDIR)/libwavpack.a 70 + $(CODECDIR)/asap.codec : $(CODECDIR)/libasap.a 71 + 72 + $(CODECS): $(CODECLIB) # this must be last in codec dependency list 73 + 74 + # libfaad and libmusepack both contain a huffman.h file, with different 75 + # content. So we compile them with special command lines: 76 + 77 + # pattern rule for compiling codecs 78 + $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.c 79 + $(SILENT)mkdir -p $(dir $@) 80 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 81 + -I$(dir $<) $(CODECFLAGS) -c $< -o $@ 82 + 83 + # pattern rule for compiling codecs 84 + $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S 85 + $(SILENT)mkdir -p $(dir $@) 86 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 87 + -I$(dir $<) $(CODECFLAGS) -c $< -o $@ 88 + 89 + ifdef SIMVER 90 + CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile 91 + else 92 + CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 93 + CODECFLAGS += -UDEBUG -DNDEBUG 94 + endif 95 + 96 + $(CODECDIR)/%.codec: $(CODECDIR)/%.o 97 + $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \ 98 + $(filter %.o, $^) \ 99 + $(filter %.a, $^) \ 100 + -lgcc $(CODECLDFLAGS) 101 + $(call PRINTS,OC $(@F))$(OC) -O binary $(CODECDIR)/$*.elf $@ 102 + 103 +
+24
apps/codecs/demac/libdemac.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libdemac 11 + DEMACLIB := $(CODECDIR)/libdemac.a 12 + DEMACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/demac/libdemac/SOURCES) 13 + DEMACLIB_OBJ := $(call c2obj, $(DEMACLIB_SRC)) 14 + OTHER_SRC += $(DEMACLIB_SRC) 15 + 16 + $(DEMACLIB): $(DEMACLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + DEMACFLAGS = $(filter-out -O%,$(CODECFLAGS)) 20 + DEMACFLAGS += -O3 21 + 22 + $(CODECDIR)/demac/%.o: $(ROOTDIR)/apps/codecs/demac/%.c 23 + $(SILENT)mkdir -p $(dir $@) 24 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(DEMACFLAGS) -c $< -o $@
+1 -1
apps/codecs/demac/libdemac/demac_config.h
··· 33 33 #include "config.h" 34 34 35 35 #ifndef __ASSEMBLER__ 36 - #include "../lib/codeclib.h" 36 + #include "codeclib.h" 37 37 #include <codecs.h> 38 38 #endif 39 39
-50
apps/codecs/lib/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - # ../.. for the codec.h in the apps dir 11 - # .. for stuff in the codecs dir 12 - # . for stuff in the codeclib dir 13 - INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 14 - -I$(FIRMDIR)/common -I$(BUILDDIR) 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - CFLAGS = $(INCLUDES) $(GCCOPTS) \ 21 - $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -DCODEC 22 - 23 - # Sectioned compilation for target 24 - ifndef SIMVER 25 - CFLAGS += -ffunction-sections -fdata-sections 26 - endif 27 - 28 - # This sets up 'SRC' based on the files mentioned in SOURCES 29 - include $(TOOLSDIR)/makesrc.inc 30 - 31 - SOURCES = $(SRC) 32 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 33 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 34 - DEPFILE = $(OBJDIR)/dep-codeclib 35 - DIRS = . 36 - 37 - OUTPUT = $(BUILDDIR)/libcodec.a 38 - 39 - all: $(OUTPUT) 40 - 41 - $(OUTPUT): $(OBJS) 42 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 43 - $(SILENT)$(RANLIB) $@ 44 - 45 - include $(TOOLSDIR)/make.inc 46 - 47 - clean: 48 - $(call PRINTS,cleaning codecs/lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 49 - 50 - -include $(DEPFILE)
+2 -2
apps/codecs/lib/codeclib.c
··· 27 27 #include "codeclib.h" 28 28 #include "metadata.h" 29 29 30 - long mem_ptr; 31 - long bufsize; 30 + size_t mem_ptr; 31 + size_t bufsize; 32 32 unsigned char* mp3buf; // The actual MP3 buffer from Rockbox 33 33 unsigned char* mallocbuf; // 512K from the start of MP3 buffer 34 34 unsigned char* filebuf; // The rest of the MP3 buffer
+11 -2
apps/codecs/lib/codeclib.h
··· 25 25 #include <sys/types.h> 26 26 27 27 extern struct codec_api *ci; 28 - extern long mem_ptr; 29 - extern long bufsize; 28 + extern size_t mem_ptr; 29 + extern size_t bufsize; 30 30 extern unsigned char* mp3buf; /* The actual MP3 buffer from Rockbox */ 31 31 extern unsigned char* mallocbuf; /* The free space after the codec in the codec buffer */ 32 32 extern unsigned char* filebuf; /* The rest of the MP3 buffer */ 33 33 34 34 /* Standard library functions that are used by the codecs follow here */ 35 + 36 + /* Get these functions 'out of the way' of the standard functions. Not doing 37 + * so confuses the cygwin linker, and maybe others. These functions need to 38 + * be implemented elsewhere */ 39 + #define malloc(x) codec_malloc(x) 40 + #define calloc(x,y) codec_calloc(x,y) 41 + #define realloc(x,y) codec_realloc(x,y) 42 + #define free(x) codec_free(x) 43 + #define alloca(x) __builtin_alloca(x) 35 44 36 45 void* codec_malloc(size_t size); 37 46 void* codec_calloc(size_t nmemb, size_t size);
+23
apps/codecs/lib/libcodec.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + CODECLIB := $(CODECDIR)/libcodec.a 11 + CODECLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/lib/SOURCES) 12 + CODECLIB_OBJ := $(call c2obj, $(CODECLIB_SRC)) 13 + OTHER_SRC += $(CODECLIB_SRC) 14 + 15 + $(CODECLIB): $(CODECLIB_OBJ) 16 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 17 + 18 + CODECLIBFLAGS = $(CODECFLAGS) -ffunction-sections 19 + 20 + $(CODECDIR)/lib/%.o: $(ROOTDIR)/apps/codecs/lib/%.c 21 + $(SILENT)mkdir -p $(dir $@) 22 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 23 + -I$(dir $<) $(CODECLIBFLAGS) -c $< -o $@
-43
apps/codecs/liba52/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - A52OPTS = -O2 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(A52OPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-liba52 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning liba52)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+1 -1
apps/codecs/liba52/config-a52.h
··· 1 - #include "../codec.h" 1 + #include "codeclib.h" 2 2 3 3 /* a52dec profiling */ 4 4 /* #undef A52DEC_GPROF */
+17
apps/codecs/liba52/liba52.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # liba52 11 + A52LIB := $(CODECDIR)/liba52.a 12 + A52LIB_SRC := $(call preprocess, $(APPSDIR)/codecs/liba52/SOURCES) 13 + A52LIB_OBJ := $(call c2obj, $(A52LIB_SRC)) 14 + OTHER_SRC += $(A52LIB_SRC) 15 + 16 + $(A52LIB): $(A52LIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
-43
apps/codecs/libalac/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - ALACOPTS = -O3 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(ALACOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libalac 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libalac)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+1 -1
apps/codecs/libalac/alac.c
··· 35 35 #include <string.h> 36 36 #include <inttypes.h> 37 37 38 - #include "../codec.h" 38 + #include "codeclib.h" 39 39 #include "decomp.h" 40 40 41 41 int16_t predictor_coef_table[32] IBSS_ATTR;
+24
apps/codecs/libalac/libalac.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libalac 11 + ALACLIB := $(CODECDIR)/libalac.a 12 + ALACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libalac/SOURCES) 13 + ALACLIB_OBJ := $(call c2obj, $(ALACLIB_SRC)) 14 + OTHER_SRC += $(ALACLIB_SRC) 15 + 16 + $(ALACLIB): $(ALACLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + ALACFLAGS = $(filter-out -O%,$(CODECFLAGS)) 20 + ALACFLAGS += -O3 21 + 22 + $(CODECDIR)/libalac/%.o: $(ROOTDIR)/apps/codecs/libalac/%.c 23 + $(SILENT)mkdir -p $(dir $@) 24 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(ALACFLAGS) -c $< -o $@
-44
apps/codecs/libasap/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id: Makefile 13920 2007-07-16 21:16:52Z jethead71 $ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I../lib -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - SPCOPTS = -O -DROCKBOX 18 - 19 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPCOPTS) $(TARGET) \ 20 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DEPFILE = $(OBJDIR)/dep-spc 29 - DIRS = 30 - 31 - all: $(OUTPUT) 32 - 33 - $(OUTPUT): $(OBJS) 34 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 35 - $(SILENT)$(RANLIB) $@ 36 - 37 - include $(TOOLSDIR)/make.inc 38 - 39 - clean: 40 - $(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 41 - 42 - ifneq ($(MAKECMDGOALS),clean) 43 - -include $(DEPFILE) 44 - endif
+24
apps/codecs/libasap/libasap.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libasap 11 + ASAPLIB := $(CODECDIR)/libasap.a 12 + ASAPLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libasap/SOURCES) 13 + ASAPLIB_OBJ := $(call c2obj, $(ASAPLIB_SRC)) 14 + OTHER_SRC += $(ASAPLIB_SRC) 15 + 16 + $(ASAPLIB): $(ASAPLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + ASAPFLAGS = $(filter-out -O%,$(CODECFLAGS)) 20 + ASAPFLAGS += -O1 21 + 22 + $(CODECDIR)/libasap/%.o: $(ROOTDIR)/apps/codecs/libasap/%.c 23 + $(SILENT)mkdir -p $(dir $@) 24 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(ASAPFLAGS) -c $< -o $@
-43
apps/codecs/libfaad/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - FAADOPTS = -O2 -Wno-char-subscripts 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FAADOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libfaad 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libfaad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+1 -2
apps/codecs/libfaad/common.h
··· 33 33 #endif 34 34 35 35 #include "faad_config.h" 36 - #include "../codec.h" 37 - #include "../lib/codeclib.h" 36 + #include "codeclib.h" 38 37 39 38 extern struct codec_api* ci; 40 39
+18
apps/codecs/libfaad/libfaad.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libfaad 11 + FAADLIB := $(CODECDIR)/libfaad.a 12 + FAADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libfaad/SOURCES) 13 + FAADLIB_OBJ := $(call c2obj, $(FAADLIB_SRC)) 14 + OTHER_SRC += $(FAADLIB_SRC) 15 + OTHER_INC += -I$(APPSDIR)/codecs/libfaad 16 + 17 + $(FAADLIB): $(FAADLIB_OBJ) 18 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
-43
apps/codecs/libffmpegFLAC/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - FLACOPTS = -O2 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FLACOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libffmpegFLAC 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libffmpegFLAC)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+1 -1
apps/codecs/libffmpegFLAC/decoder.c
··· 34 34 #include <inttypes.h> 35 35 #include <stdbool.h> 36 36 #ifndef BUILD_STANDALONE 37 - #include "../codec.h" 37 + #include "codeclib.h" 38 38 #endif 39 39 40 40 #include "bitstream.h"
+17
apps/codecs/libffmpegFLAC/libffmpegFLAC.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libffmpegFLAC 11 + FFMPEGFLACLIB := $(CODECDIR)/libffmpegFLAC.a 12 + FFMPEGFLACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libffmpegFLAC/SOURCES) 13 + FFMPEGFLACLIB_OBJ := $(call c2obj, $(FFMPEGFLACLIB_SRC)) 14 + OTHER_SRC += $(FFMPEGFLACLIB_SRC) 15 + 16 + $(FFMPEGFLACLIB): $(FFMPEGFLACLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
+1 -1
apps/codecs/libffmpegFLAC/tables.c
··· 1 1 #ifdef BUILD_STANDALONE 2 2 #define ICONST_ATTR 3 3 #else 4 - #include "../codec.h" 4 + #include "codeclib.h" 5 5 #endif 6 6 #include <inttypes.h> 7 7
-43
apps/codecs/libm4a/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - M4AOPTS = -O3 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(M4AOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libm4a 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libm4a)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+4 -1
apps/codecs/libm4a/demux.c
··· 33 33 #include <inttypes.h> 34 34 #include <stdlib.h> 35 35 36 - #include "../codec.h" 36 + #include "codeclib.h" 37 37 38 38 #include "m4a.h" 39 39 40 40 #if defined(DEBUG) || defined(SIMULATOR) 41 + #ifdef DEBUGF 42 + #undef DEBUGF 43 + #endif 41 44 #define DEBUGF qtmovie->stream->ci->debugf 42 45 #else 43 46 #define DEBUGF(...)
+24
apps/codecs/libm4a/libm4a.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libm4a 11 + M4ALIB := $(CODECDIR)/libm4a.a 12 + M4ALIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libm4a/SOURCES) 13 + M4ALIB_OBJ := $(call c2obj, $(M4ALIB_SRC)) 14 + OTHER_SRC += $(M4ALIB_SRC) 15 + 16 + $(M4ALIB): $(M4ALIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + M4AFLAGS = $(filter-out -O%,$(CODECFLAGS)) 20 + M4AFLAGS += -O3 21 + 22 + $(CODECDIR)/libm4a/%.o: $(ROOTDIR)/apps/codecs/libm4a/%.c 23 + $(SILENT)mkdir -p $(dir $@) 24 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(M4AFLAGS) -c $< -o $@
-7
apps/codecs/libm4a/m4a.c
··· 23 23 #include <inttypes.h> 24 24 #include "m4a.h" 25 25 26 - #if defined(DEBUG) || defined(SIMULATOR) 27 - extern struct codec_api* rb; 28 - #define DEBUGF rb->debugf 29 - #else 30 - #define DEBUGF(...) 31 - #endif 32 - 33 26 /* Implementation of the stream.h functions used by libalac */ 34 27 35 28 #define _Swap32(v) do { \
-50
apps/codecs/libmad/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - # NOTE: FPM_ define has been moved to global.h 18 - MADOPTS = -UDEBUG -DNDEBUG -O2 19 - 20 - # We build libmad separately for mpegplayer 21 - ifdef MPEGPLAYER 22 - EXTRA_DEFINES += -DMPEGPLAYER 23 - endif 24 - 25 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \ 26 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 27 - 28 - # This sets up 'SRC' based on the files mentioned in SOURCES 29 - include $(TOOLSDIR)/makesrc.inc 30 - 31 - SOURCES = $(SRC) 32 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 33 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 34 - DEPFILE = $(OBJDIR)/dep-libmad 35 - DIRS = 36 - 37 - all: $(OUTPUT) 38 - 39 - $(OUTPUT): $(OBJS) 40 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 41 - $(SILENT)$(RANLIB) $@ 42 - 43 - include $(TOOLSDIR)/make.inc 44 - 45 - clean: 46 - $(call PRINTS,cleaning libmad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 47 - 48 - ifneq ($(MAKECMDGOALS),clean) 49 - -include $(DEPFILE) 50 - endif
+1 -1
apps/codecs/libmad/frame.c
··· 31 31 # include "timer.h" 32 32 # include "layer12.h" 33 33 # include "layer3.h" 34 - # include "../lib/codeclib.h" 34 + # include "codeclib.h" 35 35 36 36 static 37 37 unsigned long const bitrate_table[5][15] = {
+1 -1
apps/codecs/libmad/global.h
··· 19 19 * $Id$ 20 20 */ 21 21 22 - #include "../codec.h" 22 + #include "codeclib.h" 23 23 24 24 # ifndef LIBMAD_GLOBAL_H 25 25 # define LIBMAD_GLOBAL_H
+54
apps/codecs/libmad/libmad.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # we need to build two different mad libraries 11 + # (one for codec, one for mpegplayer) 12 + # so a little trickery is necessary 13 + 14 + MADFLAGS = $(CODECFLAGS) -UDEBUG -DNDEBUG -I$(APPSDIR)/codecs/libmad 15 + MPEGMADFLAGS = $(MADFLAGS) -DMPEGPLAYER 16 + 17 + # libmad 18 + MADLIB := $(CODECDIR)/libmad.a 19 + MADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmad/SOURCES) 20 + MADLIB_OBJ := $(call c2obj, $(MADLIB_SRC)) 21 + OTHER_SRC += $(MADLIB_SRC) 22 + 23 + $(MADLIB): $(MADLIB_OBJ) 24 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 25 + 26 + # libmad-mpeg 27 + MPEGMADLIB := $(CODECDIR)/libmad-mpeg.a 28 + MPEGMADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmad/SOURCES) 29 + MPEGMADLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libmad,$(BUILDDIR)/apps/codecs/libmad-mpeg,$(MPEGMADLIB_SRC)))) 30 + 31 + $(MPEGMADLIB): $(MPEGMADLIB_OBJ) 32 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 33 + 34 + # pattern rules 35 + 36 + $(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.c 37 + $(SILENT)mkdir -p $(dir $@) 38 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ 39 + $(CC) $(MPEGMADFLAGS) -c $< -o $@ 40 + 41 + $(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.S 42 + $(SILENT)mkdir -p $(dir $@) 43 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ 44 + $(CC) $(MPEGMADFLAGS) -c $< -o $@ 45 + 46 + $(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.c 47 + $(SILENT)mkdir -p $(dir $@) 48 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ 49 + $(CC) $(MADFLAGS) -c $< -o $@ 50 + 51 + $(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.S 52 + $(SILENT)mkdir -p $(dir $@) 53 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ 54 + $(CC) $(MADFLAGS) -c $< -o $@
-49
apps/codecs/libmusepack/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - # libmusepack is faster on ARM-targets with -O1 instead of -O2 18 - ifeq ($(CPU),arm) 19 - MUSEPACKOPTS += -O1 20 - else 21 - MUSEPACKOPTS += -O2 22 - endif 23 - 24 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MUSEPACKOPTS) $(TARGET) \ 25 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 26 - 27 - # This sets up 'SRC' based on the files mentioned in SOURCES 28 - include $(TOOLSDIR)/makesrc.inc 29 - 30 - SOURCES = $(SRC) 31 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 32 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 33 - DEPFILE = $(OBJDIR)/dep-libmusepack 34 - DIRS = 35 - 36 - all: $(OUTPUT) 37 - 38 - $(OUTPUT): $(OBJS) 39 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 40 - $(SILENT)$(RANLIB) $@ 41 - 42 - include $(TOOLSDIR)/make.inc 43 - 44 - clean: 45 - $(call PRINTS,cleaning libmusepack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 46 - 47 - ifneq ($(MAKECMDGOALS),clean) 48 - -include $(DEPFILE) 49 - endif
+3 -3
apps/codecs/libmusepack/huffsv46.c
··· 35 35 /// \file huffsv46.c 36 36 /// Implementations of huffman decoding for streamversions < 7. 37 37 38 - #include <musepack.h> 39 - #include <requant.h> 40 - #include <huffman.h> 38 + #include "musepack.h" 39 + #include "requant.h" 40 + #include "huffman.h" 41 41 42 42 #ifdef MPC_SUPPORT_SV456 43 43
+3 -3
apps/codecs/libmusepack/huffsv7.c
··· 35 35 /// \file huffsv7.c 36 36 /// Implementations of sv7 huffman decoding functions. 37 37 38 - #include <musepack.h> 39 - #include <huffman.h> 40 - #include <requant.h> 38 + #include "musepack.h" 39 + #include "huffman.h" 40 + #include "requant.h" 41 41 42 42 const HuffmanTyp mpc_table_HuffHdr [10] ICONST_ATTR = 43 43 {{2147483648u,1,0},{1610612736u,3,1},{1577058304u,7,-4},{1568669696u,9,3},{1560281088u,9,4},{1543503872u,8,-5},{1476395008u,6,2},{1342177280u,5,-3},{1073741824u,4,-2},{0u,2,-1},};
+29
apps/codecs/libmusepack/libmusepack.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libmusepack 11 + MUSEPACKLIB := $(CODECDIR)/libmusepack.a 12 + MUSEPACKLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmusepack/SOURCES) 13 + MUSEPACKLIB_OBJ := $(call c2obj, $(MUSEPACKLIB_SRC)) 14 + OTHER_SRC += $(MUSEPACKLIB_SRC) 15 + 16 + $(MUSEPACKLIB): $(MUSEPACKLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + # libmusepack is faster on ARM-targets with -O1 than -O2 20 + MUSEPACKFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(APPSDIR)/codecs/libmusepack 21 + ifeq ($(CPU),arm) 22 + MUSEPACKFLAGS += -O1 23 + else 24 + MUSEPACKFLAGS += -O2 25 + endif 26 + 27 + $(CODECDIR)/libmusepack/%.o: $(ROOTDIR)/apps/codecs/libmusepack/%.c 28 + $(SILENT)mkdir -p $(dir $@) 29 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(MUSEPACKFLAGS) -c $< -o $@
+3 -1
apps/codecs/libmusepack/musepack.h
··· 45 45 //#include <stdlib.h> 46 46 #include <string.h> 47 47 48 - #include "../codec.h" 48 + #ifndef SIMULATOR 49 + #include "codecs.h" 50 + #endif 49 51 #include "config_types.h" 50 52 #include "decoder.h" 51 53 #include "math.h"
-44
apps/codecs/libspc/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - SPCOPTS = -O -DROCKBOX 18 - 19 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPCOPTS) $(TARGET) \ 20 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DEPFILE = $(OBJDIR)/dep-spc 29 - DIRS = 30 - 31 - all: $(OUTPUT) 32 - 33 - $(OUTPUT): $(OBJS) 34 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 35 - $(SILENT)$(RANLIB) $@ 36 - 37 - include $(TOOLSDIR)/make.inc 38 - 39 - clean: 40 - $(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 41 - 42 - ifneq ($(MAKECMDGOALS),clean) 43 - -include $(DEPFILE) 44 - endif
+24
apps/codecs/libspc/libspc.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libspc 11 + SPCLIB := $(CODECDIR)/libspc.a 12 + SPCLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspc/SOURCES) 13 + SPCLIB_OBJ := $(call c2obj, $(SPCLIB_SRC)) 14 + OTHER_SRC += $(SPCLIB_SRC) 15 + 16 + $(SPCLIB): $(SPCLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + SPCFLAGS = $(filter-out -O%,$(CODECFLAGS)) 20 + SPCFLAGS += -O1 21 + 22 + $(CODECDIR)/libspc/%.o: $(ROOTDIR)/apps/codecs/libspc/%.c 23 + $(SILENT)mkdir -p $(dir $@) 24 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPCFLAGS) -c $< -o $@
+2
apps/codecs/libspc/spc_codec.h
··· 30 30 #define _SPC_CODEC_H_ 31 31 32 32 /* rather than comment out asserts, just define NDEBUG */ 33 + #ifndef NDEBUG 33 34 #define NDEBUG 35 + #endif 34 36 #include <assert.h> 35 37 36 38 /** Basic configuration options **/
+1 -2
apps/codecs/libspc/spc_cpu.c
··· 22 22 ****************************************************************************/ 23 23 24 24 /* The CPU portion (shock!) */ 25 - #include "codec.h" 26 - #include "codecs.h" 25 + #include "codeclib.h" 27 26 #include "spc_codec.h" 28 27 #include "spc_profiler.h" 29 28
+1 -2
apps/codecs/libspc/spc_dsp.c
··· 23 23 ****************************************************************************/ 24 24 25 25 /* The DSP portion (awe!) */ 26 - #include "codec.h" 27 - #include "codecs.h" 26 + #include "codeclib.h" 28 27 #include "spc_codec.h" 29 28 #include "spc_profiler.h" 30 29
+1 -2
apps/codecs/libspc/spc_emu.c
··· 20 20 * KIND, either express or implied. 21 21 * 22 22 ****************************************************************************/ 23 - #include "codec.h" 24 - #include "codecs.h" 23 + #include "codeclib.h" 25 24 #include "spc_codec.h" 26 25 #include "spc_profiler.h" 27 26
+1 -1
apps/codecs/libspc/spc_profiler.c
··· 25 25 26 26 #if defined(SPC_PROFILE) && defined(USEC_TIMER) 27 27 28 - #include "codec.h" 28 + #include "codeclib.h" 29 29 #include "spc_codec.h" 30 30 #define SPC_DEFINE_PROFILER_TIMERS 31 31 #include "spc_profiler.h"
-57
apps/codecs/libspeex/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id: Makefile,v 1.16 2006-09-02 22:34:13 bagder Exp $ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - SPEEXOPTS = -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER -DROCKBOX 18 - 19 - # We're faster on ARM-targets with -O1 instead of -O2 20 - ifeq ($(CPU),arm) 21 - SPEEXOPTS += -O 22 - else 23 - SPEEXOPTS += -O2 24 - endif 25 - 26 - # We build Speex separately for use as a voice codec 27 - ifdef ROCKBOX_VOICE_CODEC 28 - EXTRA_DEFINES += -DROCKBOX_VOICE_CODEC 29 - endif 30 - 31 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPEEXOPTS) $(TARGET) \ 32 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS} -Wno-unused-parameter 33 - 34 - # This sets up 'SRC' based on the files mentioned in SOURCES 35 - include $(TOOLSDIR)/makesrc.inc 36 - 37 - SOURCES = $(SRC) 38 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 39 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 40 - DEPFILE = $(OBJDIR)/dep-Speex 41 - DIRS = 42 - 43 - all: $(OUTPUT) 44 - 45 - $(OUTPUT): $(OBJS) 46 - @echo "AR+RANLIB $(notdir $@)" 47 - @$(AR) ruv $@ $+ >/dev/null 2>&1 48 - 49 - include $(TOOLSDIR)/make.inc 50 - 51 - clean: 52 - @echo "cleaning Speex" 53 - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 54 - 55 - ifneq ($(MAKECMDGOALS),clean) 56 - -include $(DEPFILE) 57 - endif
+1 -1
apps/codecs/libspeex/bits.c
··· 36 36 #include "config-speex.h" 37 37 #endif 38 38 39 - #include <speex/speex_bits.h> 39 + #include "speex/speex_bits.h" 40 40 #include "arch.h" 41 41 #include "os_support.h" 42 42
+6
apps/codecs/libspeex/cb_search.c
··· 522 522 spx_int32_t *seed 523 523 ) 524 524 { 525 + (void)nsf; 526 + (void)stack; 527 + (void)seed; 525 528 int i,j; 526 529 VARDECL(int *ind); 527 530 VARDECL(int *signs); ··· 609 612 spx_int32_t *seed 610 613 ) 611 614 { 615 + (void)par; 616 + (void)bits; 617 + (void)stack; 612 618 int i; 613 619 /* FIXME: This is bad, but I don't think the function ever gets called anyway */ 614 620 for (i=0;i<nsf;i++)
+1 -1
apps/codecs/libspeex/cb_search.h
··· 35 35 #ifndef CB_SEARCH_H 36 36 #define CB_SEARCH_H 37 37 38 - #include <speex/speex_bits.h> 38 + #include "speex/speex_bits.h" 39 39 #include "arch.h" 40 40 41 41 /** Split codebook parameters. */
+1 -1
apps/codecs/libspeex/config-speex.h
··· 1 1 #ifndef ROCKBOX_VOICE_ENCODER 2 - #include "../codec.h" 2 + #include "codeclib.h" 3 3 #include "autoconf.h" 4 4 #else 5 5 #define ICODE_ATTR
+5
apps/codecs/libspeex/filters.c
··· 353 353 #ifndef OVERRIDE_IIR_MEM16 354 354 void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack) 355 355 { 356 + (void)stack; 356 357 int i,j; 357 358 spx_word16_t yi,nyi; 358 359 ··· 497 498 all odd x[i] are zero -- well, actually they are left out of the array now 498 499 N and M are multiples of 4 */ 499 500 { 501 + (void)stack; 500 502 int i, j; 501 503 int M2, N2; 502 504 VARDECL(spx_word16_t *xx1); ··· 681 683 char *stack 682 684 ) 683 685 { 686 + (void)ak; 687 + (void)p; 688 + (void)stack; 684 689 int i; 685 690 VARDECL(spx_word16_t *iexc); 686 691 spx_word16_t old_ener, new_ener;
+3 -3
apps/codecs/libspeex/jitter.c
··· 55 55 56 56 57 57 #include "arch.h" 58 - #include <speex/speex.h> 59 - #include <speex/speex_bits.h> 60 - #include <speex/speex_jitter.h> 58 + #include "speex/speex.h" 59 + #include "speex/speex_bits.h" 60 + #include "speex/speex_jitter.h" 61 61 #include "os_support.h" 62 62 63 63 #ifndef NULL
+60
apps/codecs/libspeex/libspeex.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # we need to build two different speex libraries 11 + # (one for codec, one for core voice) 12 + # so a little trickery is necessary 13 + 14 + SPEEXFLAGS = $(filter-out -O%,$(CODECFLAGS)) \ 15 + -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \ 16 + -I$(APPSDIR)/codecs/libspeex 17 + 18 + # libspeex is faster on ARM-targets with -O1 instead of -O2 19 + ifeq ($(CPU),arm) 20 + SPEEXFLAGS += -O1 21 + else 22 + SPEEXFLAGS += -O2 23 + endif 24 + 25 + VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC 26 + 27 + # libspeex 28 + SPEEXLIB := $(CODECDIR)/libspeex.a 29 + SPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) 30 + SPEEXLIB_OBJ := $(call c2obj, $(SPEEXLIB_SRC)) 31 + OTHER_SRC += $(SPEEXLIB_SRC) 32 + 33 + $(SPEEXLIB): $(SPEEXLIB_OBJ) 34 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 35 + 36 + # libspeex-voice 37 + VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a 38 + VOICESPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) 39 + VOICESPEEXLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC)))) 40 + 41 + $(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ) 42 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 43 + 44 + # pattern rules 45 + 46 + $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c 47 + $(SILENT)mkdir -p $(dir $@) 48 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ 49 + 50 + $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S 51 + $(SILENT)mkdir -p $(dir $@) 52 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ 53 + 54 + $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c 55 + $(SILENT)mkdir -p $(dir $@) 56 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@ 57 + 58 + $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S 59 + $(SILENT)mkdir -p $(dir $@) 60 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@
+1
apps/codecs/libspeex/lsp.c
··· 409 409 /* float *ak array of LPC coefficients */ 410 410 /* int lpcrdr order of LPC coefficients */ 411 411 { 412 + (void)stack; 412 413 int i,j; 413 414 spx_word32_t xout1,xout2,xin; 414 415 spx_word32_t mult, a;
+12 -1
apps/codecs/libspeex/ltp.c
··· 38 38 #include "ltp.h" 39 39 #include "stack_alloc.h" 40 40 #include "filters.h" 41 - #include <speex/speex_bits.h> 41 + #include "speex/speex_bits.h" 42 42 #include "math_approx.h" 43 43 #include "os_support.h" 44 44 ··· 674 674 int cdbk_offset 675 675 ) 676 676 { 677 + (void)end; 678 + (void)pitch_coef; 679 + (void)stack; 677 680 int i; 678 681 int pitch; 679 682 int gain_index; ··· 826 829 int cdbk_offset 827 830 ) 828 831 { 832 + (void)end; 833 + (void)par; 834 + (void)bits; 835 + (void)stack; 836 + (void)count_lost; 837 + (void)subframe_offset; 838 + (void)last_pitch_gain; 839 + (void)cdbk_offset; 829 840 int i; 830 841 #ifdef FIXED_POINT 831 842 if (pitch_coef>63)
+1 -1
apps/codecs/libspeex/ltp.h
··· 32 32 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 33 */ 34 34 35 - #include <speex/speex_bits.h> 35 + #include "speex/speex_bits.h" 36 36 #include "arch.h" 37 37 38 38 /** LTP parameters. */
+1
apps/codecs/libspeex/ltp_arm4.h
··· 87 87 #define OVERRIDE_PITCH_XCORR 88 88 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack) 89 89 { 90 + (void)stack; 90 91 int i,j; 91 92 for (i=0;i<nb_pitch;i+=4) 92 93 {
+2 -2
apps/codecs/libspeex/modes.h
··· 36 36 #ifndef MODES_H 37 37 #define MODES_H 38 38 39 - #include <speex/speex.h> 40 - #include <speex/speex_bits.h> 39 + #include "speex/speex.h" 40 + #include "speex/speex_bits.h" 41 41 #include "arch.h" 42 42 43 43 #define NB_SUBMODES 16
+2 -2
apps/codecs/libspeex/nb_celp.c
··· 43 43 #include "filters.h" 44 44 #include "stack_alloc.h" 45 45 #include "vq.h" 46 - #include <speex/speex_bits.h> 46 + #include "speex/speex_bits.h" 47 47 #include "vbr.h" 48 48 #include "arch.h" 49 49 #include "math_approx.h" 50 50 #include "os_support.h" 51 - #include <speex/speex_callbacks.h> 51 + #include "speex/speex_callbacks.h" 52 52 53 53 #ifdef VORBIS_PSYCHO 54 54 #include "vorbis_psy.h"
+2 -2
apps/codecs/libspeex/nb_celp.h
··· 37 37 #define NB_CELP_H 38 38 39 39 #include "modes.h" 40 - #include <speex/speex_bits.h> 41 - #include <speex/speex_callbacks.h> 40 + #include "speex/speex_bits.h" 41 + #include "speex/speex_callbacks.h" 42 42 #include "vbr.h" 43 43 #include "filters.h" 44 44
+1 -1
apps/codecs/libspeex/quant_lsp.h
··· 35 35 #ifndef QUANT_LSP_H 36 36 #define QUANT_LSP_H 37 37 38 - #include <speex/speex_bits.h> 38 + #include "speex/speex_bits.h" 39 39 #include "arch.h" 40 40 41 41 #define MAX_LSP_SIZE 20
+11 -2
apps/codecs/libspeex/rockbox.h
··· 24 24 /* We don't want all this stuff if we're building encoder */ 25 25 #ifndef ROCKBOX_VOICE_ENCODER 26 26 27 - #include "../codec.h" 28 - #include "../lib/codeclib.h" 27 + #include "codeclib.h" 29 28 #include "debug.h" 30 29 31 30 #if !defined(ROCKBOX_VOICE_CODEC) ··· 34 33 #undef DEBUGF 35 34 #define DEBUGF ci->debugf 36 35 #endif 36 + 37 37 38 38 #ifdef ROCKBOX_HAS_LOGF 39 39 #undef LOGF ··· 75 75 #define OVERRIDE_SPEEX_FATAL 1 76 76 static inline void _speex_fatal(const char *str, const char *file, int line) 77 77 { 78 + (void)str; 79 + (void)file; 80 + (void)line; 78 81 DEBUGF("Fatal error: %s\n", str); 79 82 //exit(1); 80 83 } ··· 82 85 #define OVERRIDE_SPEEX_WARNING 1 83 86 static inline void speex_warning(const char *str) 84 87 { 88 + (void)str; 85 89 DEBUGF("warning: %s\n", str); 86 90 } 87 91 88 92 #define OVERRIDE_SPEEX_WARNING_INT 1 89 93 static inline void speex_warning_int(const char *str, int val) 90 94 { 95 + (void)str; 96 + (void)val; 91 97 DEBUGF("warning: %s %d\n", str, val); 92 98 } 93 99 94 100 #define OVERRIDE_SPEEX_NOTIFY 1 95 101 static inline void speex_notify(const char *str) 96 102 { 103 + (void)str; 97 104 DEBUGF("notice: %s\n", str); 98 105 } 99 106 100 107 #define OVERRIDE_SPEEX_PUTC 1 101 108 static inline void _speex_putc(int ch, void *file) 102 109 { 110 + (void)ch; 111 + (void)file; 103 112 //FILE *f = (FILE *)file; 104 113 //printf("%c", ch); 105 114 }
+1 -1
apps/codecs/libspeex/sb_celp.h
··· 37 37 #define SB_CELP_H 38 38 39 39 #include "modes.h" 40 - #include <speex/speex_bits.h> 40 + #include "speex/speex_bits.h" 41 41 #include "nb_celp.h" 42 42 43 43 /**Structure representing the full state of the sub-band encoder*/
+1 -1
apps/codecs/libspeex/speex/ogg.h
··· 21 21 extern "C" { 22 22 #endif 23 23 24 - #include "../../codec.h" 24 + #include "codeclib.h" 25 25 26 26 typedef short spx_ogg_int16_t; 27 27 typedef unsigned short spx_ogg_uint16_t;
+10 -3
apps/codecs/libspeex/speex_callbacks.c
··· 36 36 #include "config-speex.h" 37 37 #endif 38 38 39 - #include <speex/speex_callbacks.h> 39 + #include "speex/speex_callbacks.h" 40 40 #include "arch.h" 41 41 #include "os_support.h" 42 42 ··· 74 74 75 75 int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data) 76 76 { 77 + (void)state; 77 78 spx_int32_t m; 78 79 m = speex_bits_unpack_unsigned(bits, 4); 79 80 speex_encoder_ctl(data, SPEEX_SET_MODE, &m); ··· 82 83 83 84 int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data) 84 85 { 86 + (void)state; 85 87 spx_int32_t m; 86 88 m = speex_bits_unpack_unsigned(bits, 4); 87 89 speex_encoder_ctl(data, SPEEX_SET_LOW_MODE, &m); ··· 90 92 91 93 int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data) 92 94 { 95 + (void)state; 93 96 spx_int32_t m; 94 97 m = speex_bits_unpack_unsigned(bits, 4); 95 98 speex_encoder_ctl(data, SPEEX_SET_HIGH_MODE, &m); ··· 99 102 #ifndef DISABLE_VBR 100 103 int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data) 101 104 { 105 + (void)state; 102 106 spx_int32_t vbr; 103 107 vbr = speex_bits_unpack_unsigned(bits, 1); 104 108 speex_encoder_ctl(data, SPEEX_SET_VBR, &vbr); ··· 108 112 109 113 int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data) 110 114 { 115 + (void)state; 111 116 spx_int32_t enh; 112 117 enh = speex_bits_unpack_unsigned(bits, 1); 113 118 speex_decoder_ctl(data, SPEEX_SET_ENH, &enh); ··· 117 122 #ifndef DISABLE_VBR 118 123 int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data) 119 124 { 125 + (void)state; 120 126 float qual; 121 127 qual = speex_bits_unpack_unsigned(bits, 4); 122 128 speex_encoder_ctl(data, SPEEX_SET_VBR_QUALITY, &qual); ··· 126 132 127 133 int speex_std_char_handler(SpeexBits *bits, void *state, void *data) 128 134 { 135 + (void)state; 129 136 unsigned char ch; 130 137 ch = speex_bits_unpack_unsigned(bits, 8); 131 138 _speex_putc(ch, data); ··· 133 140 return 0; 134 141 } 135 142 136 - 137 - 138 143 /* Default handler for user callbacks: skip it */ 139 144 int speex_default_user_handler(SpeexBits *bits, void *state, void *data) 140 145 { 146 + (void)state; 147 + (void)data; 141 148 int req_size = speex_bits_unpack_unsigned(bits, 4); 142 149 speex_bits_advance(bits, 5+8*req_size); 143 150 return 0;
+2 -2
apps/codecs/libspeex/speex_header.c
··· 36 36 #endif 37 37 38 38 #include "arch.h" 39 - #include <speex/speex_header.h> 40 - #include <speex/speex.h> 39 + #include "speex/speex_header.h" 40 + #include "speex/speex.h" 41 41 #include "os_support.h" 42 42 43 43 #ifndef NULL
+3 -2
apps/codecs/libspeex/stereo.c
··· 33 33 #include "config-speex.h" 34 34 #endif 35 35 36 - #include <speex/speex_stereo.h> 37 - #include <speex/speex_callbacks.h> 36 + #include "speex/speex_stereo.h" 37 + #include "speex/speex_callbacks.h" 38 38 #include "math_approx.h" 39 39 #include "vq.h" 40 40 #include <math.h> ··· 278 278 279 279 int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data) 280 280 { 281 + (void)state; 281 282 RealSpeexStereoState *stereo; 282 283 spx_word16_t sign=1, dexp; 283 284 int tmp;
-49
apps/codecs/libtremor/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - # Tremor is slightly faster on coldfire with -O3 18 - ifeq ($(CPU),coldfire) 19 - TREMOROPTS = -O3 20 - else 21 - TREMOROPTS = -O2 22 - endif 23 - 24 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TREMOROPTS) $(TARGET) \ 25 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS} 26 - 27 - # This sets up 'SRC' based on the files mentioned in SOURCES 28 - include $(TOOLSDIR)/makesrc.inc 29 - 30 - SOURCES = $(SRC) 31 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 32 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 33 - DEPFILE = $(OBJDIR)/dep-libtremor 34 - DIRS = 35 - 36 - all: $(OUTPUT) 37 - 38 - $(OUTPUT): $(OBJS) 39 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 40 - $(SILENT)$(RANLIB) $@ 41 - 42 - include $(TOOLSDIR)/make.inc 43 - 44 - clean: 45 - $(call PRINTS,cleaning libtremor)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 46 - 47 - ifneq ($(MAKECMDGOALS),clean) 48 - -include $(DEPFILE) 49 - endif
+1 -1
apps/codecs/libtremor/config-tremor.h
··· 1 - #include "../codec.h" 1 + #include "codeclib.h" 2 2 #ifdef CPU_ARM 3 3 #define _ARM_ASSEM_ 4 4 #endif
+1 -1
apps/codecs/libtremor/ctype.c
··· 1 - #include "../../../firmware/common/ctype.c" 1 + #include "common/ctype.c"
+36
apps/codecs/libtremor/libtremor.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libtremor 11 + TREMORLIB := $(CODECDIR)/libtremor.a 12 + TREMORLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libtremor/SOURCES) 13 + TREMORLIB_OBJ := $(call c2obj, $(TREMORLIB_SRC)) 14 + OTHER_SRC += $(TREMORLIB_SRC) 15 + 16 + $(TREMORLIB): $(TREMORLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 18 + 19 + $(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c 20 + $(SILENT)mkdir -p $(dir $@) 21 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 22 + -I$(APPSDIR)/codecs/libtremor \ 23 + $(CODECFLAGS) $(CFLAGS) -c $< -o $@ 24 + 25 + TREMORFLAGS = -I$(APPSDIR)/codecs/libtremor $(filter-out -O%,$(CODECFLAGS)) 26 + 27 + # Tremor is slightly faster on coldfire with -O3 28 + ifeq ($(CPU),coldfire) 29 + TREMORFLAGS += -O3 30 + else 31 + TREMORFLAGS += -O2 32 + endif 33 + 34 + $(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c 35 + $(SILENT)mkdir -p $(dir $@) 36 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(TREMORFLAGS) -c $< -o $@
+1 -1
apps/codecs/libtremor/mapping0.c
··· 21 21 #include <math.h> 22 22 #include "ogg.h" 23 23 #include "ivorbiscodec.h" 24 - #include <codecs/lib/codeclib.h> 24 + #include "codeclib.h" 25 25 #include "codec_internal.h" 26 26 #include "codebook.h" 27 27 #include "window.h"
+2 -3
apps/codecs/libtremor/oggmalloc.c
··· 1 - #include <os_types.h> 1 + #include "os_types.h" 2 2 3 - static unsigned char *mallocbuf; 4 - static size_t bufsize, tmp_ptr, mem_ptr; 3 + static size_t tmp_ptr; 5 4 6 5 void ogg_malloc_init(void) 7 6 {
-43
apps/codecs/libwavpack/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - WAVPACKOPTS = -O2 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(WAVPACKOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libwavpack 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libwavpack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+17
apps/codecs/libwavpack/libwavpack.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libwavpack 11 + WAVPACKLIB := $(CODECDIR)/libwavpack.a 12 + WAVPACKLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libwavpack/SOURCES) 13 + WAVPACKLIB_OBJ := $(call c2obj, $(WAVPACKLIB_SRC)) 14 + OTHER_SRC += $(WAVPACKLIB_SRC) 15 + 16 + $(WAVPACKLIB): $(WAVPACKLIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
+3 -3
apps/codecs/libwavpack/wavpack.h
··· 7 7 //////////////////////////////////////////////////////////////////////////// 8 8 9 9 // wavpack.h 10 - 11 - #include "../codec.h" 12 - 10 + #ifdef CODEC 11 + #include "codeclib.h" 12 + #endif 13 13 #include <inttypes.h> 14 14 15 15 // This header file contains all the definitions required by WavPack.
-43
apps/codecs/libwma/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 12 - 13 - ifdef APPEXTRA 14 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 15 - endif 16 - 17 - WMAOPTS = -O2 -DROCKBOX 18 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(WMAOPTS) $(TARGET) \ 19 - $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1 20 - 21 - # This sets up 'SRC' based on the files mentioned in SOURCES 22 - include $(TOOLSDIR)/makesrc.inc 23 - 24 - SOURCES = $(SRC) 25 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 26 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27 - DEPFILE = $(OBJDIR)/dep-libwma 28 - DIRS = 29 - 30 - all: $(OUTPUT) 31 - 32 - $(OUTPUT): $(OBJS) 33 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 34 - $(SILENT)$(RANLIB) $@ 35 - 36 - include $(TOOLSDIR)/make.inc 37 - 38 - clean: 39 - $(call PRINTS,cleaning libwma)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 40 - 41 - ifneq ($(MAKECMDGOALS),clean) 42 - -include $(DEPFILE) 43 - endif
+17
apps/codecs/libwma/libwma.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # libwma 11 + WMALIB := $(CODECDIR)/libwma.a 12 + WMALIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libwma/SOURCES) 13 + WMALIB_OBJ := $(call c2obj, $(WMALIB_SRC)) 14 + OTHER_SRC += $(WMALIB_SRC) 15 + 16 + $(WMALIB): $(WMALIB_OBJ) 17 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
+1 -1
apps/codecs/wma.c
··· 464 464 int wmares, res; 465 465 uint8_t* audiobuf; 466 466 int audiobufsize; 467 - int packetlength; 467 + int packetlength = 0; 468 468 int errcount = 0; 469 469 470 470 /* Generic codec initialisation */
+1 -1
apps/debug_menu.c
··· 114 114 #include "usb_core.h" 115 115 #endif 116 116 #ifdef USB_STORAGE 117 - #include "../firmware/usbstack/usb_storage.h" 117 + #include "usbstack/usb_storage.h" 118 118 #endif 119 119 120 120 /*---------------------------------------------------*/
-40
apps/lang/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I. -I$(BUILDDIR) -I$(OBJDIR) 12 - 13 - # the header we generate 14 - HEADER = $(BUILDDIR)/max_language_size.h 15 - 16 - # This sets up 'SRC' based on the files mentioned in SOURCES 17 - include $(TOOLSDIR)/makesrc.inc 18 - SOURCES=$(SRC) 19 - 20 - # OUTP is the list of files to depend upon 21 - OUTP = $(patsubst %.lang,$(OBJDIR)/%.lng, $(SOURCES)) 22 - 23 - # the generated file with features specified genlang-style 24 - FEATS=$(BUILDDIR)/apps/genlang-features 25 - 26 - ifndef V 27 - SILENT=@ 28 - endif 29 - PRINTS=$(SILENT)$(call info,$(1)) 30 - 31 - all: $(HEADER) 32 - 33 - # generic rule for creating .lng from .lang 34 - $(OBJDIR)/%.lng : %.lang $(FEATS) 35 - $(call PRINTS,GENLANG $<) 36 - $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(FEATS)` -i=$(TARGET_ID) -b=$@ $< 37 - 38 - $(HEADER): $(OUTP) 39 - $(call PRINTS,Make $(HEADER)) 40 - $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(OBJDIR)/* | awk '{print $$5}' | sort -n | tail -1`" > $(HEADER)
+34
apps/lang/lang.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) 11 + LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) 12 + 13 + SRC += $(ROOTDIR)/lang.o # yes ROOTDIR. root.make will subst it to BUILDDIR. 14 + 15 + CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* 16 + 17 + # $(BUILDDIR)/apps/lang must exist before we create dependencies on it, 18 + # otherwise make will simply ignore those dependencies. 19 + # Therefore we create it here. 20 + #DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang) 21 + 22 + $(BUILDDIR)/max_language_size.h: $(LANGOBJ) 23 + $(call PRINTS,Create $(notdir $@)) 24 + $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@ 25 + 26 + $(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features 27 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 28 + perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< 29 + $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ 30 + 31 + $(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features 32 + $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<)) 33 + $(SILENT)mkdir -p $(dir $@) 34 + $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$@ $<
-180
apps/plugins/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ 11 - -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) 12 - 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - ifdef SOFTWARECODECS 21 - CODECLIBS = -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack 22 - endif 23 - 24 - # Set up the bitmap libraries 25 - BITMAPLIBS = 26 - LINKBITMAPS = 27 - ifneq ($(strip $(BMP2RB_MONO)),) 28 - BITMAPLIBS += pluginbitmapsmono 29 - LINKBITMAPS += -lpluginbitmapsmono 30 - endif 31 - ifneq ($(strip $(BMP2RB_NATIVE)),) 32 - BITMAPLIBS += pluginbitmapsnative 33 - LINKBITMAPS += -lpluginbitmapsnative 34 - endif 35 - ifneq ($(strip $(BMP2RB_REMOTEMONO)),) 36 - BITMAPLIBS += pluginbitmapsremotemono 37 - LINKBITMAPS += -lpluginbitmapsremotemono 38 - endif 39 - ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) 40 - BITMAPLIBS += pluginbitmapsremotenative 41 - LINKBITMAPS += -lpluginbitmapsremotenative 42 - endif 43 - 44 - LDS := plugin.lds 45 - LINKFILE := $(OBJDIR)/pluginlink.lds 46 - DEPFILE = $(OBJDIR)/dep-plugins 47 - 48 - # This sets up 'SRC' based on the files mentioned in SOURCES 49 - include $(TOOLSDIR)/makesrc.inc 50 - 51 - # This sets up 'SUBDIRS' based on the directories mentioned in SUBDIRS 52 - include $(TOOLSDIR)/makesubdirs.inc 53 - 54 - ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) 55 - SOURCES = $(SRC) 56 - ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) 57 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 58 - # as created by the cross-compiler for win32: 59 - DEFS := $(SRC:%.c=$(OBJDIR)/%.def) 60 - DIRS = . 61 - 62 - .PHONY: $(SUBDIRS) 63 - all: build 64 - 65 - dep: $(DEPFILE) 66 - 67 - build: $(DEPFILE) $(BITMAPLIBS) 68 - $(call PRINTS,MAKE rocks)$(MAKE) rocks 69 - $(call PRINTS,MAKE subdirs)$(MAKE) subdirs 70 - 71 - rocks: $(ROCKS) 72 - 73 - subdirs: $(SUBDIRS) 74 - 75 - $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS 76 - $(call PRINTS,create credits.raw)perl credits.pl < $< > $@ 77 - 78 - $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw 79 - $(SILENT)mkdir -p $(dir $@) 80 - $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ 81 - 82 - pluginbitmapsmono: 83 - $(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono 84 - 85 - pluginbitmapsnative: 86 - $(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native 87 - 88 - pluginbitmapsremotemono: 89 - $(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono 90 - 91 - pluginbitmapsremotenative: 92 - $(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native 93 - 94 - ifndef SIMVER 95 - $(OBJDIR)/%.rock: $(OBJDIR)/%.o $(LINKFILE) 96 - $(SILENT)$(CC) $(CFLAGS) -o $(OBJDIR)/$*.elf $< -L$(BUILDDIR) \ 97 - $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc \ 98 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map 99 - $(call PRINTS,LINK $(@F))$(OC) -O binary $(OBJDIR)/$*.elf $(OBJDIR)/$*.rock 100 - 101 - else 102 - 103 - ifeq ($(SIMVER), x11) 104 - ################################################### 105 - # This is the X11 simulator version 106 - 107 - $(OBJDIR)/%.rock : $(OBJDIR)/%.o 108 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ 109 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 110 - # 'x' must be kept or you'll have "Win32 error 5" 111 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 112 - # #define ERROR_ACCESS_DENIED 5L 113 - else 114 - $(SILENT)chmod -x $@ 115 - endif 116 - 117 - else # end of x11-simulator 118 - ifeq ($(SIMVER), sdl) 119 - ################################################### 120 - # This is the SDL simulator version 121 - 122 - $(OBJDIR)/%.rock : $(OBJDIR)/%.o 123 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ 124 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 125 - # 'x' must be kept or you'll have "Win32 error 5" 126 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 127 - # #define ERROR_ACCESS_DENIED 5L 128 - else 129 - $(SILENT)chmod -x $@ 130 - endif 131 - 132 - else # end of sdl-simulator 133 - ################################################### 134 - # This is the win32 simulator version 135 - DLLTOOLFLAGS = --export-all 136 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 137 - 138 - $(OBJDIR)/%.rock : $(OBJDIR)/%.o 139 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< 140 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \ 141 - $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@ 142 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 143 - # 'x' must be kept or you'll have "Win32 error 5" 144 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 145 - # #define ERROR_ACCESS_DENIED 5L 146 - else 147 - $(SILENT)chmod -x $@ 148 - endif 149 - endif # end of win32-simulator 150 - endif 151 - 152 - endif # end of simulator section 153 - 154 - include $(TOOLSDIR)/make.inc 155 - 156 - pluginlib: 157 - $(SILENT)mkdir -p $(OBJDIR)/lib 158 - $(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib 159 - 160 - $(LINKFILE): $(LDS) 161 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ 162 - 163 - $(SUBDIRS): 164 - $(SILENT)mkdir -p $(OBJDIR)/$@ 165 - $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ 166 - LINKBITMAPS="$(LINKBITMAPS)" 167 - 168 - clean: 169 - $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ 170 - $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) 171 - $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib 172 - $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono 173 - $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native 174 - $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono 175 - $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native 176 - $(SILENT)$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy 177 - $(SILENT)$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine 178 - @rm -rf $(BUILDDIR)/pluginbitmaps 179 - 180 - -include $(DEPFILE)
-74
apps/plugins/beatbox/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id $ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -O3 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-beatbox 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 27 - DIRS = . 28 - 29 - ifndef SIMVER 30 - LDS := ../plugin.lds 31 - OUTPUT = $(OUTDIR)/beatbox.rock 32 - else ## simulators 33 - OUTPUT = $(OUTDIR)/beatbox.rock 34 - endif 35 - 36 - all: $(OUTPUT) 37 - 38 - ifndef SIMVER 39 - $(OBJDIR)/beatbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 40 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 41 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/beatbox.map 42 - 43 - $(OUTPUT): $(OBJDIR)/beatbox.elf 44 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 45 - else 46 - 47 - ################################################### 48 - # This is the SDL simulator version 49 - 50 - $(OUTPUT): $(OBJS) 51 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 52 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 53 - # 'x' must be kept or you'll have "Win32 error 5" 54 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 55 - # #define ERROR_ACCESS_DENIED 5L 56 - else 57 - @chmod -x $@ 58 - endif 59 - 60 - endif # end of simulator section 61 - 62 - include $(TOOLSDIR)/make.inc 63 - 64 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 65 - # given in number of MB 66 - $(LINKFILE): $(LDS) 67 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 68 - $(DEFINES) -E -P - >$@ 69 - 70 - clean: 71 - $(call PRINTS,cleaning beatbox)rm -rf $(OBJDIR)/beatbox 72 - $(SILENT)rm -f $(OBJDIR)/beatbox.* $(DEPFILE) 73 - 74 - -include $(DEPFILE)
-32
apps/plugins/bitmaps/mono/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-mono 21 - 22 - BMP2RB = $(BMP2RB_MONO) 23 - OUTPUT = $(BUILDDIR)/libpluginbitmapsmono.a 24 - BMPINCDIR = $(BUILDDIR)/pluginbitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - @rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-32
apps/plugins/bitmaps/native/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-native 21 - 22 - BMP2RB = $(BMP2RB_NATIVE) 23 - OUTPUT = $(BUILDDIR)/libpluginbitmapsnative.a 24 - BMPINCDIR = $(BUILDDIR)/pluginbitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - @rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
+24 -24
apps/plugins/bitmaps/native/SOURCES
··· 574 574 #endif 575 575 #elif LCD_DEPTH > 1 /* grey */ 576 576 #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98 577 - star_tiles.10x10.grey.bmp 577 + star_tiles.10x10x2.bmp 578 578 #elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80 579 - star_tiles.8x8.grey.bmp 579 + star_tiles.8x8x2.bmp 580 580 #endif 581 581 #else /* monochrome */ 582 582 #if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62 583 - star_tiles.6x7.mono.bmp 583 + star_tiles.6x7x1.bmp 584 584 #endif 585 585 #endif 586 586 ··· 669 669 /* pictureflow */ 670 670 #if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) 671 671 #if (LCD_WIDTH < 200) 672 - pictureflow_logo.100x18x16.bmp 672 + pictureflow_logo.100x18x16.bmp 673 673 #else 674 - pictureflow_logo.193x34x16.bmp 674 + pictureflow_logo.193x34x16.bmp 675 675 #endif 676 676 #if (LCD_HEIGHT < 100 ) 677 - pictureflow_emptyslide.50x50x16.bmp 677 + pictureflow_emptyslide.50x50x16.bmp 678 678 #else 679 - pictureflow_emptyslide.100x100x16.bmp 679 + pictureflow_emptyslide.100x100x16.bmp 680 680 #endif 681 681 #endif 682 682 ··· 689 689 690 690 #if defined HAVE_LCD_COLOR 691 691 #if SMALLER_DIMENSION <= 80 692 - sliding_puzzle.80x80x16.bmp 692 + sliding_puzzle.80x80x16.bmp 693 693 #elif SMALLER_DIMENSION <= 108 694 - sliding_puzzle.108x108x16.bmp 694 + sliding_puzzle.108x108x16.bmp 695 695 #elif SMALLER_DIMENSION <= 128 696 - sliding_puzzle.128x128x16.bmp 696 + sliding_puzzle.128x128x16.bmp 697 697 #elif SMALLER_DIMENSION <= 132 698 - sliding_puzzle.132x132x16.bmp 698 + sliding_puzzle.132x132x16.bmp 699 699 #elif SMALLER_DIMENSION <= 176 700 - sliding_puzzle.176x176x16.bmp 700 + sliding_puzzle.176x176x16.bmp 701 701 #elif SMALLER_DIMENSION <= 240 702 - sliding_puzzle.240x240x16.bmp 702 + sliding_puzzle.240x240x16.bmp 703 703 #endif 704 704 #elif (LCD_DEPTH > 1) 705 705 #if SMALLER_DIMENSION <= 96 706 - sliding_puzzle.96x96x2.bmp 706 + sliding_puzzle.96x96x2.bmp 707 707 #elif SMALLER_DIMENSION <= 110 708 - sliding_puzzle.108x108x2.bmp 708 + sliding_puzzle.108x108x2.bmp 709 709 #elif SMALLER_DIMENSION <= 128 710 - sliding_puzzle.128x128x2.bmp 710 + sliding_puzzle.128x128x2.bmp 711 711 #endif 712 712 #else /* mono targets, one size currently */ 713 - sliding_puzzle.80x64x1.bmp 713 + sliding_puzzle.80x64x1.bmp 714 714 #endif 715 715 716 716 /* Logo */ 717 717 #if LCD_DEPTH == 16 718 718 #if (LCD_WIDTH >= 320) 719 - rockboxlogo.220x68x16.bmp 719 + rockboxlogo.220x68x16.bmp 720 720 #elif (LCD_WIDTH > 160) 721 - rockboxlogo.128x40x16.bmp 721 + rockboxlogo.128x40x16.bmp 722 722 #else 723 - rockboxlogo.90x28x16.bmp 723 + rockboxlogo.90x28x16.bmp 724 724 #endif 725 725 726 726 #elif LCD_DEPTH == 2 727 727 #if (LCD_WIDTH > 138) 728 - rockboxlogo.138x46x2.bmp 728 + rockboxlogo.138x46x2.bmp 729 729 #else 730 - rockboxlogo.91x32x2.bmp 730 + rockboxlogo.91x32x2.bmp 731 731 #endif 732 732 733 733 #elif LCD_DEPTH == 1 734 734 #if (LCD_WIDTH > 112) 735 735 /* Such a screen isn't currently in any target */ 736 - rockboxlogo.112x30x1.bmp 736 + rockboxlogo.112x30x1.bmp 737 737 #else 738 - rockboxlogo.91x32x1.bmp 738 + rockboxlogo.91x32x1.bmp 739 739 #endif 740 740 #endif 741 741
apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp
apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp
apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp
+59
apps/plugins/bitmaps/pluginbitmaps.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + PBMPINCDIR = $(BUILDDIR)/pluginbitmaps 11 + 12 + PFLAGS += -I$(PBMPINCDIR) 13 + 14 + ifneq ($(strip $(BMP2RB_MONO)),) 15 + PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES) 16 + endif 17 + ifneq ($(strip $(BMP2RB_NATIVE)),) 18 + PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES) 19 + endif 20 + ifneq ($(strip $(BMP2RB_REMOTEMONO)),) 21 + PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES) 22 + endif 23 + ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) 24 + PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES) 25 + endif 26 + 27 + ifdef PBMP # does player use bitmaps? 28 + 29 + PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) 30 + 31 + PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a 32 + PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) 33 + 34 + PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP)) 35 + 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') 36 + 37 + $(PBMPHFILES): $(PLUGIN_BITMAPS) 38 + 39 + $(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS) 40 + $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1 41 + 42 + # pattern rules to create .c files from .bmp, one for each subdir: 43 + $(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb 44 + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) 45 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@ 46 + 47 + $(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb 48 + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) 49 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@ 50 + 51 + $(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb 52 + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) 53 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@ 54 + 55 + $(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb 56 + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) 57 + $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@ 58 + 59 + endif
-32
apps/plugins/bitmaps/remote_mono/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono 21 - 22 - BMP2RB = $(BMP2RB_REMOTEMONO) 23 - OUTPUT = $(BUILDDIR)/libpluginbitmapsremotemono.a 24 - BMPINCDIR = $(BUILDDIR)/pluginbitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - @rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
-32
apps/plugins/bitmaps/remote_native/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 11 - -I$(OBJDIR) 12 - CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) 13 - 14 - # This sets up 'SRC' based on the files mentioned in SOURCES 15 - include $(TOOLSDIR)/makesrc.inc 16 - 17 - SOURCES = $(SRC) 18 - CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) 19 - OBJS := $(CSRC:%.c=%.o) 20 - DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative 21 - 22 - BMP2RB = $(BMP2RB_REMOTENATIVE) 23 - OUTPUT = $(BUILDDIR)/libpluginbitmapsremotenative.a 24 - BMPINCDIR = $(BUILDDIR)/pluginbitmaps 25 - 26 - include $(TOOLSDIR)/makebmp.inc 27 - 28 - clean: 29 - $(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 - @rmdir $(OBJDIR) 31 - 32 - -include $(DEPFILE)
+2 -2
apps/plugins/bitmaps/remote_native/SOURCES
··· 18 18 19 19 /* Logo */ 20 20 #if (LCD_REMOTE_DEPTH == 1) 21 - remote_rockboxlogo.91x32x1.bmp 21 + remote_rockboxlogo.91x32x1.bmp 22 22 #elif (LCD_REMOTE_DEPTH == 2) 23 - remote_rockboxlogo.91x32x2.bmp 23 + remote_rockboxlogo.91x32x2.bmp 24 24 #endif
+1 -1
apps/plugins/bounce.c
··· 20 20 **************************************************************************/ 21 21 #include "plugin.h" 22 22 #include "time.h" 23 - #include "fixedpoint.h" 23 + #include "lib/fixedpoint.h" 24 24 25 25 PLUGIN_HEADER 26 26
+2 -2
apps/plugins/brickmania.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "configfile.h" /* Part of libplugin */ 24 - #include "helper.h" 23 + #include "lib/configfile.h" /* Part of libplugin */ 24 + #include "lib/helper.h" 25 25 26 26 PLUGIN_HEADER 27 27
+3 -3
apps/plugins/bubbles.c
··· 25 25 26 26 #ifdef HAVE_LCD_BITMAP 27 27 28 - #include "xlcd.h" 29 - #include "pluginlib_actions.h" 30 - #include "fixedpoint.h" 28 + #include "lib/xlcd.h" 29 + #include "lib/pluginlib_actions.h" 30 + #include "lib/fixedpoint.h" 31 31 32 32 PLUGIN_HEADER 33 33
+1 -1
apps/plugins/chessbox.c
··· 24 24 25 25 #if MEM <= 8 && !defined(SIMULATOR) 26 26 27 - #include "overlay.h" 27 + #include "lib/overlay.h" 28 28 29 29 PLUGIN_HEADER 30 30
-114
apps/plugins/chessbox/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(BUILDDIR)/pluginbitmaps -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) \ 12 - -I$(BUILDDIR) 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - LINKFILE := $(OBJDIR)/link.lds 21 - DEPFILE = $(OBJDIR)/dep-chessbox 22 - SRC = chessbox.c gnuchess.c opening.c chessbox_pgn.c 23 - 24 - SOURCES = $(SRC) 25 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 26 - DIRS = . 27 - 28 - ifndef SIMVER 29 - ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 30 - LDS := archos.lds 31 - OUTPUT = $(OUTDIR)/chessbox.ovl 32 - else ## iRiver target 33 - LDS := ../plugin.lds 34 - OUTPUT = $(OUTDIR)/chessbox.rock 35 - endif 36 - else ## simulators 37 - OUTPUT = $(OUTDIR)/chessbox.rock 38 - endif 39 - 40 - all: $(OUTPUT) 41 - 42 - ifndef SIMVER 43 - $(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 44 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 45 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/chessbox.map 46 - 47 - $(OUTPUT): $(OBJDIR)/chessbox.elf 48 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 49 - else 50 - 51 - ifeq ($(SIMVER), x11) 52 - ################################################### 53 - # This is the X11 simulator version 54 - 55 - $(OUTPUT): $(OBJS) 56 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 57 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 58 - # 'x' must be kept or you'll have "Win32 error 5" 59 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 60 - # #define ERROR_ACCESS_DENIED 5L 61 - else 62 - @chmod -x $@ 63 - endif 64 - 65 - else # end of x11-simulator 66 - ifeq ($(SIMVER), sdl) 67 - ################################################### 68 - # This is the SDL simulator version 69 - 70 - $(OUTPUT): $(OBJS) 71 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 72 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 73 - # 'x' must be kept or you'll have "Win32 error 5" 74 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 75 - # #define ERROR_ACCESS_DENIED 5L 76 - else 77 - @chmod -x $@ 78 - endif 79 - 80 - else # end of sdl-simulator 81 - ################################################### 82 - # This is the win32 simulator version 83 - DLLTOOLFLAGS = --export-all 84 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 85 - 86 - $(OUTPUT): $(OBJS) 87 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 88 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 89 - $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 90 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 91 - # 'x' must be kept or you'll have "Win32 error 5" 92 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 93 - # #define ERROR_ACCESS_DENIED 5L 94 - else 95 - @chmod -x $@ 96 - endif 97 - endif # end of win32-simulator 98 - endif 99 - endif # end of simulator section 100 - 101 - 102 - include $(TOOLSDIR)/make.inc 103 - 104 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 105 - # given in number of MB 106 - $(LINKFILE): $(LDS) 107 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 108 - $(DEFINES) -E -P - >$@ 109 - 110 - clean: 111 - $(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox 112 - $(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE) 113 - 114 - -include $(DEPFILE)
+4
apps/plugins/chessbox/SOURCES
··· 1 + chessbox.c 2 + gnuchess.c 3 + opening.c 4 + chessbox_pgn.c
+1 -1
apps/plugins/chessbox/chessbox.c
··· 43 43 PLUGIN_HEADER 44 44 45 45 /* Tile size defined by the assigned bitmap */ 46 - #include "chessbox_pieces.h" 46 + #include "pluginbitmaps/chessbox_pieces.h" 47 47 #define TILE_WIDTH BMPWIDTH_chessbox_pieces 48 48 #define TILE_HEIGHT (BMPHEIGHT_chessbox_pieces/26) 49 49
+58
apps/plugins/chessbox/chessbox.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + CHESSBOX_SRCDIR = $(APPSDIR)/plugins/chessbox 11 + CHESSBOX_OBJDIR = $(BUILDDIR)/apps/plugins/chessbox 12 + 13 + CHESSBOX_SRC := $(call preprocess, $(CHESSBOX_SRCDIR)/SOURCES) 14 + CHESSBOX_OBJ := $(call c2obj, $(CHESSBOX_SRC)) 15 + 16 + OTHER_SRC += $(CHESSBOX_SRC) 17 + 18 + ifndef SIMVER 19 + ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 20 + ## archos recorder targets 21 + CHESSBOX_INLDS := $(CHESSBOX_SRCDIR)/archos.lds 22 + ROCKS += $(CHESSBOX_OBJDIR)/chessbox.ovl 23 + else 24 + ### all other targets 25 + CHESSBOX_INLDS := $(APPSDIR)/plugins/plugin.lds 26 + ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock 27 + endif 28 + CHESSBOX_OVLFLAGS = -T$(CHESSBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$*.map 29 + CHESSBOX_OUTLDS = $(CHESSBOX_OBJDIR)/chessbox.lds 30 + else 31 + ### simulator 32 + ROCKS += $(CHESSBOX_OBJDIR)/chessbox.rock 33 + CHESSBOX_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile 34 + endif 35 + 36 + ifeq ($(CPU),sh) 37 + # sh need to retain its' -Os 38 + CHESSBOXFLAGS = $(PLUGINFLAGS) 39 + else 40 + CHESSBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2 41 + endif 42 + 43 + $(CHESSBOX_OUTLDS): $(CHESSBOX_INLDS) $(CHESSBOX_OBJ) 44 + $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) 45 + 46 + $(CHESSBOX_OBJDIR)/chessbox.rock: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB) 47 + 48 + $(CHESSBOX_OBJDIR)/chessbox.ovl: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) $(PLUGINBITMAPLIB) 49 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $(CHESSBOX_OBJDIR)/$*.elf \ 50 + $(filter %.o, $^) \ 51 + $(filter %.a, $^) \ 52 + -lgcc $(CHESSBOX_OVLFLAGS) 53 + $(call PRINTS,LD $(@F))$(OC) -O binary $(CHESSBOX_OBJDIR)/$*.elf $@ 54 + 55 + # special pattern rule for compiling chessbox with extra flags 56 + $(CHESSBOX_OBJDIR)/%.o: $(CHESSBOX_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(CHESSBOX_SRCDIR)/chessbox.make 57 + $(SILENT)mkdir -p $(dir $@) 58 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(CHESSBOXFLAGS) -c $< -o $@
+3 -3
apps/plugins/chopper.c
··· 21 21 ****************************************************************************/ 22 22 23 23 #include "plugin.h" 24 - #include "xlcd.h" 25 - #include "configfile.h" 26 - #include "helper.h" 24 + #include "lib/xlcd.h" 25 + #include "lib/configfile.h" 26 + #include "lib/helper.h" 27 27 28 28 PLUGIN_HEADER 29 29
-112
apps/plugins/clock/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $$Id: $$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. -I$(APPSDIR)/plugins/lib \ 11 - $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 12 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ 13 - -I$(BUILDDIR)/pluginbitmaps 14 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 15 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 16 - 17 - ifdef APPEXTRA 18 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 19 - endif 20 - 21 - LINKFILE := $(OBJDIR)/link.lds 22 - DEPFILE = $(OBJDIR)/dep-clock 23 - 24 - # This sets up 'SRC' based on the files mentioned in SOURCES 25 - include $(TOOLSDIR)/makesrc.inc 26 - 27 - SOURCES = $(SRC) 28 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 29 - DIRS = . 30 - 31 - ifndef SIMVER 32 - LDS := ../plugin.lds 33 - OUTPUT = $(OUTDIR)/clock.rock 34 - else ## simulators 35 - OUTPUT = $(OUTDIR)/clock.rock 36 - endif 37 - 38 - all: $(OUTPUT) 39 - 40 - ifndef SIMVER 41 - $(OBJDIR)/clock.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 42 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 43 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/clock.map 44 - 45 - $(OUTPUT): $(OBJDIR)/clock.elf 46 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 47 - else 48 - 49 - ifeq ($(SIMVER), x11) 50 - ################################################### 51 - # This is the X11 simulator version 52 - 53 - $(OUTPUT): $(OBJS) 54 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 55 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56 - # 'x' must be kept or you'll have "Win32 error 5" 57 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58 - # #define ERROR_ACCESS_DENIED 5L 59 - else 60 - @chmod -x $@ 61 - endif 62 - 63 - else # end of x11-simulator 64 - ifeq ($(SIMVER), sdl) 65 - ################################################### 66 - # This is the SDL simulator version 67 - 68 - $(OUTPUT): $(OBJS) 69 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 70 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 71 - # 'x' must be kept or you'll have "Win32 error 5" 72 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 73 - # #define ERROR_ACCESS_DENIED 5L 74 - else 75 - @chmod -x $@ 76 - endif 77 - 78 - else # end of sdl-simulator 79 - ################################################### 80 - # This is the win32 simulator version 81 - DLLTOOLFLAGS = --export-all 82 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 83 - 84 - $(OUTPUT): $(OBJS) 85 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 86 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 87 - $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 88 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 89 - # 'x' must be kept or you'll have "Win32 error 5" 90 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 91 - # #define ERROR_ACCESS_DENIED 5L 92 - else 93 - @chmod -x $@ 94 - endif 95 - endif # end of win32-simulator 96 - endif 97 - endif # end of simulator section 98 - 99 - 100 - include $(TOOLSDIR)/make.inc 101 - 102 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 103 - # given in number of MB 104 - $(LINKFILE): $(LDS) 105 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 106 - $(DEFINES) -E -P - >$@ 107 - 108 - clean: 109 - $(call PRINTS,cleaning clock)rm -rf $(OBJDIR)/clock 110 - $(SILENT)rm -f $(OBJDIR)/clock.* $(DEPFILE) 111 - 112 - -include $(DEPFILE)
+2 -2
apps/plugins/clock/clock.c
··· 21 21 22 22 #include "plugin.h" 23 23 #include "time.h" 24 - #include "pluginlib_actions.h" 25 - #include "xlcd.h" 24 + #include "lib/pluginlib_actions.h" 25 + #include "lib/xlcd.h" 26 26 27 27 #include "clock.h" 28 28 #include "clock_counter.h"
+21
apps/plugins/clock/clock.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + CLOCKSRCDIR := $(APPSDIR)/plugins/clock 11 + CLOCKBUILDDIR := $(BUILDDIR)/apps/plugins/clock 12 + 13 + ROCKS += $(CLOCKBUILDDIR)/clock.rock 14 + 15 + CLOCK_SRC := $(call preprocess, $(CLOCKSRCDIR)/SOURCES) 16 + CLOCK_OBJ := $(call c2obj, $(CLOCK_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(CLOCK_SRC) 20 + 21 + $(CLOCKBUILDDIR)/clock.rock: $(CLOCK_OBJ)
+1 -1
apps/plugins/clock/clock_bitmap_strings.h
··· 23 23 #ifndef _CLOCK_BITMAP_STRINGS_ 24 24 #define _CLOCK_BITMAP_STRINGS_ 25 25 #include "plugin.h" 26 - #include "picture.h" 26 + #include "lib/picture.h" 27 27 28 28 void draw_string(struct screen* display, const struct picture* bitmaps, 29 29 char* str, int x, int y);
+14 -14
apps/plugins/clock/clock_bitmaps.c
··· 23 23 #include "clock_bitmaps.h" 24 24 25 25 /* bitmaps */ 26 - #include "clock_binary.h" 27 - #include "clock_digits.h" 28 - #include "clock_smalldigits.h" 29 - #include "clock_segments.h" 30 - #include "clock_smallsegments.h" 26 + #include "pluginbitmaps/clock_binary.h" 27 + #include "pluginbitmaps/clock_digits.h" 28 + #include "pluginbitmaps/clock_smalldigits.h" 29 + #include "pluginbitmaps/clock_segments.h" 30 + #include "pluginbitmaps/clock_smallsegments.h" 31 31 32 - #include "clock_logo.h" 33 - #include "clock_messages.h" 32 + #include "pluginbitmaps/clock_logo.h" 33 + #include "pluginbitmaps/clock_messages.h" 34 34 35 35 #if NB_SCREENS==2 36 - #include "clock_binary_remote.h" 37 - #include "clock_digits_remote.h" 38 - #include "clock_smalldigits_remote.h" 39 - #include "clock_segments_remote.h" 40 - #include "clock_smallsegments_remote.h" 36 + #include "pluginbitmaps/clock_binary_remote.h" 37 + #include "pluginbitmaps/clock_digits_remote.h" 38 + #include "pluginbitmaps/clock_smalldigits_remote.h" 39 + #include "pluginbitmaps/clock_segments_remote.h" 40 + #include "pluginbitmaps/clock_smallsegments_remote.h" 41 41 42 - #include "clock_logo_remote.h" 43 - #include "clock_messages_remote.h" 42 + #include "pluginbitmaps/clock_logo_remote.h" 43 + #include "pluginbitmaps/clock_messages_remote.h" 44 44 45 45 #endif 46 46
+1 -1
apps/plugins/clock/clock_bitmaps.h
··· 21 21 22 22 #ifndef _CLOCK_BITMAPS_ 23 23 #define _CLOCK_BITMAPS_ 24 - #include "picture.h" 24 + #include "lib/picture.h" 25 25 26 26 extern const struct picture logos[]; 27 27 extern const struct picture messages[];
+1 -1
apps/plugins/clock/clock_counter.h
··· 2 2 #define _CLOCK_MESSAGE_ 3 3 #include "clock.h" 4 4 #include "plugin.h" 5 - #include "picture.h" 5 + #include "lib/picture.h" 6 6 7 7 struct counter{ 8 8 int ticks_at_last_unpause;/* to count the time from last pause to now */
+2 -2
apps/plugins/clock/clock_draw_analog.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "clock_draw_analog.h" 23 - #include "xlcd.h" 24 - #include "fixedpoint.h" 23 + #include "lib/xlcd.h" 24 + #include "lib/fixedpoint.h" 25 25 #include "clock_bitmaps.h" 26 26 #include "clock_bitmap_strings.h" 27 27
+1 -1
apps/plugins/clock/clock_draw_binary.c
··· 21 21 #include "clock_draw_binary.h" 22 22 #include "clock_bitmap_strings.h" 23 23 #include "clock_bitmaps.h" 24 - #include "picture.h" 24 + #include "lib/picture.h" 25 25 26 26 const struct picture* binary_skin[]={binary,digits,segments}; 27 27
+1 -1
apps/plugins/clock/clock_draw_digital.c
··· 23 23 #include "clock_draw_digital.h" 24 24 #include "clock_bitmap_strings.h" 25 25 #include "clock_bitmaps.h" 26 - #include "picture.h" 26 + #include "lib/picture.h" 27 27 28 28 const struct picture* digits_skin[]={digits,segments}; 29 29 const struct picture* smalldigits_skin[]={smalldigits,smallsegments};
+1 -1
apps/plugins/clock/clock_settings.c
··· 23 23 #include "clock_bitmaps.h" 24 24 #include "clock_draw.h" 25 25 #include "clock_settings.h" 26 - #include "picture.h" 26 + #include "lib/picture.h" 27 27 28 28 static int max_skin[]={ 29 29 [ANALOG]=2,
+1 -1
apps/plugins/credits.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "helper.h" 22 + #include "lib/helper.h" 23 23 24 24 PLUGIN_HEADER 25 25
+4 -4
apps/plugins/cube.c
··· 21 21 * 22 22 ***************************************************************************/ 23 23 #include "plugin.h" 24 - #include "grey.h" 25 - #include "playergfx.h" 26 - #include "xlcd.h" 27 - #include "fixedpoint.h" 24 + #include "lib/grey.h" 25 + #include "lib/playergfx.h" 26 + #include "lib/xlcd.h" 27 + #include "lib/fixedpoint.h" 28 28 29 29 PLUGIN_HEADER 30 30
+2 -2
apps/plugins/demystify.c
··· 24 24 #include "plugin.h" 25 25 26 26 #ifdef HAVE_LCD_BITMAP 27 - #include "pluginlib_actions.h" 28 - #include "helper.h" 27 + #include "lib/pluginlib_actions.h" 28 + #include "lib/helper.h" 29 29 PLUGIN_HEADER 30 30 31 31 #define DEFAULT_WAIT_TIME 3
+2 -2
apps/plugins/dice.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "pluginlib_actions.h" 24 - #include "configfile.h" 23 + #include "lib/pluginlib_actions.h" 24 + #include "lib/configfile.h" 25 25 26 26 #define MAX_DICES 12 27 27 #define INITIAL_NB_DICES 1
-173
apps/plugins/doom/Makefile
··· 1 - ################################################################ 2 - # 3 - # $Id$ 4 - # 5 - # $Log: Makefile,v $ 6 - # Revision 1.13 2006-12-13 06:52:09 kkurbjun 7 - # Free more plugin memory 8 - # 9 - # Revision 1.12 2006-12-13 05:46:51 kkurbjun 10 - # Will it fit? 11 - # 12 - # Revision 1.11 2006-12-13 04:44:17 kkurbjun 13 - # Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). 14 - # 15 - # Revision 1.10 2006-10-27 21:47:55 amiconn 16 - # 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. 17 - # 18 - # Revision 1.9 2006-10-23 22:33:36 amiconn 19 - # Consistent style of 'make' messages. Always use ranlib after ar. 20 - # 21 - # Revision 1.8 2006-10-23 14:09:28 markun 22 - # rearrange compiler options to avoid conflicts with header files on FreeBSD 23 - # 24 - # Revision 1.7 2006-10-22 00:21:56 amiconn 25 - # Speed up build process in general by using internal functions of make instead of spawning sub-shells where possible. 26 - # 27 - # Revision 1.6 2006-09-29 20:04:35 barrywardell 28 - # 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. 29 - # 30 - # Revision 1.5 2006-09-29 16:15:08 barrywardell 31 - # Allow UI simulator to be build on OS (Slightly updated version of FS5767) 32 - # 33 - # Revision 1.4 2006-07-27 13:27:19 linus 34 - # Moved the X5 button driver to the target tree 35 - # 36 - # Revision 1.3 2006-04-14 21:07:56 kkurbjun 37 - # Start of profiling support for doom. 38 - # 39 - # Revision 1.2 2006-03-29 21:16:45 kkurbjun 40 - # Use rockbox endian defines 41 - # 42 - # Revision 1.1 2006-03-28 15:44:01 dave 43 - # Patch #2969 - Doom! Currently only working on the H300. 44 - # 45 - # 46 - 47 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 48 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 49 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 50 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ 51 - -Wno-strict-prototypes $(PROFILE_OPTS) 52 - 53 - ifdef APPEXTRA 54 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 55 - endif 56 - 57 - # The arm code compiles too large for the plugin buffer when set to optimize for speed 58 - ifeq ($(CPU), arm) 59 - CFLAGS += -Os 60 - ifndef SIMVER 61 - ifeq ($(TARGET), IRIVER_H100) 62 - CFLAGS += -mstructure-size-boundary=8 63 - endif 64 - endif 65 - else 66 - CFLAGS += -O2 67 - endif 68 - 69 - LINKFILE := $(OBJDIR)/link.lds 70 - DEPFILE = $(OBJDIR)/dep-doom 71 - SRC = info.c doomdef.c doomstat.c dstrings.c tables.c \ 72 - f_finale.c f_wipe.c d_net.c d_items.c g_game.c m_menu.c m_argv.c \ 73 - m_cheat.c m_random.c am_map.c p_ceilng.c p_doors.c p_genlin.c \ 74 - p_enemy.c p_floor.c p_inter.c p_lights.c p_map.c p_maputl.c p_plats.c \ 75 - p_pspr.c p_setup.c p_sight.c p_spec.c p_switch.c p_mobj.c p_telept.c \ 76 - p_tick.c p_saveg.c p_user.c r_bsp.c r_data.c r_draw.c r_main.c \ 77 - r_plane.c r_segs.c r_sky.c r_things.c wi_stuff.c v_video.c st_lib.c \ 78 - st_stuff.c hu_stuff.c hu_lib.c s_sound.c z_zone.c z_bmalloc.c sounds.c \ 79 - d_main.c m_misc.c m_bbox.c i_system.c i_sound.c i_video.c \ 80 - w_wad.c rockdoom.c d_deh.c ../../../firmware/common/sscanf.c 81 - 82 - # sscanf isn't built into the core right now - should remove from here if that 83 - # changes 84 - 85 - SOURCES = $(SRC) 86 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 87 - #OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 88 - #OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 89 - DIRS = . 90 - 91 - 92 - ifndef SIMVER 93 - LDS := ../plugin.lds 94 - OUTPUT = $(OUTDIR)/doom.rock 95 - else ## simulators 96 - OUTPUT = $(OUTDIR)/doom.rock 97 - endif 98 - 99 - all: $(OUTPUT) 100 - 101 - ifndef SIMVER 102 - $(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE) 103 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\ 104 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/doom.map 105 - 106 - $(OUTPUT): $(OBJDIR)/doom.elf 107 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 108 - else 109 - 110 - ifeq ($(SIMVER), x11) 111 - ################################################### 112 - # This is the X11 simulator version 113 - 114 - $(OUTPUT): $(OBJS) 115 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 116 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 117 - # 'x' must be kept or you'll have "Win32 error 5" 118 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 119 - # #define ERROR_ACCESS_DENIED 5L 120 - else 121 - @chmod -x $@ 122 - endif 123 - 124 - else # end of x11-simulator 125 - ifeq ($(SIMVER), sdl) 126 - ################################################### 127 - # This is the sdl simulator version 128 - 129 - $(OUTPUT): $(OBJS) 130 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 131 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 132 - # 'x' must be kept or you'll have "Win32 error 5" 133 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 134 - # #define ERROR_ACCESS_DENIED 5L 135 - else 136 - @chmod -x $@ 137 - endif 138 - 139 - else # end of sdl-simulator 140 - ################################################### 141 - # This is the win32 simulator version 142 - DLLTOOLFLAGS = --export-all 143 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 144 - 145 - $(OUTPUT): $(OBJS) 146 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 147 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 148 - $(BUILDDIR)/libplugin.a -o $@ 149 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 150 - # 'x' must be kept or you'll have "Win32 error 5" 151 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 152 - # #define ERROR_ACCESS_DENIED 5L 153 - else 154 - @chmod -x $@ 155 - endif 156 - endif # end of win32-simulator 157 - endif 158 - endif # end of simulator section 159 - 160 - 161 - include $(TOOLSDIR)/make.inc 162 - 163 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 164 - # given in number of MB 165 - $(LINKFILE): $(LDS) 166 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ 167 - -E -P - >$@ 168 - 169 - clean: 170 - $(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom 171 - $(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE) 172 - 173 - -include $(DEPFILE)
+62
apps/plugins/doom/SOURCES
··· 1 + info.c 2 + doomdef.c 3 + doomstat.c 4 + dstrings.c 5 + tables.c 6 + f_finale.c 7 + f_wipe.c 8 + d_net.c 9 + d_items.c 10 + g_game.c 11 + m_menu.c 12 + m_argv.c 13 + m_cheat.c 14 + m_random.c 15 + am_map.c 16 + p_ceilng.c 17 + p_doors.c 18 + p_genlin.c 19 + p_enemy.c 20 + p_floor.c 21 + p_inter.c 22 + p_lights.c 23 + p_map.c 24 + p_maputl.c 25 + p_plats.c 26 + p_pspr.c 27 + p_setup.c 28 + p_sight.c 29 + p_spec.c 30 + p_switch.c 31 + p_mobj.c 32 + p_telept.c 33 + p_tick.c 34 + p_saveg.c 35 + p_user.c 36 + r_bsp.c 37 + r_data.c 38 + r_draw.c 39 + r_main.c 40 + r_plane.c 41 + r_segs.c 42 + r_sky.c 43 + r_things.c 44 + wi_stuff.c 45 + v_video.c 46 + st_lib.c 47 + st_stuff.c 48 + hu_stuff.c 49 + hu_lib.c 50 + s_sound.c 51 + z_zone.c 52 + z_bmalloc.c 53 + sounds.c 54 + d_main.c 55 + m_misc.c 56 + m_bbox.c 57 + i_system.c 58 + i_sound.c 59 + i_video.c 60 + w_wad.c 61 + rockdoom.c 62 + d_deh.c
+54
apps/plugins/doom/doom.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + DOOMSRCDIR := $(APPSDIR)/plugins/doom 11 + DOOMBUILDDIR := $(BUILDDIR)/apps/plugins/doom 12 + 13 + ROCKS += $(DOOMBUILDDIR)/doom.rock 14 + 15 + DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) 16 + DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) 17 + DOOM_OBJ += $(DOOMBUILDDIR)/sscanf.o 18 + 19 + # add source files to OTHER_SRC to get automatic dependencies 20 + OTHER_SRC += $(DOOM_SRC) 21 + 22 + DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes 23 + 24 + # The arm code compiles too large for the plugin buffer when set to optimize for speed 25 + ifeq ($(CPU), arm) 26 + DOOMCFLAGS += -Os 27 + ifndef SIMVER 28 + ifeq ($(TARGET), IRIVER_H100) 29 + DOOMCCFLAGS += -mstructure-size-boundary=8 30 + endif 31 + endif 32 + else 33 + DOOMCFLAGS += -O2 34 + endif 35 + 36 + $(DOOMBUILDDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c 37 + $(SILENT)mkdir -p $(dir $@) 38 + $(call PRINTS,CP $<)cp $< $@ 39 + 40 + $(DOOMBUILDDIR)/sscanf.o: $(DOOMBUILDDIR)/sscanf.c 41 + 42 + $(DOOMBUILDDIR)/doom.rock: $(DOOM_OBJ) 43 + # for some reason, this doesn't match the implicit rule in plugins.make, 44 + # so we have to duplicate the link command here 45 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ 46 + $(filter %.o, $^) \ 47 + $(filter %.a, $^) \ 48 + -lgcc $(PLUGINLDFLAGS) 49 + $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@ 50 + 51 + # new rule needed to use extra compile flags 52 + $(DOOMBUILDDIR)/%.o: $(DOOMSRCDIR)/%.c $(DOOMSRCDIR)/doom.make 53 + $(SILENT)mkdir -p $(dir $@) 54 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(DOOMCFLAGS) -c $< -o $@
+1 -1
apps/plugins/doom/i_video.c
··· 117 117 #include "rockmacros.h" 118 118 119 119 #ifndef HAVE_LCD_COLOR 120 - #include "../lib/grey.h" 120 + #include "lib/grey.h" 121 121 GREY_INFO_STRUCT_IRAM 122 122 static unsigned char greybuffer[LCD_WIDTH] IBSS_ATTR; /* off screen buffer */ 123 123 static unsigned char *gbuf;
+1 -1
apps/plugins/euroconverter.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "configfile.h" 22 + #include "lib/configfile.h" 23 23 24 24 #ifdef HAVE_LCD_CHARCELLS 25 25
+4 -4
apps/plugins/fire.c
··· 22 22 ****************************************************************************/ 23 23 24 24 #include "plugin.h" 25 - #include "helper.h" 25 + #include "lib/helper.h" 26 26 #ifdef HAVE_LCD_BITMAP 27 27 28 - #include "pluginlib_actions.h" 29 - #include "fixedpoint.h" 28 + #include "lib/pluginlib_actions.h" 29 + #include "lib/fixedpoint.h" 30 30 31 31 #ifndef HAVE_LCD_COLOR 32 - #include "grey.h" 32 + #include "lib/grey.h" 33 33 #endif 34 34 35 35 #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
+2 -2
apps/plugins/fireworks.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "oldmenuapi.h" 23 - #include "helper.h" 22 + #include "lib/oldmenuapi.h" 23 + #include "lib/helper.h" 24 24 25 25 PLUGIN_HEADER 26 26
+2 -2
apps/plugins/greyscale.c
··· 22 22 ****************************************************************************/ 23 23 24 24 #include "plugin.h" 25 - #include "helper.h" 25 + #include "lib/helper.h" 26 26 27 27 #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 28 - #include "grey.h" 28 + #include "lib/grey.h" 29 29 30 30 PLUGIN_HEADER 31 31
+2 -2
apps/plugins/invadrox.c
··· 26 26 */ 27 27 28 28 #include "plugin.h" 29 - #include "highscore.h" 30 - #include "helper.h" 29 + #include "lib/highscore.h" 30 + #include "lib/helper.h" 31 31 32 32 PLUGIN_HEADER 33 33
+2 -2
apps/plugins/jackpot.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "pluginlib_actions.h" 24 - #include "picture.h" 23 + #include "lib/pluginlib_actions.h" 24 + #include "lib/picture.h" 25 25 26 26 PLUGIN_HEADER 27 27
+1 -1
apps/plugins/jewels.c
··· 22 22 ****************************************************************************/ 23 23 24 24 #include "plugin.h" 25 - #include "playback_control.h" 25 + #include "lib/playback_control.h" 26 26 27 27 #ifdef HAVE_LCD_BITMAP 28 28
-75
apps/plugins/jpeg/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ 12 - -I$(BUILDDIR)/pluginbitmaps -I$(APPSDIR)/plugins/lib 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - LINKFILE := $(OBJDIR)/link.lds 21 - DEPFILE = $(OBJDIR)/dep-jpeg 22 - 23 - # This sets up 'SRC' based on the files mentioned in SOURCES 24 - include $(TOOLSDIR)/makesrc.inc 25 - 26 - SOURCES = $(SRC) 27 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 28 - DIRS = . 29 - 30 - ifndef SIMVER 31 - LDS := ../plugin.lds 32 - OUTPUT = $(OUTDIR)/jpeg.rock 33 - else ## simulators 34 - OUTPUT = $(OUTDIR)/jpeg.rock 35 - endif 36 - 37 - all: $(OUTPUT) 38 - 39 - ifndef SIMVER 40 - $(OBJDIR)/jpeg.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 41 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 42 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/jpeg.map 43 - 44 - $(OUTPUT): $(OBJDIR)/jpeg.elf 45 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 46 - else 47 - ################################################### 48 - # This is the SDL simulator version 49 - 50 - $(OUTPUT): $(OBJS) 51 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 52 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 53 - # 'x' must be kept or you'll have "Win32 error 5" 54 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 55 - # #define ERROR_ACCESS_DENIED 5L 56 - else 57 - @chmod -x $@ 58 - endif 59 - 60 - endif # end of simulator section 61 - 62 - 63 - include $(TOOLSDIR)/make.inc 64 - 65 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 66 - # given in number of MB 67 - $(LINKFILE): $(LDS) 68 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 69 - $(DEFINES) -E -P - >$@ 70 - 71 - clean: 72 - $(call PRINTS,cleaning jpeg)rm -rf $(OBJDIR)/jpeg 73 - $(SILENT)rm -f $(OBJDIR)/jpeg.* $(DEPFILE) 74 - 75 - -include $(DEPFILE)
+21
apps/plugins/jpeg/jpeg.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + JPEGSRCDIR := $(APPSDIR)/plugins/jpeg 11 + JPEGBUILDDIR := $(BUILDDIR)/apps/plugins/jpeg 12 + 13 + ROCKS += $(JPEGBUILDDIR)/jpeg.rock 14 + 15 + JPEG_SRC := $(call preprocess, $(JPEGSRCDIR)/SOURCES) 16 + JPEG_OBJ := $(call c2obj, $(JPEG_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(JPEG_SRC) 20 + 21 + $(JPEGBUILDDIR)/jpeg.rock: $(JPEG_OBJ)
+1 -1
apps/plugins/keybox.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "md5.h" 22 + #include "lib/md5.h" 23 23 PLUGIN_HEADER 24 24 25 25 #define KEYBOX_FILE PLUGIN_DIR "/apps/keybox.dat"
+1 -1
apps/plugins/lamp.c
··· 23 23 ****************************************************************************/ 24 24 25 25 #include "plugin.h" 26 - #include "helper.h" 26 + #include "lib/helper.h" 27 27 28 28 PLUGIN_HEADER 29 29
-50
apps/plugins/lib/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - # ../.. for the plugin.h in the apps dir 11 - # .. for stuff in the plugins dir 12 - # . for stuff in the pluginlib dir 13 - INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 14 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 21 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 22 - 23 - # Sectioned compilation for target 24 - ifndef SIMVER 25 - CFLAGS += -ffunction-sections -fdata-sections 26 - endif 27 - 28 - # This sets up 'SRC' based on the files mentioned in SOURCES 29 - include $(TOOLSDIR)/makesrc.inc 30 - 31 - SOURCES = $(SRC) 32 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 33 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 34 - DEPFILE = $(OBJDIR)/dep-pluginlib 35 - DIRS = . 36 - 37 - OUTPUT = $(BUILDDIR)/libplugin.a 38 - 39 - all: $(OUTPUT) 40 - 41 - $(OUTPUT): $(OBJS) 42 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 43 - $(SILENT)$(RANLIB) $@ 44 - 45 - include $(TOOLSDIR)/make.inc 46 - 47 - clean: 48 - $(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) 49 - 50 - -include $(DEPFILE)
+1 -1
apps/plugins/logo.c
··· 19 19 * 20 20 **************************************************************************/ 21 21 #include "plugin.h" 22 - #include "playergfx.h" 22 + #include "lib/playergfx.h" 23 23 24 24 PLUGIN_HEADER 25 25
+2 -2
apps/plugins/mandelbrot.c
··· 23 23 #include "plugin.h" 24 24 25 25 #ifdef HAVE_LCD_BITMAP 26 - #include "grey.h" 27 - #include "xlcd.h" 26 + #include "lib/grey.h" 27 + #include "lib/xlcd.h" 28 28 29 29 PLUGIN_HEADER 30 30
+2 -2
apps/plugins/maze.c
··· 31 31 */ 32 32 33 33 #include "plugin.h" 34 - #include "helper.h" 34 + #include "lib/helper.h" 35 35 36 36 PLUGIN_HEADER 37 37 ··· 54 54 # define MAZE_RDOWN (BUTTON_PLAY | BUTTON_REPEAT) 55 55 56 56 #else 57 - # include "pluginlib_actions.h" 57 + # include "lib/pluginlib_actions.h" 58 58 # define MAZE_NEW PLA_START 59 59 # define MAZE_QUIT PLA_QUIT 60 60 # define MAZE_SOLVE PLA_FIRE
+4 -4
apps/plugins/mazezam.c
··· 20 20 * 21 21 ****************************************************************************/ 22 22 #include "plugin.h" 23 - #include "configfile.h" 24 - #include "helper.h" 25 - #include "pluginlib_actions.h" 26 - #include "playback_control.h" 23 + #include "lib/configfile.h" 24 + #include "lib/helper.h" 25 + #include "lib/pluginlib_actions.h" 26 + #include "lib/playback_control.h" 27 27 28 28 /* Include standard plugin macro */ 29 29 PLUGIN_HEADER
+1 -1
apps/plugins/metronome.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "pluginlib_actions.h" 22 + #include "lib/pluginlib_actions.h" 23 23 24 24 PLUGIN_HEADER 25 25
-77
apps/plugins/midi/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id $ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 12 - 13 - MIDIOPTS = -O2 14 - 15 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) $(MIDIOPTS) \ 16 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 17 - 18 - ifdef APPEXTRA 19 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 20 - endif 21 - 22 - LINKFILE := $(OBJDIR)/link.lds 23 - DEPFILE = $(OBJDIR)/dep-midiplay 24 - 25 - # This sets up 'SRC' based on the files mentioned in SOURCES 26 - include $(TOOLSDIR)/makesrc.inc 27 - 28 - SOURCES = $(SRC) 29 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 30 - DIRS = . 31 - 32 - ifndef SIMVER 33 - LDS := ../plugin.lds 34 - OUTPUT = $(OUTDIR)/midiplay.rock 35 - else ## simulators 36 - OUTPUT = $(OUTDIR)/midiplay.rock 37 - endif 38 - 39 - all: $(OUTPUT) 40 - 41 - ifndef SIMVER 42 - $(OBJDIR)/midiplay.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 43 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 44 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/midiplay.map 45 - 46 - $(OUTPUT): $(OBJDIR)/midiplay.elf 47 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 48 - else 49 - 50 - ################################################### 51 - # This is the SDL simulator version 52 - 53 - $(OUTPUT): $(OBJS) 54 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 55 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56 - # 'x' must be kept or you'll have "Win32 error 5" 57 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58 - # #define ERROR_ACCESS_DENIED 5L 59 - else 60 - @chmod -x $@ 61 - endif 62 - 63 - endif # end of simulator section 64 - 65 - include $(TOOLSDIR)/make.inc 66 - 67 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 68 - # given in number of MB 69 - $(LINKFILE): $(LDS) 70 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 71 - $(DEFINES) -E -P - >$@ 72 - 73 - clean: 74 - $(call PRINTS,cleaning midiplay)rm -rf $(OBJDIR)/midiplay 75 - $(SILENT)rm -f $(OBJDIR)/midiplay.* $(DEPFILE) 76 - 77 - -include $(DEPFILE)
+28
apps/plugins/midi/midi.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + MIDISRCDIR := $(APPSDIR)/plugins/midi 11 + MIDIBUILDDIR := $(BUILDDIR)/apps/plugins/midi 12 + 13 + ROCKS += $(MIDIBUILDDIR)/midi.rock 14 + 15 + MIDI_SRC := $(call preprocess, $(MIDISRCDIR)/SOURCES) 16 + MIDI_OBJ := $(call c2obj, $(MIDI_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(MIDI_SRC) 20 + 21 + $(MIDIBUILDDIR)/midi.rock: $(MIDI_OBJ) 22 + # for some reason, this doesn't match the implicit rule in plugins.make, 23 + # so we have to duplicate the link command here 24 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ 25 + $(filter %.o, $^) \ 26 + $(filter %.a, $^) \ 27 + -lgcc $(PLUGINLDFLAGS) 28 + $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@
+1 -1
apps/plugins/mosaique.c
··· 19 19 * 20 20 **************************************************************************/ 21 21 #include "plugin.h" 22 - #include "playergfx.h" 22 + #include "lib/playergfx.h" 23 23 24 24 PLUGIN_HEADER 25 25
-78
apps/plugins/mpegplayer/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/plugins/lib -I$(OUTDIR) -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -DMPEGPLAYER 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-mpegplayer 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DIRS = . 29 - 30 - LDS := ../plugin.lds 31 - OUTPUT = $(OUTDIR)/mpegplayer.rock 32 - 33 - all: $(OUTPUT) 34 - 35 - .PHONY: libmad-mpegplayer 36 - 37 - $(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer 38 - 39 - libmad-mpegplayer: 40 - $(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer 41 - $(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a 42 - 43 - ifndef SIMVER 44 - $(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a 45 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\ 46 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/mpegplayer.map 47 - 48 - $(OUTPUT): $(OBJDIR)/mpegplayer.elf 49 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 50 - else 51 - # This is the SDL simulator version 52 - 53 - $(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a 54 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -lmad-mpegplayer -o $@ 55 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56 - # 'x' must be kept or you'll have "Win32 error 5" 57 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58 - # #define ERROR_ACCESS_DENIED 5L 59 - else 60 - @chmod -x $@ 61 - endif 62 - 63 - endif # end of sdl-simulator 64 - 65 - include $(TOOLSDIR)/make.inc 66 - 67 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 68 - # given in number of MB 69 - $(LINKFILE): $(LDS) 70 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 71 - $(DEFINES) -E -P - >$@ 72 - 73 - clean: 74 - $(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer 75 - $(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE) 76 - 77 - -include $(DEPFILE) 78 -
+2 -2
apps/plugins/mpegplayer/audio_thread.c
··· 22 22 ****************************************************************************/ 23 23 #include "plugin.h" 24 24 #include "mpegplayer.h" 25 - #include "../../codecs/libmad/bit.h" 26 - #include "../../codecs/libmad/mad.h" 25 + #include "codecs/libmad/bit.h" 26 + #include "codecs/libmad/mad.h" 27 27 28 28 /** Audio stream and thread **/ 29 29 struct pts_queue_slot;
+1 -1
apps/plugins/mpegplayer/mpeg_settings.c
··· 1 1 #include "plugin.h" 2 - #include "helper.h" 2 + #include "lib/helper.h" 3 3 #include "lib/configfile.h" 4 4 #include "lib/oldmenuapi.h" 5 5
+1 -1
apps/plugins/mpegplayer/mpegplayer.c
··· 101 101 *****************************************************************************/ 102 102 #include "plugin.h" 103 103 #include "mpegplayer.h" 104 - #include "helper.h" 104 + #include "lib/helper.h" 105 105 #include "mpeg_settings.h" 106 106 #include "mpeg2.h" 107 107 #include "video_out.h"
+1 -1
apps/plugins/mpegplayer/mpegplayer.h
··· 85 85 86 86 #else 87 87 88 - #include "grey.h" 88 + #include "lib/grey.h" 89 89 #define DRAW_BLACK GREY_BLACK 90 90 #define DRAW_DARKGRAY GREY_DARKGRAY 91 91 #define DRAW_LIGHTGRAY GREY_LIGHTGRAY
+21
apps/plugins/mpegplayer/mpegplayer.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + MPEGSRCDIR := $(APPSDIR)/plugins/mpegplayer 11 + MPEGBUILDDIR := $(BUILDDIR)/apps/plugins/mpegplayer 12 + 13 + ROCKS += $(MPEGBUILDDIR)/mpegplayer.rock 14 + 15 + MPEG_SRC := $(call preprocess, $(MPEGSRCDIR)/SOURCES) 16 + MPEG_OBJ := $(call c2obj, $(MPEG_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(MPEG_SRC) 20 + 21 + $(MPEGBUILDDIR)/mpegplayer.rock: $(MPEG_OBJ) $(CODECDIR)/libmad-mpeg.a
+1 -1
apps/plugins/mpegplayer/stream_mgr.c
··· 22 22 ****************************************************************************/ 23 23 #include "plugin.h" 24 24 #include "mpegplayer.h" 25 - #include "grey.h" 25 + #include "lib/grey.h" 26 26 #include "mpeg_settings.h" 27 27 28 28 #ifndef HAVE_LCD_COLOR
+1 -1
apps/plugins/mpegplayer/video_thread.c
··· 23 23 #include "plugin.h" 24 24 #include "mpegplayer.h" 25 25 #include "mpeg2dec_config.h" 26 - #include "grey.h" 26 + #include "lib/grey.h" 27 27 #include "video_out.h" 28 28 #include "mpeg_settings.h" 29 29
+3 -3
apps/plugins/oscilloscope.c
··· 22 22 ****************************************************************************/ 23 23 24 24 #include "plugin.h" 25 - #include "helper.h" 25 + #include "lib/helper.h" 26 26 27 27 #ifdef HAVE_LCD_BITMAP 28 - #include "xlcd.h" 29 - #include "configfile.h" 28 + #include "lib/xlcd.h" 29 + #include "lib/configfile.h" 30 30 31 31 PLUGIN_HEADER 32 32
-108
apps/plugins/pacbox/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-pacbox 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DIRS = . 29 - 30 - LDS := ../plugin.lds 31 - OUTPUT = $(OUTDIR)/pacbox.rock 32 - 33 - all: $(OUTPUT) 34 - 35 - ifndef SIMVER 36 - $(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE) 37 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 38 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/pacbox.map 39 - 40 - $(OUTPUT): $(OBJDIR)/pacbox.elf 41 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 42 - else 43 - 44 - ifeq ($(SIMVER), x11) 45 - ################################################### 46 - # This is the X11 simulator version 47 - 48 - $(OUTPUT): $(OBJS) 49 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 50 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 51 - # 'x' must be kept or you'll have "Win32 error 5" 52 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 53 - # #define ERROR_ACCESS_DENIED 5L 54 - else 55 - @chmod -x $@ 56 - endif 57 - 58 - else # end of x11-simulator 59 - ifeq ($(SIMVER), sdl) 60 - ################################################### 61 - # This is the SDL simulator version 62 - 63 - $(OUTPUT): $(OBJS) 64 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 65 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 66 - # 'x' must be kept or you'll have "Win32 error 5" 67 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 68 - # #define ERROR_ACCESS_DENIED 5L 69 - else 70 - @chmod -x $@ 71 - endif 72 - 73 - else # end of sdl-simulator 74 - ################################################### 75 - # This is the win32 simulator version 76 - DLLTOOLFLAGS = --export-all 77 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 78 - 79 - $(OUTPUT): $(OBJS) 80 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 81 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 82 - $(BUILDDIR)/libplugin.a -o $@ 83 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 84 - # 'x' must be kept or you'll have "Win32 error 5" 85 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 86 - # #define ERROR_ACCESS_DENIED 5L 87 - else 88 - @chmod -x $@ 89 - endif 90 - endif # end of win32-simulator 91 - endif 92 - endif # end of simulator section 93 - 94 - 95 - include $(TOOLSDIR)/make.inc 96 - 97 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 98 - # given in number of MB 99 - $(LINKFILE): $(LDS) 100 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 101 - $(DEFINES) -E -P - >$@ 102 - 103 - clean: 104 - $(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox 105 - $(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE) 106 - 107 - -include $(DEPFILE) 108 -
+27
apps/plugins/pacbox/pacbox.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + PACBOXSRCDIR := $(APPSDIR)/plugins/pacbox 11 + PACBOXBUILDDIR := $(BUILDDIR)/apps/plugins/pacbox 12 + 13 + ROCKS += $(PACBOXBUILDDIR)/pacbox.rock 14 + 15 + PACBOX_SRC := $(call preprocess, $(PACBOXSRCDIR)/SOURCES) 16 + PACBOX_OBJ := $(call c2obj, $(PACBOX_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(PACBOX_SRC) 20 + 21 + PACBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2 22 + 23 + $(PACBOXBUILDDIR)/pacbox.rock: $(PACBOX_OBJ) 24 + 25 + $(PACBOXBUILDDIR)/%.o: $(PACBOXSRCDIR)/%.c $(PLUGINBITMAPLIB) $(PACBOXSRCDIR)/pacbox.make 26 + $(SILENT)mkdir -p $(dir $@) 27 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PACBOXFLAGS) -c $< -o $@
+4 -4
apps/plugins/pictureflow.c
··· 24 24 ****************************************************************************/ 25 25 26 26 #include "plugin.h" 27 - #include "pluginlib_actions.h" 28 - #include "helper.h" 29 - #include "bmp.h" 30 - #include "picture.h" 27 + #include "lib/pluginlib_actions.h" 28 + #include "lib/helper.h" 29 + #include "lib/bmp.h" 30 + #include "lib/picture.h" 31 31 #include "pluginbitmaps/pictureflow_logo.h" 32 32 #include "pluginbitmaps/pictureflow_emptyslide.h" 33 33
+3 -3
apps/plugins/plasma.c
··· 25 25 ****************************************************************************/ 26 26 27 27 #include "plugin.h" 28 - #include "helper.h" 28 + #include "lib/helper.h" 29 29 30 30 #ifdef HAVE_LCD_BITMAP 31 31 32 32 #ifndef HAVE_LCD_COLOR 33 - #include "grey.h" 33 + #include "lib/grey.h" 34 34 #endif 35 - #include "fixedpoint.h" 35 + #include "lib/fixedpoint.h" 36 36 37 37 PLUGIN_HEADER 38 38
+76
apps/plugins/plugins.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # single-file plugins: 11 + PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES) 12 + OTHER_SRC += $(PLUGINS_SRC) 13 + ROCKS := $(PLUGINS_SRC:.c=.rock) 14 + ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS)) 15 + 16 + # libplugin.a 17 + PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a 18 + PLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES) 19 + OTHER_SRC += $(PLUGINLIB_SRC) 20 + 21 + PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) 22 + PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) 23 + PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) 24 + 25 + # multifile plugins (subdirs): 26 + PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS) 27 + 28 + # include <dir>.make from each subdir (yay!) 29 + $(foreach dir,$(PLUGINSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make)) 30 + 31 + ### build data / rules 32 + PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds 33 + PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link 34 + 35 + OTHER_INC += -I$(APPSDIR)/plugins 36 + 37 + # special compile flags for plugins: 38 + PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS) 39 + 40 + $(ROCKS): $(PLUGINLIB) $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINBITMAPLIB) 41 + 42 + $(PLUGINLIB): $(PLUGINLIB_OBJ) 43 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 44 + 45 + $(PLUGINLINK_LDS): $(PLUGIN_LDS) 46 + $(call PRINTS,PP $(@F)) 47 + $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) 48 + 49 + $(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS 50 + $(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F) 51 + 52 + # special dependencies 53 + $(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a 54 + 55 + # special pattern rule for compiling plugin lib (with -ffunction-sections) 56 + $(BUILDDIR)/apps/plugins/lib/%.o: $(ROOTDIR)/apps/plugins/lib/%.c 57 + $(SILENT)mkdir -p $(dir $@) 58 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -ffunction-sections -c $< -o $@ 59 + 60 + # special pattern rule for compiling plugins with extra flags 61 + $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(PLUGINBITMAPLIB) 62 + $(SILENT)mkdir -p $(dir $@) 63 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ 64 + 65 + ifdef SIMVER 66 + PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile 67 + else 68 + PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map 69 + endif 70 + 71 + $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o $(PLUGINLINK_LDS) 72 + $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ 73 + $(filter %.o, $^) \ 74 + $(filter %.a, $^) \ 75 + -lgcc $(PLUGINLDFLAGS) 76 + $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@
+1 -1
apps/plugins/ppmviewer.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "bmp.h" 23 + #include "lib/bmp.h" 24 24 25 25 #if defined(HAVE_LCD_COLOR) 26 26
+1 -1
apps/plugins/random_folder_advance_config.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "oldmenuapi.h" 22 + #include "lib/oldmenuapi.h" 23 23 24 24 PLUGIN_HEADER 25 25
-111
apps/plugins/reversi/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $$Id: $$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ 12 - -I$(BUILDDIR)/pluginbitmaps 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - LINKFILE := $(OBJDIR)/link.lds 21 - DEPFILE = $(OBJDIR)/dep-reversi 22 - 23 - # This sets up 'SRC' based on the files mentioned in SOURCES 24 - include $(TOOLSDIR)/makesrc.inc 25 - 26 - SOURCES = $(SRC) 27 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 28 - DIRS = . 29 - 30 - ifndef SIMVER 31 - LDS := ../plugin.lds 32 - OUTPUT = $(OUTDIR)/reversi.rock 33 - else ## simulators 34 - OUTPUT = $(OUTDIR)/reversi.rock 35 - endif 36 - 37 - all: $(OUTPUT) 38 - 39 - ifndef SIMVER 40 - $(OBJDIR)/reversi.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 41 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 42 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/reversi.map 43 - 44 - $(OUTPUT): $(OBJDIR)/reversi.elf 45 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 46 - else 47 - 48 - ifeq ($(SIMVER), x11) 49 - ################################################### 50 - # This is the X11 simulator version 51 - 52 - $(OUTPUT): $(OBJS) 53 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 54 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 55 - # 'x' must be kept or you'll have "Win32 error 5" 56 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 57 - # #define ERROR_ACCESS_DENIED 5L 58 - else 59 - @chmod -x $@ 60 - endif 61 - 62 - else # end of x11-simulator 63 - ifeq ($(SIMVER), sdl) 64 - ################################################### 65 - # This is the SDL simulator version 66 - 67 - $(OUTPUT): $(OBJS) 68 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 69 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 70 - # 'x' must be kept or you'll have "Win32 error 5" 71 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 72 - # #define ERROR_ACCESS_DENIED 5L 73 - else 74 - @chmod -x $@ 75 - endif 76 - 77 - else # end of sdl-simulator 78 - ################################################### 79 - # This is the win32 simulator version 80 - DLLTOOLFLAGS = --export-all 81 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 82 - 83 - $(OUTPUT): $(OBJS) 84 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 85 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 86 - $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 87 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 88 - # 'x' must be kept or you'll have "Win32 error 5" 89 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 90 - # #define ERROR_ACCESS_DENIED 5L 91 - else 92 - @chmod -x $@ 93 - endif 94 - endif # end of win32-simulator 95 - endif 96 - endif # end of simulator section 97 - 98 - 99 - include $(TOOLSDIR)/make.inc 100 - 101 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 102 - # given in number of MB 103 - $(LINKFILE): $(LDS) 104 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 105 - $(DEFINES) -E -P - >$@ 106 - 107 - clean: 108 - $(call PRINTS,cleaning reversi)rm -rf $(OBJDIR)/reversi 109 - $(SILENT)rm -f $(OBJDIR)/reversi.* $(DEPFILE) 110 - 111 - -include $(DEPFILE)
+1 -1
apps/plugins/reversi/reversi-gui.c
··· 47 47 #include "reversi-strategy.h" 48 48 #include "reversi-gui.h" 49 49 50 - #include "../lib/oldmenuapi.h" 50 + #include "lib/oldmenuapi.h" 51 51 52 52 PLUGIN_HEADER 53 53
+28
apps/plugins/reversi/reversi.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + REVERSISRCDIR := $(APPSDIR)/plugins/reversi 11 + REVERSIBUILDDIR := $(BUILDDIR)/apps/plugins/reversi 12 + 13 + ROCKS += $(REVERSIBUILDDIR)/reversi.rock 14 + 15 + REVERSI_SRC := $(call preprocess, $(REVERSISRCDIR)/SOURCES) 16 + REVERSI_OBJ := $(call c2obj, $(REVERSI_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(REVERSI_SRC) 20 + 21 + $(REVERSIBUILDDIR)/reversi.rock: $(REVERSI_OBJ) 22 + # for some reason, this doesn't match the implicit rule in plugins.make, 23 + # so we have to duplicate the link command here 24 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \ 25 + $(filter %.o, $^) \ 26 + $(filter %.a, $^) \ 27 + -lgcc $(PLUGINLDFLAGS) 28 + $(call PRINTS,LD $(@F))$(OC) -O binary $*.elf $@
+9 -1
apps/plugins/robotfindskitten.c
··· 29 29 */ 30 30 31 31 #include "plugin.h" 32 - #include "pluginlib_actions.h" 32 + #include "lib/pluginlib_actions.h" 33 33 34 34 /* This macros must always be included. Should be placed at the top by 35 35 convention, although the actual position doesn't matter */ ··· 488 488 #define EMPTY -1 489 489 #define ROBOT 0 490 490 #define KITTEN 1 491 + 492 + /* if SYSFONT_WIDTH is 0 (which it is during dependency generation) gcc 493 + will abort (div by 0) and this plugin won't get any dependencies 494 + */ 495 + #if SYSFONT_WIDTH < 1 496 + #define SYSFONT_WIDTH 10 497 + #define SYSFONT_HEIGHT 10 498 + #endif 491 499 492 500 /*Screen dimensions.*/ 493 501 #define X_MIN 0
+3 -3
apps/plugins/rockblox.c
··· 21 21 * 22 22 ****************************************************************************/ 23 23 #include "plugin.h" 24 - #include "highscore.h" 25 - #include "playergfx.h" 26 - #include "helper.h" 24 + #include "lib/highscore.h" 25 + #include "lib/playergfx.h" 26 + #include "lib/helper.h" 27 27 28 28 PLUGIN_HEADER 29 29
+1 -1
apps/plugins/rockboy.c
··· 24 24 25 25 #if MEM <= 8 && !defined(SIMULATOR) 26 26 27 - #include "overlay.h" 27 + #include "lib/overlay.h" 28 28 29 29 PLUGIN_HEADER 30 30
-119
apps/plugins/rockboy/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -finline-functions 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-rockboy 21 - SRC = cpu.c emu.c events.c fastmem.c hw.c lcd.c lcdc.c loader.c \ 22 - mem.c menu.c rbsound.c rockboy.c rtc.c save.c sound.c sys_rockbox.c \ 23 - ../../../firmware/common/sscanf.c 24 - 25 - #CFLAGS += -DDYNAREC 26 - #SRC += dynarec.c 27 - 28 - SOURCES = $(SRC) 29 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 30 - DIRS = . 31 - 32 - ifndef SIMVER 33 - ifneq (,$(findstring RECORDER,$(TARGET))) ## Archos recorder targets 34 - LDS := archos.lds 35 - OUTPUT = $(OUTDIR)/rockboy.ovl 36 - else ## iRiver target 37 - LDS := ../plugin.lds 38 - OUTPUT = $(OUTDIR)/rockboy.rock 39 - endif 40 - else ## simulators 41 - OUTPUT = $(OUTDIR)/rockboy.rock 42 - endif 43 - 44 - all: $(OUTPUT) 45 - 46 - ifndef SIMVER 47 - $(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) 48 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \ 49 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/rockboy.map 50 - 51 - $(OUTPUT): $(OBJDIR)/rockboy.elf 52 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 53 - else 54 - 55 - ifeq ($(SIMVER), x11) 56 - ################################################### 57 - # This is the X11 simulator version 58 - 59 - $(OUTPUT): $(OBJS) 60 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 61 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 62 - # 'x' must be kept or you'll have "Win32 error 5" 63 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 64 - # #define ERROR_ACCESS_DENIED 5L 65 - else 66 - @chmod -x $@ 67 - endif 68 - 69 - else # end of x11-simulator 70 - ifeq ($(SIMVER), sdl) 71 - ################################################### 72 - # This is the sdl simulator version 73 - 74 - $(OUTPUT): $(OBJS) 75 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 76 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 77 - # 'x' must be kept or you'll have "Win32 error 5" 78 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 79 - # #define ERROR_ACCESS_DENIED 5L 80 - else 81 - @chmod -x $@ 82 - endif 83 - 84 - else # end of sdl-simulator 85 - ################################################### 86 - # This is the win32 simulator version 87 - DLLTOOLFLAGS = --export-all 88 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 89 - 90 - $(OUTPUT): $(OBJS) 91 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 92 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 93 - $(BUILDDIR)/libplugin.a -o $@ 94 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 95 - # 'x' must be kept or you'll have "Win32 error 5" 96 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 97 - # #define ERROR_ACCESS_DENIED 5L 98 - else 99 - @chmod -x $@ 100 - endif 101 - endif # end of win32-simulator 102 - endif 103 - endif # end of simulator section 104 - 105 - 106 - include $(TOOLSDIR)/make.inc 107 - 108 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 109 - # given in number of MB 110 - $(LINKFILE): $(LDS) 111 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ 112 - -E -P - >$@ 113 - 114 - clean: 115 - $(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy 116 - $(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE) 117 - 118 - -include $(DEPFILE) 119 -
+16
apps/plugins/rockboy/SOURCES
··· 1 + cpu.c 2 + emu.c 3 + events.c 4 + fastmem.c 5 + hw.c 6 + lcd.c 7 + lcdc.c 8 + loader.c 9 + mem.c 10 + menu.c 11 + rbsound.c 12 + rockboy.c 13 + rtc.c 14 + save.c 15 + sound.c 16 + sys_rockbox.c
+53
apps/plugins/rockboy/rockboy.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy 11 + ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy 12 + 13 + ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) 14 + ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) 15 + ROCKBOY_OBJ += $(ROCKBOY_OBJDIR)/sscanf.o 16 + 17 + OTHER_SRC += $(ROCKBOY_SRC) 18 + 19 + ifndef SIMVER 20 + ifneq (,$(findstring RECORDER,$(TARGET))) 21 + ## archos recorder targets 22 + ROCKBOY_INLDS := $(ROCKBOY_SRCDIR)/archos.lds 23 + ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl 24 + else 25 + ### all other targets 26 + ROCKBOY_INLDS := $(APPSDIR)/plugins/plugin.lds 27 + ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock 28 + endif 29 + ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(ROCKBOY_OBJDIR)/$*.map 30 + ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.lds 31 + else 32 + ### simulator 33 + ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock 34 + ROCKBOY_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile 35 + endif 36 + 37 + $(ROCKBOY_OBJDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c 38 + $(SILENT)mkdir -p $(dir $@) 39 + $(call PRINTS,CP $<)cp $< $@ 40 + 41 + $(ROCKBOY_OBJDIR)/sscanf.o: $(ROCKBOY_OBJDIR)/sscanf.c 42 + 43 + $(ROCKBOY_OUTLDS): $(ROCKBOY_INLDS) $(ROCKBOY_OBJ) 44 + $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) 45 + 46 + $(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB) 47 + 48 + $(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB) 49 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $(ROCKBOY_OBJDIR)/$*.elf \ 50 + $(filter %.o, $^) \ 51 + $(filter %.a, $^) \ 52 + -lgcc $(ROCKBOY_OVLFLAGS) 53 + $(call PRINTS,LD $(@F))$(OC) -O binary $(ROCKBOY_OBJDIR)/$*.elf $@
+2 -2
apps/plugins/rocklife.c
··· 61 61 */ 62 62 63 63 #include "plugin.h" 64 - #include "pluginlib_actions.h" 65 - #include "helper.h" 64 + #include "lib/pluginlib_actions.h" 65 + #include "lib/helper.h" 66 66 67 67 PLUGIN_HEADER 68 68
-1
apps/plugins/rockpaint.c
··· 29 29 */ 30 30 31 31 #include "plugin.h" 32 - #include "errno.h" 33 32 #include "lib/bmp.h" 34 33 #include "lib/rgb_hsv.h" 35 34
-105
apps/plugins/searchengine/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-searchengine 21 - SRC = searchengine.c parser.c token.c dbinterface.c 22 - 23 - SOURCES = $(SRC) 24 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 25 - DIRS = . 26 - 27 - LDS := ../plugin.lds 28 - OUTPUT = $(OUTDIR)/searchengine.rock 29 - 30 - all: $(OUTPUT) 31 - 32 - ifndef SIMVER 33 - $(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) 34 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 35 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/searchengine.map 36 - 37 - $(OUTPUT): $(OBJDIR)/searchengine.elf 38 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 39 - else 40 - 41 - ifeq ($(SIMVER), x11) 42 - ################################################### 43 - # This is the X11 simulator version 44 - 45 - $(OUTPUT): $(OBJS) 46 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 47 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 48 - # 'x' must be kept or you'll have "Win32 error 5" 49 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 50 - # #define ERROR_ACCESS_DENIED 5L 51 - else 52 - @chmod -x $@ 53 - endif 54 - 55 - else # end of x11-simulator 56 - ifeq ($(SIMVER), sdl) 57 - ################################################### 58 - # This is the SDL simulator version 59 - 60 - $(OUTPUT): $(OBJS) 61 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 62 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 63 - # 'x' must be kept or you'll have "Win32 error 5" 64 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 65 - # #define ERROR_ACCESS_DENIED 5L 66 - else 67 - @chmod -x $@ 68 - endif 69 - 70 - else # end of sdl-simulator 71 - ################################################### 72 - # This is the win32 simulator version 73 - DLLTOOLFLAGS = --export-all 74 - DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 75 - 76 - $(OUTPUT): $(OBJS) 77 - $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 78 - $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 79 - $(BUILDDIR)/libplugin.a -o $@ 80 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 81 - # 'x' must be kept or you'll have "Win32 error 5" 82 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 83 - # #define ERROR_ACCESS_DENIED 5L 84 - else 85 - @chmod -x $@ 86 - endif 87 - endif # end of win32-simulator 88 - endif 89 - endif # end of simulator section 90 - 91 - 92 - include $(TOOLSDIR)/make.inc 93 - 94 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 95 - # given in number of MB 96 - $(LINKFILE): $(LDS) 97 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 98 - $(DEFINES) -E -P - >$@ 99 - 100 - clean: 101 - $(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine 102 - $(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE) 103 - 104 - -include $(DEPFILE) 105 -
-90
apps/plugins/shortcuts/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $$Id: $$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ 12 - -I$(BUILDDIR)/pluginbitmaps 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - LINKFILE := $(OBJDIR)/link.lds 21 - DEPFILE = $(OBJDIR)/dep-shortcuts 22 - 23 - SOURCES := shortcuts_common.c shortcuts_view.c shortcuts_append.c 24 - VIEW_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_view.o 25 - APPEND_OBJS := $(OBJDIR)/shortcuts_common.o $(OBJDIR)/shortcuts_append.o 26 - DIRS = . 27 - 28 - ifndef SIMVER 29 - LDS := ../plugin.lds 30 - endif 31 - 32 - OUTPUT = $(OUTDIR)/shortcuts_view.rock $(OUTDIR)/shortcuts_append.rock 33 - 34 - all: $(OUTPUT) 35 - 36 - ifndef SIMVER 37 - $(OBJDIR)/shortcuts_view.elf: $(VIEW_OBJS) $(LINKFILE) $(BITMAPLIBS) 38 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(VIEW_OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 39 - $(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_view.map 40 - 41 - $(OUTDIR)/shortcuts_view.rock: $(OBJDIR)/shortcuts_view.elf 42 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 43 - 44 - $(OBJDIR)/shortcuts_append.elf: $(APPEND_OBJS) $(LINKFILE) $(BITMAPLIBS) 45 - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(APPEND_OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 46 - $(LINKBITMAPS) -Wl,--gc-sections -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts_append.map 47 - 48 - $(OUTDIR)/shortcuts_append.rock: $(OBJDIR)/shortcuts_append.elf 49 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 50 - else 51 - 52 - ################################################### 53 - # This is the SDL simulator version 54 - 55 - $(OUTDIR)/shortcuts_view.rock: $(VIEW_OBJS) 56 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(VIEW_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 57 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 58 - # 'x' must be kept or you'll have "Win32 error 5" 59 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 60 - # #define ERROR_ACCESS_DENIED 5L 61 - else 62 - @chmod -x $@ 63 - endif 64 - 65 - $(OUTDIR)/shortcuts_append.rock: $(APPEND_OBJS) 66 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(APPEND_OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 67 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 68 - # 'x' must be kept or you'll have "Win32 error 5" 69 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 70 - # #define ERROR_ACCESS_DENIED 5L 71 - else 72 - @chmod -x $@ 73 - endif 74 - 75 - endif # end of simulator section 76 - 77 - 78 - include $(TOOLSDIR)/make.inc 79 - 80 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 81 - # given in number of MB 82 - $(LINKFILE): $(LDS) 83 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 84 - $(DEFINES) -E -P - >$@ 85 - 86 - clean: 87 - $(call PRINTS,cleaning shortcuts)rm -rf $(OBJDIR)/shortcuts 88 - $(SILENT)rm -f $(OBJDIR)/shortcuts* $(DEPFILE) 89 - 90 - -include $(DEPFILE)
+25
apps/plugins/shortcuts/shortcuts.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + SHCUTSRCDIR := $(APPSDIR)/plugins/shortcuts 11 + SHCUTBUILDDIR := $(BUILDDIR)/apps/plugins/shortcuts 12 + 13 + ROCKS += $(SHCUTBUILDDIR)/shortcuts_view.rock 14 + ROCKS += $(SHCUTBUILDDIR)/shortcuts_append.rock 15 + 16 + # add source files to OTHER_SRC to get automatic dependencies 17 + OTHER_SRC += $(SHCUTSRCDIR)/shortcuts_common.c \ 18 + $(SHCUTSRCDIR)/shortcuts_view.c \ 19 + $(SHCUTSRCDIR)/shortcuts_append.c 20 + 21 + $(SHCUTBUILDDIR)/shortcuts_view.rock: \ 22 + $(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_view.o 23 + 24 + $(SHCUTBUILDDIR)/shortcuts_append.rock: \ 25 + $(SHCUTBUILDDIR)/shortcuts_common.o $(SHCUTBUILDDIR)/shortcuts_append.o
+1 -1
apps/plugins/sliding_puzzle.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "bmp.h" 22 + #include "lib/bmp.h" 23 23 24 24 #ifdef HAVE_LCD_BITMAP 25 25 PLUGIN_HEADER
+1 -1
apps/plugins/snow.c
··· 19 19 * 20 20 **************************************************************************/ 21 21 #include "plugin.h" 22 - #include "playergfx.h" 22 + #include "lib/playergfx.h" 23 23 24 24 PLUGIN_HEADER 25 25
+8
apps/plugins/sokoban.c
··· 34 34 35 35 #include "pluginbitmaps/sokoban_tiles.h" 36 36 #define SOKOBAN_TILESIZE BMPWIDTH_sokoban_tiles 37 + 38 + /* If tilesize is 0 (which it is during dependency generation) gcc will abort 39 + (div by 0) and this plugin won't get any dependencies 40 + */ 41 + #if SOKOBAN_TILESIZE < 1 42 + #define SOKOBAN_TILESIZE 10 43 + #endif 44 + 37 45 /* SOKOBAN_TILESIZE is the number of pixels for each block. 38 46 * Set dynamically so all targets can support levels 39 47 * that fill their entire screen, less the stat box.
+3 -3
apps/plugins/solitaire.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "playback_control.h" 24 - #include "configfile.h" 23 + #include "lib/playback_control.h" 24 + #include "lib/configfile.h" 25 25 #include "button.h" 26 26 #include "lcd.h" 27 - #include "oldmenuapi.h" 27 + #include "lib/oldmenuapi.h" 28 28 29 29 #ifdef HAVE_LCD_BITMAP 30 30
+1 -3
apps/plugins/spacerocks.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "math.h" 24 - #include "stdio.h" 25 - #include "helper.h" 23 + #include "lib/helper.h" 26 24 27 25 PLUGIN_HEADER 28 26
+1 -1
apps/plugins/starfield.c
··· 18 18 ****************************************************************************/ 19 19 20 20 #include "plugin.h" 21 - #include "helper.h" 21 + #include "lib/helper.h" 22 22 23 23 #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ 24 24
-75
apps/plugins/sudoku/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \ 12 - -I$(BUILDDIR)/pluginbitmaps 13 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 14 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 15 - 16 - ifdef APPEXTRA 17 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 18 - endif 19 - 20 - LINKFILE := $(OBJDIR)/link.lds 21 - DEPFILE = $(OBJDIR)/dep-sudoku 22 - 23 - # This sets up 'SRC' based on the files mentioned in SOURCES 24 - include $(TOOLSDIR)/makesrc.inc 25 - 26 - SOURCES = $(SRC) 27 - OBJS := $(SRC:%.c=$(OBJDIR)/%.o) 28 - DIRS = . 29 - 30 - ifndef SIMVER 31 - LDS := ../plugin.lds 32 - OUTPUT = $(OUTDIR)/sudoku.rock 33 - else ## simulators 34 - OUTPUT = $(OUTDIR)/sudoku.rock 35 - endif 36 - 37 - all: $(OUTPUT) 38 - 39 - ifndef SIMVER 40 - $(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 41 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 42 - $(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/sudoku.map 43 - 44 - $(OUTPUT): $(OBJDIR)/sudoku.elf 45 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 46 - else 47 - ################################################### 48 - # This is the SDL simulator version 49 - 50 - $(OUTPUT): $(OBJS) 51 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ 52 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 53 - # 'x' must be kept or you'll have "Win32 error 5" 54 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 55 - # #define ERROR_ACCESS_DENIED 5L 56 - else 57 - @chmod -x $@ 58 - endif 59 - 60 - endif # end of simulator section 61 - 62 - 63 - include $(TOOLSDIR)/make.inc 64 - 65 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 66 - # given in number of MB 67 - $(LINKFILE): $(LDS) 68 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 69 - $(DEFINES) -E -P - >$@ 70 - 71 - clean: 72 - $(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku 73 - $(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE) 74 - 75 - -include $(DEPFILE)
+3 -3
apps/plugins/sudoku/sudoku.c
··· 69 69 #include "generator.h" 70 70 71 71 /* The bitmaps */ 72 - #include "sudoku_normal.h" 73 - #include "sudoku_inverse.h" 74 - #include "sudoku_start.h" 72 + #include "pluginbitmaps/sudoku_normal.h" 73 + #include "pluginbitmaps/sudoku_inverse.h" 74 + #include "pluginbitmaps/sudoku_start.h" 75 75 76 76 #define BITMAP_HEIGHT (BMPHEIGHT_sudoku_normal/10) 77 77 #define BITMAP_STRIDE BMPWIDTH_sudoku_normal
+21
apps/plugins/sudoku/sudoku.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + SUDOKUSRCDIR := $(APPSDIR)/plugins/sudoku 11 + SUDOKUBUILDDIR := $(BUILDDIR)/apps/plugins/sudoku 12 + 13 + ROCKS += $(SUDOKUBUILDDIR)/sudoku.rock 14 + 15 + SUDOKU_SRC := $(call preprocess, $(SUDOKUSRCDIR)/SOURCES) 16 + SUDOKU_OBJ := $(call c2obj, $(SUDOKU_SRC)) 17 + 18 + # add source files to OTHER_SRC to get automatic dependencies 19 + OTHER_SRC += $(SUDOKU_SRC) 20 + 21 + $(SUDOKUBUILDDIR)/sudoku.rock: $(SUDOKU_OBJ)
+2 -2
apps/plugins/test_disk.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "plugin.h" 23 - #include "oldmenuapi.h" 24 - #include "helper.h" 23 + #include "lib/oldmenuapi.h" 24 + #include "lib/helper.h" 25 25 26 26 PLUGIN_HEADER 27 27
+2 -2
apps/plugins/test_fps.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "helper.h" 23 - #include "grey.h" 22 + #include "lib/helper.h" 23 + #include "lib/grey.h" 24 24 25 25 #ifdef HAVE_LCD_BITMAP 26 26
+2 -2
apps/plugins/test_resize.c
··· 25 25 */ 26 26 27 27 #include "plugin.h" 28 - #include "pluginlib_actions.h" 29 - #include "bmp.h" 28 + #include "lib/pluginlib_actions.h" 29 + #include "lib/bmp.h" 30 30 31 31 PLUGIN_HEADER 32 32
+1 -1
apps/plugins/test_sampr.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "oldmenuapi.h" 22 + #include "lib/oldmenuapi.h" 23 23 24 24 PLUGIN_HEADER 25 25
+1 -1
apps/plugins/text_editor.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "playback_control.h" 22 + #include "lib/playback_control.h" 23 23 24 24 #if PLUGIN_BUFFER_SIZE > 0x45000 25 25 #define MAX_CHARS 0x40000 /* 128 kiB */
+1 -1
apps/plugins/video.c
··· 29 29 #include "plugin.h" 30 30 #include "sh7034.h" 31 31 #include "system.h" 32 - #include "helper.h" 32 + #include "lib/helper.h" 33 33 34 34 #ifndef SIMULATOR /* not for simulator by now */ 35 35 #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */
+2 -2
apps/plugins/viewer.c
··· 21 21 ****************************************************************************/ 22 22 #include "plugin.h" 23 23 #include <ctype.h> 24 - #include "playback_control.h" 25 - #include "oldmenuapi.h" 24 + #include "lib/playback_control.h" 25 + #include "lib/oldmenuapi.h" 26 26 27 27 PLUGIN_HEADER 28 28
+1 -1
apps/plugins/vu_meter.c
··· 18 18 * 19 19 **************************************************************************/ 20 20 #include "plugin.h" 21 - #include "fixedpoint.h" 21 + #include "lib/fixedpoint.h" 22 22 23 23 #if defined(HAVE_LCD_BITMAP) 24 24
+1 -1
apps/plugins/wavrecord.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "configfile.h" 22 + #include "lib/configfile.h" 23 23 24 24 PLUGIN_HEADER 25 25
+2 -2
apps/plugins/wormlet.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 #include "plugin.h" 22 - #include "configfile.h" 23 - #include "helper.h" 22 + #include "lib/configfile.h" 23 + #include "lib/helper.h" 24 24 25 25 PLUGIN_HEADER 26 26
+1 -1
apps/plugins/xobox.c
··· 21 21 ****************************************************************************/ 22 22 23 23 #include "plugin.h" 24 - #include "helper.h" 24 + #include "lib/helper.h" 25 25 26 26 PLUGIN_HEADER 27 27
+1 -1
apps/plugins/zxbox.c
··· 21 21 22 22 #if MEM <= 8 && !defined(SIMULATOR) 23 23 24 - #include "overlay.h" 24 + #include "lib/overlay.h" 25 25 26 26 PLUGIN_HEADER 27 27
-84
apps/plugins/zxbox/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # 8 - OPT_FLAGS=-O3 -funroll-loops 9 - 10 - INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ 11 - -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) -I. $(TARGET_INC) 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 13 - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN $(OPT_FLAGS) $(PROFILE_OPTS) 14 - 15 - ifdef APPEXTRA 16 - INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 17 - endif 18 - 19 - LINKFILE := $(OBJDIR)/link.lds 20 - DEPFILE = $(OBJDIR)/dep-zxbox 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DIRS = . 29 - 30 - ifndef SIMVER 31 - ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 32 - LDS := archos.lds 33 - OUTPUT = $(OUTDIR)/zxbox.ovl 34 - else ## iRiver/iPod/... targets 35 - LDS := ../plugin.lds 36 - OUTPUT = $(OUTDIR)/zxbox.rock 37 - endif 38 - else ## simulators 39 - OUTPUT = $(OUTDIR)/zxbox.rock 40 - endif 41 - 42 - all: $(OUTPUT) 43 - 44 - ifndef SIMVER 45 - $(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE) 46 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 47 - -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/zxbox.map 48 - 49 - $(OUTPUT): $(OBJDIR)/zxbox.elf 50 - $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 51 - else 52 - 53 - ifeq ($(SIMVER), sdl) 54 - ################################################### 55 - # This is the SDL simulator version 56 - 57 - $(OUTPUT): $(OBJS) 58 - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 59 - ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 60 - # 'x' must be kept or you'll have "Win32 error 5" 61 - # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 62 - # #define ERROR_ACCESS_DENIED 5L 63 - else 64 - @chmod -x $@ 65 - endif 66 - 67 - endif 68 - endif # end of simulator section 69 - 70 - 71 - include $(TOOLSDIR)/make.inc 72 - 73 - # MEMORYSIZE should be passed on to this makefile with the chosen memory size 74 - # given in number of MB 75 - $(LINKFILE): $(LDS) 76 - $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ 77 - $(DEFINES) -E -P - >$@ 78 - 79 - clean: 80 - $(call PRINTS,cleaning zxbox)rm -rf $(OBJDIR)/zxbox 81 - $(SILENT)rm -f $(OBJDIR)/zxbox.* $(DEPFILE) 82 - 83 - -include $(DEPFILE) 84 -
+1 -1
apps/plugins/zxbox/spmain.c
··· 43 43 #include <stdlib.h> 44 44 #include <errno.h> 45 45 #ifdef USE_GREY 46 - #include "../lib/grey.h" 46 + #include "lib/grey.h" 47 47 #endif 48 48 49 49 #include "zxbox_keyb.h"
+57
apps/plugins/zxbox/zxbox.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + ZXBOX_SRCDIR = $(APPSDIR)/plugins/zxbox 11 + ZXBOX_OBJDIR = $(BUILDDIR)/apps/plugins/zxbox 12 + 13 + ZXBOX_SRC := $(call preprocess, $(ZXBOX_SRCDIR)/SOURCES) 14 + ZXBOX_OBJ := $(call c2obj, $(ZXBOX_SRC)) 15 + 16 + OTHER_SRC += $(ZXBOX_SRC) 17 + 18 + ifndef SIMVER 19 + ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 20 + ## archos recorder targets 21 + ZXBOX_INLDS := $(ZXBOX_SRCDIR)/archos.lds 22 + ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl 23 + else 24 + ### all other targets 25 + ZXBOX_INLDS := $(APPSDIR)/plugins/plugin.lds 26 + ROCKS += $(ZXBOX_OBJDIR)/zxbox.rock 27 + endif 28 + else 29 + ### simulator 30 + ROCKS += $(ZXBOX_OBJDIR)/zxbox.rock 31 + endif 32 + 33 + ZXBOXFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O3 -funroll-loops 34 + 35 + ifdef SIMVER 36 + ZXBOX_LDFLAGS = $(SHARED_FLAG) # <-- from Makefile 37 + else 38 + ZXBOX_OUTLDS = $(ZXBOX_OBJDIR)/zxbox.lds 39 + ZXBOX_LDFLAGS = -T$(ZXBOX_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/$*.map 40 + endif 41 + 42 + $(ZXBOX_OUTLDS): $(ZXBOX_INLDS) $(ZXBOX_OBJ) 43 + $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) 44 + 45 + $(ZXBOX_OBJDIR)/zxbox.rock: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS) $(PLUGINBITMAPLIB) 46 + 47 + $(ZXBOX_OBJDIR)/zxbox.ovl: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS) $(PLUGINBITMAPLIB) $(PLUGINLIB) 48 + $(SILENT)$(CC) $(PLUGINFLAGS) -o $(ZXBOX_OBJDIR)/$*.elf \ 49 + $(filter %.o, $^) \ 50 + $(filter %.a, $^) \ 51 + -lgcc $(ZXBOX_LDFLAGS) 52 + $(call PRINTS,LD $(@F))$(OC) -O binary $(ZXBOX_OBJDIR)/$*.elf $@ 53 + 54 + # special pattern rule for compiling zxbox with extra flags 55 + $(ZXBOX_OBJDIR)/%.o: $(ZXBOX_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(ZXBOX_SRCDIR)/zxbox.make 56 + $(SILENT)mkdir -p $(dir $@) 57 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(ZXBOXFLAGS) -c $< -o $@
+1 -1
apps/plugins/zxbox/zxvid_com.h
··· 3 3 #include "zxconfig.h" 4 4 5 5 #ifdef USE_GREY 6 - #include "../lib/grey.h" 6 + #include "lib/grey.h" 7 7 #endif 8 8 9 9 #include "spscr_p.h"
+37
bootloader/bootloader.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + INCLUDES += -I$(APPSDIR) 11 + SRC += $(call preprocess, $(APPSDIR)/SOURCES) 12 + 13 + BOOTLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/boot.lds 14 + BOOTLINK := $(BUILDDIR)/boot.link 15 + 16 + CLEANOBJS += $(BUILDDIR)/bootloader.* 17 + 18 + .SECONDEXPANSION: 19 + 20 + $(BOOTLINK): $(BOOTLDS) 21 + $(call PRINTS,PP $(@F)) 22 + $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) 23 + 24 + $(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(BOOTLINK) 25 + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ 26 + $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware -T$(BOOTLINK) \ 27 + -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map 28 + 29 + $(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf 30 + $(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ 31 + 32 + $(BUILDDIR)/bootloader.asm: $(BUILDDIR)/bootloader.bin 33 + $(TOOLSDIR)/sh2d -sh1 $< > $@ 34 + 35 + $(BUILDDIR)/$(BINARY) : $(BUILDDIR)/bootloader.bin 36 + $(call PRINTS,Build bootloader file)$(MKFIRMWARE) $< $@ 37 +
+1 -1
bootloader/show_logo.c
··· 24 24 #include <stdio.h> 25 25 #include <string.h> 26 26 27 - #include "rockboxlogo.h" 27 + #include "bitmaps/rockboxlogo.h" 28 28 29 29 #if LCD_WIDTH <= 128 30 30 #define BOOT_VERSION ("Boot " APPSVERSION)
-57
firmware/Makefile
··· 1 - # __________ __ ___. 2 - # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 - # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 - # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 - # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 - # \/ \/ \/ \/ \/ 7 - # $Id$ 8 - # 9 - 10 - INCLUDES=$(TARGET_INC) -Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BUILDDIR) 11 - 12 - CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(EXTRA_DEFINES) \ 13 - -DMEM=${MEMORYSIZE} 14 - 15 - # Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds 16 - ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) 17 - MAXCHAR = 127 18 - else 19 - MAXCHAR = 255 20 - endif 21 - 22 - # This sets up 'SRC' based on the files mentioned in SOURCES 23 - include $(TOOLSDIR)/makesrc.inc 24 - 25 - SOURCES = $(SRC) 26 - OBJS2 := $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) $(OBJDIR)/sysfont.o 27 - OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 28 - DIRS:=. drivers common 29 - OUTPUT = $(BUILDDIR)/librockbox.a 30 - DEPFILE = $(OBJDIR)/dep-firmware 31 - 32 - all: $(OUTPUT) $(EXTRA_TARGETS) 33 - 34 - dep: $(DEPFILE) 35 - 36 - $(OUTPUT): $(BUILDDIR)/sysfont.h $(OBJS) $(DEPFILE) 37 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 38 - $(SILENT)$(RANLIB) $@ 39 - 40 - include $(TOOLSDIR)/make.inc 41 - 42 - clean: 43 - $(call PRINTS,cleaning firmware)rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c $(DEPFILE) 44 - $(SILENT)rm -rf $(OBJDIR)/drivers $(OBJDIR)/common 45 - 46 - # Special targets 47 - $(OBJDIR)/thread.o: thread.c export/thread.h 48 - $(call PRINTS,CC thread.c)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@ 49 - 50 - $(BUILDDIR)/sysfont.h: ../fonts/08-Schumacher-Clean.bdf 51 - $(call PRINTS,Create sysfont.h)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $< 52 - 53 - $(OBJDIR)/sysfont.o: ../fonts/08-Schumacher-Clean.bdf 54 - $(call PRINTS,CONVBDF)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(OBJDIR)/sysfont.c $< 55 - $(call PRINTS,CC sysfont.c)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@ 56 - 57 - -include $(DEPFILE)
+1
firmware/decompressor/Makefile
··· 27 27 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map 28 28 29 29 $(LINKFILE): $(LDS) 30 + $(SILENT)mkdir -p $(dir $@) 30 31 $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ 31 32 32 33 $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c
+1 -2
firmware/export/config-mrobe500.h
··· 147 147 /* Define this if you have a Motorola SCF5249 */ 148 148 #define CONFIG_CPU DM320 149 149 150 - /* Define this if you want to use coldfire's i2c interface */ 151 - //#define CONFIG_I2C I2C_S3C2440 150 + #define CONFIG_I2C I2C_DM320 152 151 153 152 /* define this if the hardware can be powered off while charging */ 154 153 #define HAVE_POWEROFF_WHILE_CHARGING
+2 -1
firmware/export/debug.h
··· 28 28 extern void ldebugf(const char* file, int line, const char *fmt, ...) 29 29 ATTRIBUTE_PRINTF(3, 4); 30 30 31 + #ifndef CODEC 31 32 #ifdef __GNUC__ 32 33 33 34 /* */ ··· 57 58 58 59 #endif /* GCC */ 59 60 60 - 61 + #endif /* CODEC */ 61 62 #endif
+39
firmware/firmware.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers 11 + 12 + FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES) 13 + FIRMLIB_SRC += $(ROOTDIR)/sysfont.o 14 + FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC)) 15 + OTHER_SRC += $(FIRMLIB_SRC) 16 + 17 + FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a 18 + 19 + SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf 20 + 21 + CLEANOBJS += $(BUILDDIR)/sysfont.* 22 + 23 + # Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds 24 + ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) 25 + MAXCHAR = 127 26 + else 27 + MAXCHAR = 255 28 + endif 29 + 30 + $(FIRMLIB): $(FIRMLIB_OBJ) 31 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 32 + 33 + $(BUILDDIR)/sysfont.h: $(SYSFONT) $(TOOLS) 34 + $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $< 35 + 36 + $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h 37 + $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< 38 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ 39 +
+13
flash/bootbox/bootbox.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + SRC += $(call preprocess,$(APPSDIR)/SOURCES) 11 + 12 + # don't build rombox.ucl 13 + ARCHOSROM=
+2 -2
tools/Makefile
··· 15 15 generate_rocklatin mkboot ipod_fw codepages uclpack mi4 gigabeat database \ 16 16 lngdump telechips gigabeats creative hmac-sha1 mktccboot mknkboot rbspeexenc mkzenboot 17 17 18 - all: 19 - @echo "Run make in your build directory!" 18 + all: scramble descramble sh2d rdf2binary mkboot mktccboot mknkboot mkzenboot \ 19 + convbdf codepages uclpack rbspeexenc voicefont 20 20 21 21 scramble: scramble.o iriver.o mi4.o gigabeat.o gigabeats.o telechips.o iaudio_bl_flash.o creative.o hmac-sha1.o 22 22 descramble: descramble.o iriver.o gigabeat.o
+5 -178
tools/configure
··· 1325 1325 boottool="$rootdir/tools/scramble -tcc=crc" 1326 1326 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1327 1327 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1328 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1329 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1330 1328 output="rockbox.d2" 1331 1329 appextra="recorder:gui" 1332 1330 plugins="yes" ··· 1414 1412 tool="cp " 1415 1413 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1416 1414 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1417 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1418 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1419 1415 output="rockbox.mrobe500" 1420 1416 appextra="recorder:gui" 1421 1417 plugins="yes" ··· 1438 1434 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS" 1439 1435 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1440 1436 bmp2rb_native="$rootdir/tools/bmp2rb -f 0" 1441 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1442 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1443 1437 output="rockbox.mi4" 1444 1438 appextra="recorder:gui" 1445 1439 plugins="yes" ··· 1487 1481 arm926ejscc 1488 1482 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1489 1483 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1490 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1491 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1492 1484 tool="$rootdir/tools/scramble -creative=zvm" 1493 1485 USE_ELF="yes" 1494 1486 output="rockbox.zvm" ··· 1512 1504 arm926ejscc 1513 1505 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1514 1506 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1515 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1516 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1517 1507 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff" 1518 1508 USE_ELF="yes" 1519 1509 output="rockbox.zvm60" ··· 1537 1527 arm926ejscc 1538 1528 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1539 1529 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1540 - bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" 1541 - bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0" 1542 1530 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff" 1543 1531 USE_ELF="yes" 1544 1532 output="rockbox.zv" ··· 2074 2062 debug="-DDEBUG" 2075 2063 simulator="yes" 2076 2064 extradefines="-DSIMULATOR" 2065 + archosrom="" 2066 + flash="" 2077 2067 echo "Simulator build selected" 2078 2068 ;; 2079 2069 [Aa]) ··· 2397 2387 <<EOF 2398 2388 ## Automatically generated. http://www.rockbox.org/ 2399 2389 2400 - ifndef V 2401 - SILENT=@ 2402 - else 2403 - VERBOSEOPT=-v 2404 - endif 2405 - 2406 - # old 'make' versions don't have the built-in 'info' function 2407 - info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.") 2408 - ifeq (\$(call info),old) 2409 - export info=echo "\$\$(1)"; 2410 - endif 2411 - 2412 2390 export ROOTDIR=@ROOTDIR@ 2413 2391 export FIRMDIR=@FIRMDIR@ 2414 2392 export APPSDIR=@APPSDIR@ ··· 2428 2406 export LANGUAGE=@LANGUAGE@ 2429 2407 export VOICELANGUAGE=@VOICELANGUAGE@ 2430 2408 export MEMORYSIZE=@MEMORY@ 2431 - export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR)) 2432 - export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') 2409 + export VERSION:=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR)) 2410 + export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') 2433 2411 export MKFIRMWARE=@TOOL@ 2434 2412 export BMP2RB_MONO=@BMP2RB_MONO@ 2435 2413 export BMP2RB_NATIVE=@BMP2RB_NATIVE@ ··· 2469 2447 export ENCODER=@ENCODER@ 2470 2448 export USE_ELF=@USE_ELF@ 2471 2449 2472 - # Do not print "Entering directory ..." 2473 - MAKEFLAGS += --no-print-directory 2474 - 2475 - .PHONY: all clean tags zip tools manual bin build info langs 2476 - 2477 - all: info 2478 - 2479 - info: build 2480 - \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt 2481 - 2482 - build: tools @LANGS@ 2483 - @SIMUL1@ 2484 - @SIMUL2@ 2485 - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware 2486 - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ 2487 - 2488 - bin: tools @LANGS@ 2489 - @SIMUL1@ 2490 - @SIMUL2@ 2491 - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware 2492 - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY) 2493 - 2494 - rocks: tools 2495 - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks 2496 - 2497 - veryclean: clean toolsclean 2498 - 2499 - toolsclean: 2500 - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean 2501 - 2502 - clean: 2503 - \$(SILENT)echo Cleaning build directory 2504 - \$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ 2505 - rockbox.tar.bz2 TAGS @APPS@ firmware comsim sim lang.[ch] \ 2506 - manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \ 2507 - @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \ 2508 - html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \ 2509 - voicefontids *.wav *.mp3 *.voice max_language_size.h 2510 - 2511 - tools: 2512 - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@ 2513 - 2514 - voicetools: 2515 - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@ 2516 - 2517 - tags: 2518 - \$(SILENT)rm -f TAGS 2519 - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags 2520 - \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags 2521 - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags 2522 - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags 2523 - 2524 - fontzip: 2525 - \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY) 2526 - 2527 - zip: info 2528 - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\ 2529 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) 2530 - 2531 - mapzip: info 2532 - \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip 2533 - 2534 - fullzip: info 2535 - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ 2536 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY) 2537 - 2538 - 7zip: info 2539 - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ 2540 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) 2541 - 2542 - tar: info 2543 - \$(SILENT)rm -f rockbox.tar 2544 - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ 2545 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) 2546 - 2547 - bzip2: tar 2548 - \$(SILENT)bzip2 -f9 rockbox.tar 2549 - 2550 - gzip: tar 2551 - \$(SILENT)gzip -f9 rockbox.tar 2552 - 2553 - langs: features 2554 - \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang 2555 - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang 2556 - 2557 - manual: manual-pdf 2558 - manual-pdf: 2559 - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf 2560 - manual-html: 2561 - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html 2562 - manual-zhtml: manual-zip 2563 - manual-txt: 2564 - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt 2565 - manual-ztxt: 2566 - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip 2567 - manual-zip: 2568 - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip 2569 - 2570 - features: tools 2571 - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features 2572 - 2573 - help: 2574 - @echo "A few helpful make targets" 2575 - @echo "" 2576 - @echo "all - builds a full Rockbox (default), including tools" 2577 - @echo "bin - builds only the Rockbox.<target name> file" 2578 - @echo "rocks - builds only plugins and codecs" 2579 - @echo "clean - cleans a build directory (not tools)" 2580 - @echo "veryclean - cleans the build and tools directories" 2581 - @echo "manual - builds a manual" 2582 - @echo "manual-html - HTML manual" 2583 - @echo "manual-zip - HTML manual (zipped)" 2584 - @echo "manual-txt - txt manual" 2585 - @echo "fullzip - creates a rockbox.zip of your build with fonts" 2586 - @echo "zip - creates a rockbox.zip of your build (no fonts)" 2587 - @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)" 2588 - @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)" 2589 - @echo "7zip - creates a rockbox.7z of your build (no fonts)" 2590 - @echo "fontzip - creates rockbox-fonts.zip" 2591 - @echo "mapzip - creates rockbox-maps.zip with all .map files" 2592 - @echo "tools - builds the tools only" 2593 - @echo "voicetools - builds the voice tools only" 2594 - @echo "install - installs your build (for simulator builds only, no fonts)" 2595 - @echo "fullinstall - installs your build (for simulator builds only, with fonts)" 2450 + include \$(TOOLSDIR)/root.make 2596 2451 2597 2452 EOF 2598 - 2599 - if [ "yes" = "$simulator" ]; then 2600 - 2601 - cat >> Makefile <<EOF 2602 - 2603 - install: 2604 - @echo "installing your build in your archos dir" 2605 - \$(SILENT)for f in \`cat \$(BUILDDIR)/apps/features\`; do feat="\$\$feat:\$\$f" ; done; \\ 2606 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -s -r "\$(ROOTDIR)" -f 0 \$(TARGET) \$(BINARY) 2607 - 2608 - fullinstall: 2609 - @echo "installing a full setup in your archos dir" 2610 - \$(SILENT)for f in \`cat \$(BUILDDIR)/apps/features\`; do feat="\$\$feat:\$\$f" ; done; \\ 2611 - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -s -r "\$(ROOTDIR)" -f 2 \$(TARGET) \$(BINARY) 2612 - EOF 2613 - 2614 - fi 2615 - 2616 - if [ "yes" = "$voice" ]; then 2617 - 2618 - cat >> Makefile <<EOF 2619 - 2620 - voice: voicetools features 2621 - \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\ 2622 - for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(MODELNAME)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\ 2623 - EOF 2624 - 2625 - fi 2626 2453 2627 2454 echo "Created Makefile"
+68
tools/functions.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + # preprocess - run preprocessor on a file and return the result as a string 11 + # 12 + # This uses the native 'gcc' compiler and not $(CC) since we use the -imacros 13 + # option and older gcc compiler doesn't have that. We use one such older 14 + # compiler for the win32 cross-compiles on Linux. 15 + # 16 + # The weird grep -v thing in here is due to Apple's stupidities and is needed 17 + # to make this do right when used on Mac OS X. 18 + # 19 + # The sed line is to prepend the directory to all source files 20 + 21 + preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | \ 22 + grep -v '^\#' | \ 23 + sed -e 's:^.\+:$(dir $(1))&:') 24 + 25 + preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \ 26 + grep -v '^\#' | grep -v "^$$" > $(2)) 27 + 28 + c2obj = $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR),$(BUILDDIR),$(1)))) 29 + 30 + # calculate dependencies for a list of source files $(2) and output them 31 + # to a file $(1) 32 + 33 + mkdepfile = $(shell \ 34 + for each in $(2); do \ 35 + obj=`echo $$each | sed -e 's/\.[cS]/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ 36 + $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h -MT "$$obj" $$each 2>/dev/null; \ 37 + done | sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ 38 + -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ 39 + -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ 40 + -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ 41 + -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ 42 + -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ 43 + -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ 44 + > $(1); ) 45 + 46 + # function to create .bmp dependencies 47 + bmpdepfile = $(shell \ 48 + for each in $(2); do \ 49 + obj=`echo $$each | sed -e 's/\.bmp/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ 50 + src=`echo $$each | sed -e 's/\.bmp/.c/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ 51 + echo $$obj: $$src; \ 52 + echo $$src: $$each; \ 53 + done \ 54 + >> $(1); ) 55 + 56 + ifndef V 57 + SILENT:=@ 58 + else 59 + VERBOSEOPT:=-v 60 + endif 61 + PRINTS=$(SILENT)$(call info,$(1)) 62 + 63 + # old 'make' versions don't have the built-in 'info' function 64 + info=old$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.") 65 + ifeq ($(call info),old) 66 + export info=echo "$$(1)"; 67 + endif 68 +
-33
tools/makebmp.inc
··· 1 - all: $(OUTPUT) 2 - 3 - dep: $(DEPFILE) 4 - 5 - ifndef V 6 - SILENT=@ 7 - endif 8 - PRINTS=$(SILENT)$(call info,$(1)) 9 - 10 - $(OBJDIR)/%.c: %.bmp 11 - $(SILENT)mkdir -p $(dir $@) 12 - $(SILENT)mkdir -p $(BMPINCDIR) 13 - $(call PRINTS,BMP2RB $<)$(BMP2RB) -h $(BMPINCDIR) $< > $@ 14 - 15 - $(OBJDIR)/%.o: $(OBJDIR)/%.c 16 - $(SILENT)mkdir -p $(dir $@) 17 - $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -c $< -o $@ 18 - 19 - $(DEPFILE): SOURCES 20 - $(SILENT)mkdir -p $(dir $(DEPFILE)) 21 - $(SILENT)rm -f $(DEPFILE) 22 - $(SILENT)(for each in $(SOURCES) x; do \ 23 - if test "x" != "$$each"; then \ 24 - src=`echo $$each | sed -e 's/\.bmp/.c/'`; \ 25 - echo $(OBJDIR)/$$src: $$each >> $(DEPFILE) ; \ 26 - obj=`echo $$each | sed -e 's/\.bmp/.o/'`; \ 27 - echo $(OBJDIR)/$$obj: $(OBJDIR)/$$src >> $(DEPFILE) ; \ 28 - fi; \ 29 - done) 30 - 31 - $(OUTPUT): $(OBJS) 32 - $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 33 - $(SILENT)$(RANLIB) $@
-14
tools/makesubdirs.inc
··· 1 - # -*- Makefile -*- 2 - 3 - # return the list of extra sub-directories to build in the SUBDIRS variable 4 - 5 - # This uses the native 'gcc' compiler and not $(CC) since we use the -include 6 - # option and older gcc compiler doesn't have that. We use one such older 7 - # compiler for the win32 cross-compiles on Linux. 8 - # 9 - # The weird grep -v thing in here is due to Apple's stupidities and is needed 10 - # to make this do right when used on Mac OS X. 11 - 12 - SUBDIRS := $(shell cat SUBDIRS | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ 13 - $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - | \ 14 - grep -v "^\#")
+294
tools/root.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + include $(TOOLSDIR)/functions.make 11 + 12 + DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \ 13 + -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \ 14 + -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \ 15 + $(EXTRA_DEFINES) # <-- -DSIMULATOR or not 16 + INCLUDES = -I$(BUILDDIR) $(TARGET_INC) 17 + 18 + CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS) 19 + PPCFLAGS = $(filter-out -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix 20 + 21 + TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \ 22 + $(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \ 23 + $(TOOLSDIR)/uclpack $(TOOLSDIR)/mktccboot $(TOOLSDIR)/mkboot 24 + 25 + # list suffixes to be understood by $* 26 + .SUFFIXES: .rock .codec .map .elf .c .S .o .bmp .a 27 + 28 + .PHONY: all clean tags zip tools manual bin build info langs 29 + 30 + DEPFILE = $(BUILDDIR)/make.dep 31 + 32 + all: $(DEPFILE) build 33 + 34 + # Subdir makefiles. their primary purpose is to populate SRC & OTHER_SRC 35 + # but they also define special dependencies and compile rules 36 + include $(TOOLSDIR)/tools.make 37 + include $(FIRMDIR)/firmware.make 38 + include $(ROOTDIR)/apps/bitmaps/bitmaps.make 39 + 40 + ifneq (,$(findstring bootloader,$(APPSDIR))) 41 + include $(APPSDIR)/bootloader.make 42 + else ifneq (,$(findstring bootbox,$(APPSDIR))) 43 + include $(APPSDIR)/bootbox.make 44 + else 45 + include $(APPSDIR)/apps.make 46 + include $(APPSDIR)/lang/lang.make 47 + 48 + ifdef SOFTWARECODECS 49 + include $(APPSDIR)/codecs/codecs.make 50 + endif 51 + 52 + ifdef ENABLEDPLUGINS 53 + include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make 54 + include $(APPSDIR)/plugins/plugins.make 55 + endif 56 + 57 + ifdef SIMVER 58 + include $(ROOTDIR)/uisimulator/uisimulator.make 59 + endif 60 + endif # bootloader 61 + 62 + OBJ := $(SRC:.c=.o) 63 + OBJ := $(OBJ:.S=.o) 64 + OBJ += $(BMP:.bmp=.o) 65 + OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(OBJ)) 66 + 67 + build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(ARCHOSROM) 68 + $(SILENT)$(TOOLSDIR)/mkinfo.pl $(BUILDDIR)/rockbox-info.txt 69 + 70 + ifneq (clean,$(findstring clean,$(MAKECMDGOALS))) # don't build deps before cleaning 71 + $(DEPFILE) dep: 72 + $(call PRINTS,Generating dependencies) 73 + @echo foo > /dev/null # there must be a "real" command in the rule 74 + $(call mkdepfile,$(DEPFILE),$(SRC) $(OTHER_SRC)) 75 + $(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP)) 76 + endif 77 + 78 + bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY) 79 + rocks: $(DEPFILE) $(TOOLS) $(ROCKS) 80 + codecs: $(DEPFILE) $(TOOLS) $(CODECS) 81 + 82 + -include $(DEPFILE) 83 + 84 + veryclean: clean 85 + $(SILENT)rm -rf $(TOOLS) 86 + 87 + clean: 88 + $(SILENT)echo Cleaning build directory 89 + $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] manual *.pdf *.a credits.raw rockbox.ipod bitmaps pluginbitmaps UI256.bmp rockbox-full.zip html txt rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids *.wav *.mp3 *.voice max_language_size.h $(CLEANOBJS) $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin $(DEPFILE) rombox.elf rombox.map rombox.bin $(BINARY) $(FLASHFILE) uisimulator bootloader flash 90 + 91 + #### linking the binaries: #### 92 + 93 + .SECONDEXPANSION: 94 + 95 + ifndef SIMVER 96 + 97 + ifeq (,$(findstring bootloader,$(APPSDIR))) 98 + # not bootloader 99 + 100 + ## target build 101 + RAMLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds 102 + LINKRAM := $(BUILDDIR)/ram.link 103 + ROMLDS := $(FIRMDIR)/rom.lds 104 + LINKROM := $(BUILDDIR)/rom.link 105 + 106 + $(LINKRAM): $(RAMLDS) 107 + $(call PRINTS,PP $(@F)) 108 + $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) 109 + 110 + $(LINKROM): $(ROMLDS) 111 + $(call PRINTS,PP $(@F)) 112 + $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) 113 + 114 + $(BUILDDIR)/rockbox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(LINKRAM) 115 + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJ) \ 116 + -L$(BUILDDIR)/firmware -lfirmware\ 117 + -L$(BUILDDIR)/apps/codecs $(VOICESPEEXLIB:lib%.a=-l%) \ 118 + -lgcc \ 119 + -T$(LINKRAM) -Wl,-Map,$(BUILDDIR)/rockbox.map 120 + 121 + $(BUILDDIR)/rombox.elf : $$(OBJ) $$(FIRMLIB) $$(VOICESPEEXLIB) $$(LINKROM) 122 + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ 123 + $(VOICESPEEXLIB) $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware \ 124 + -T$(LINKROM) -Wl,-Map,$(BUILDDIR)/rockbox.map 125 + 126 + $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf 127 + $(call PRINTS,OC $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ 128 + 129 + $(BUILDDIR)/rombox.bin : $(BUILDDIR)/rombox.elf 130 + $(call PRINTS,OC $(@F))$(OC) -O binary $< $@ 131 + 132 + # 133 + # If there's a flashfile defined for this target (rockbox.ucl for Archos 134 + # models) Then check if the mkfirmware script fails, as then it is (likely) 135 + # because the image is too big and we need to create a compressed image 136 + # instead. 137 + # 138 + $(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE) 139 + $(call PRINTS,SCRAMBLE $(notdir $@))($(MKFIRMWARE) $< $@; \ 140 + stat=$$?; \ 141 + if test -n "$(FLASHFILE)"; then \ 142 + if test "$$stat" -ne 0; then \ 143 + echo "Image too big, making a compressed version!"; \ 144 + $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ 145 + $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ 146 + fi \ 147 + fi ) 148 + 149 + # archos 150 + $(BUILDDIR)/rockbox.ucl: $(BUILDDIR)/rockbox.bin 151 + $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null 2>&1 152 + 153 + MAXINFILE = $(BUILDDIR)/temp.txt 154 + MAXOUTFILE = $(BUILDDIR)/romstart.txt 155 + 156 + $(BUILDDIR)/rombox.ucl: $(BUILDDIR)/rombox.bin $(MAXOUTFILE) 157 + $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --none $< $@ >/dev/null; \ 158 + perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \ 159 + if test $$? -ne 0; then \ 160 + echo "removing UCL file again, making it a fake one"; \ 161 + echo "fake" > $@; \ 162 + fi 163 + 164 + $(MAXOUTFILE): 165 + $(call PRINTS,Creating $(@F)) 166 + $(SILENT)$(shell echo '#include "config.h"' > $(MAXINFILE)) 167 + $(SILENT)$(shell echo "ROM_START" >> $(MAXINFILE)) 168 + $(call preprocess2file,$(MAXINFILE),$(MAXOUTFILE)) 169 + $(SILENT)rm $(MAXINFILE) 170 + 171 + # iriver 172 + $(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin 173 + $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@ 174 + 175 + endif # !bootloader 176 + endif # !SIMVER 177 + 178 + 179 + voicetools: 180 + $(SILENT)$(MAKE) -C $(TOOLSDIR) CC=$(HOSTCC) AR=$(HOSTAR) rbspeexenc voicefont wavtrim 181 + 182 + tags: 183 + $(SILENT)rm -f TAGS 184 + $(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC)) 185 + 186 + fontzip: 187 + $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)\" -r "$(ROOTDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) 188 + 189 + zip: 190 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ 191 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" $(TARGET) $(BINARY) 192 + 193 + mapzip: 194 + $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip 195 + 196 + fullzip: 197 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 198 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) 199 + 200 + 7zip: 201 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 202 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" $(TARGET) $(BINARY) 203 + 204 + tar: 205 + $(SILENT)rm -f rockbox.tar 206 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 207 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" $(TARGET) $(BINARY) 208 + 209 + bzip2: tar 210 + $(SILENT)bzip2 -f9 rockbox.tar 211 + 212 + gzip: tar 213 + $(SILENT)gzip -f9 rockbox.tar 214 + 215 + manual manual-pdf: 216 + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-pdf 217 + manual-html: 218 + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-html 219 + manual-zhtml: manual-zip 220 + manual-txt: 221 + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt 222 + manual-ztxt: 223 + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt-zip 224 + manual-zip: 225 + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-zip 226 + 227 + ifdef TTS_ENGINE 228 + 229 + voice: voicetools features 230 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ 231 + for lang in `echo $(VOICELANGUAGE) |sed "s/,/ /g"`; do $(TOOLSDIR)/voice.pl -V -l=$$lang -t=$(MODELNAME)$$feat -i=$(TARGET_ID) -e="$(ENCODER)" -E="$(ENC_OPTS)" -s=$(TTS_ENGINE) -S="$(TTS_OPTS)"; done \ 232 + 233 + endif 234 + 235 + ifdef SIMVER 236 + 237 + install: 238 + @echo "Installing your build in your archos dir" 239 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 240 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" -f 0 $(TARGET) $(BINARY) 241 + 242 + fullinstall: 243 + @echo "Installing a full setup in your archos dir" 244 + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 245 + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -s -r "$(ROOTDIR)" -f 2 $(TARGET) $(BINARY) 246 + 247 + endif 248 + 249 + help: 250 + @echo "A few helpful make targets" 251 + @echo "" 252 + @echo "all - builds a full Rockbox (default), including tools" 253 + @echo "bin - builds only the Rockbox.<target name> file" 254 + @echo "rocks - builds only plugins" 255 + @echo "codecs - builds only codecs" 256 + @echo "dep - regenerates make dependency database" 257 + @echo "clean - cleans a build directory (not tools)" 258 + @echo "veryclean - cleans the build and tools directories" 259 + @echo "manual - builds a manual (pdf)" 260 + @echo "manual-html - HTML manual" 261 + @echo "manual-zip - HTML manual (zipped)" 262 + @echo "manual-txt - txt manual" 263 + @echo "fullzip - creates a rockbox.zip of your build with fonts" 264 + @echo "zip - creates a rockbox.zip of your build (no fonts)" 265 + @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)" 266 + @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)" 267 + @echo "7zip - creates a rockbox.7z of your build (no fonts)" 268 + @echo "fontzip - creates rockbox-fonts.zip" 269 + @echo "mapzip - creates rockbox-maps.zip with all .map files" 270 + @echo "tools - builds the tools only" 271 + @echo "voice - creates the voice clips (voice builds only)" 272 + @echo "voicetools - builds the voice tools only" 273 + @echo "install - installs your build (for simulator builds only, no fonts)" 274 + @echo "fullinstall - installs your build (for simulator builds only, with fonts)" 275 + 276 + ### general compile rules: 277 + 278 + # when source and object are in different locations (normal): 279 + $(BUILDDIR)/%.o: $(ROOTDIR)/%.c 280 + $(SILENT)mkdir -p $(dir $@) 281 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ 282 + 283 + $(BUILDDIR)/%.o: $(ROOTDIR)/%.S 284 + $(SILENT)mkdir -p $(dir $@) 285 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ 286 + 287 + # when source and object are both in BUILDDIR (generated code): 288 + %.o: %.c 289 + $(SILENT)mkdir -p $(dir $@) 290 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ 291 + 292 + %.o: %.S 293 + $(SILENT)mkdir -p $(dir $@) 294 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
+40
tools/tools.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + TOOLSCFLAGS := -O -g -W -Wall -Wshadow -pedantic -I$(ROOTDIR)/tools 11 + 12 + $(TOOLSDIR)/scramble: $(TOOLSDIR)/scramble.c $(TOOLSDIR)/iriver.c \ 13 + $(TOOLSDIR)/mi4.c $(TOOLSDIR)/gigabeat.c \ 14 + $(TOOLSDIR)/gigabeats.c $(TOOLSDIR)/telechips.c \ 15 + $(TOOLSDIR)/iaudio_bl_flash.c \ 16 + $(TOOLSDIR)/creative.c $(TOOLSDIR)/hmac-sha1.c 17 + $(TOOLSDIR)/rdf2binary: $(TOOLSDIR)/rdf2binary.c 18 + $(TOOLSDIR)/convbdf: $(TOOLSDIR)/convbdf.c 19 + $(TOOLSDIR)/codepages: $(TOOLSDIR)/codepages.c $(TOOLSDIR)/codepage_tables.c 20 + $(TOOLSDIR)/mkboot: $(TOOLSDIR)/mkboot.c 21 + $(TOOLSDIR)/mktccboot: $(TOOLSDIR)/mktccboot.c $(TOOLSDIR)/telechips.c 22 + $(TOOLSDIR)/wavtrim: $(TOOLSDIR)/wavtrim.c 23 + $(TOOLSDIR)/voicefont: $(TOOLSDIR)/voicefont.c 24 + 25 + $(TOOLSDIR)/iaudio_bl_flash.c $(TOOLSDIR)/iaudio_bl_flash.h: $(TOOLSDIR)/iaudio_bl_flash.bmp $(TOOLSDIR)/bmp2rb 26 + $(call PRINTS,BMP2RB $(@F)) 27 + $(SILENT)$(TOOLSDIR)/bmp2rb -f 7 -h $(TOOLSDIR) $< >$(TOOLSDIR)/iaudio_bl_flash.c 28 + 29 + $(TOOLSDIR)/bmp2rb: $(TOOLSDIR)/bmp2rb.c 30 + $(call PRINTS,CC $(@F)) 31 + $(SILENT)$(HOSTCC) -DAPPLICATION_NAME=\"$@\" $(TOOLSCFLAGS) $+ -o $@ 32 + 33 + $(TOOLSDIR)/uclpack: $(TOOLSDIR)/ucl/uclpack.c $(wildcard $(TOOLSDIR)/ucl/src/*.c) 34 + $(call PRINTS,CC $(@F))$(HOSTCC) $(TOOLSCFLAGS) -I$(TOOLSDIR)/ucl \ 35 + -I$(TOOLSDIR)/ucl/include -o $@ $^ 36 + 37 + # implicit rule for simple tools 38 + $(TOOLSDIR)/%: $(TOOLSDIR)/%.c 39 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$@)) 40 + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) -o $@ $^
+1 -1
uisimulator/sdl/uisdl.h
··· 23 23 #define __UISDL_H__ 24 24 25 25 #include <stdbool.h> 26 - #include "SDL.h" 26 + #include <SDL.h> 27 27 28 28 /* colour definitions are R, G, B */ 29 29
+38
uisimulator/uisimulator.make
··· 1 + # __________ __ ___. 2 + # Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 + # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 + # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 + # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 + # \/ \/ \/ \/ \/ 7 + # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ 8 + # 9 + 10 + INCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \ 11 + 12 + SIMINCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \ 13 + -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR) 14 + 15 + SIMFLAGS += $(SIMINCLUDES) $(DEFINES) -DHAVE_CONFIG_H $(GCCOPTS) 16 + 17 + SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/sdl/SOURCES) 18 + SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/common/SOURCES) 19 + SIMOBJ = $(call c2obj,$(SIMSRC)) 20 + OTHER_SRC += $(SIMSRC) 21 + 22 + SIMLIB = $(BUILDDIR)/uisimulator/libuisimulator.a 23 + UIBMP = $(BUILDDIR)/UI256.bmp 24 + 25 + .SECONDEXPANSION: # $$(OBJ) is not populated until after this 26 + 27 + $(SIMLIB): $$(SIMOBJ) $(UIBMP) 28 + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 29 + 30 + $(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) 31 + $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) 32 + 33 + $(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c 34 + $(SILENT)mkdir -p $(dir $@) 35 + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@ 36 + 37 + $(UIBMP): $(ROOTDIR)/uisimulator/sdl/UI-$(MODELNAME).bmp 38 + $(call PRINTS,CP $(@F))cp $< $@