summaryrefslogtreecommitdiff
path: root/tools/root.make
diff options
context:
space:
mode:
Diffstat (limited to 'tools/root.make')
-rw-r--r--tools/root.make44
1 files changed, 5 insertions, 39 deletions
diff --git a/tools/root.make b/tools/root.make
index 412dbbc97b..b588e0f8b1 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -14,7 +14,7 @@ DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) $(TARGET) \
14 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not 14 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not
15INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) 15INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
16 16
17CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS) 17CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
18PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix 18PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
19ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files 19ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files
20CORE_LDOPTS = $(GLOBAL_LDOPTS) # linker ops specifically for core build 20CORE_LDOPTS = $(GLOBAL_LDOPTS) # linker ops specifically for core build
@@ -24,9 +24,6 @@ TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
24 $(TOOLSDIR)/uclpack $(TOOLSDIR)/mkboot $(TOOLSDIR)/iaudio_bl_flash.c \ 24 $(TOOLSDIR)/uclpack $(TOOLSDIR)/mkboot $(TOOLSDIR)/iaudio_bl_flash.c \
25 $(TOOLSDIR)/iaudio_bl_flash.h 25 $(TOOLSDIR)/iaudio_bl_flash.h
26 26
27ifeq ($(MODELNAME),archosplayer)
28 TOOLS += $(TOOLSDIR)/player_unifont
29endif
30 27
31ifeq (,$(PREFIX)) 28ifeq (,$(PREFIX))
32ifdef APP_TYPE 29ifdef APP_TYPE
@@ -110,8 +107,6 @@ ifneq (,$(findstring bootloader,$(APPSDIR)))
110 else 107 else
111 include $(APPSDIR)/bootloader.make 108 include $(APPSDIR)/bootloader.make
112 endif 109 endif
113else ifneq (,$(findstring bootbox,$(APPSDIR)))
114 include $(APPSDIR)/bootbox.make
115else ifneq (,$(findstring checkwps,$(APP_TYPE))) 110else ifneq (,$(findstring checkwps,$(APP_TYPE)))
116 include $(APPSDIR)/checkwps.make 111 include $(APPSDIR)/checkwps.make
117 include $(ROOTDIR)/lib/skin_parser/skin_parser.make 112 include $(ROOTDIR)/lib/skin_parser/skin_parser.make
@@ -182,7 +177,7 @@ OBJ := $(OBJ:.S=.o)
182OBJ += $(BMP:.bmp=.o) 177OBJ += $(BMP:.bmp=.o)
183OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(OBJ)) 178OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(OBJ))
184 179
185build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(ARCHOSROM) $(RBINFO) 180build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(RBINFO)
186 181
187$(RBINFO): $(BUILDDIR)/$(BINARY) 182$(RBINFO): $(BUILDDIR)/$(BINARY)
188 $(SILENT)echo Creating $(@F) 183 $(SILENT)echo Creating $(@F)
@@ -215,7 +210,7 @@ clean::
215 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \ 210 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \
216 *.wav *.mp3 *.voice $(CLEANOBJS) \ 211 *.wav *.mp3 *.voice $(CLEANOBJS) \
217 $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \ 212 $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \
218 make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \ 213 make.dep rombox.elf rombox.map rombox.bin romstart.txt \
219 $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) \ 214 $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) \
220 rockbox.apk lang_enum.h rbversion.h 215 rockbox.apk lang_enum.h rbversion.h
221 216
@@ -273,37 +268,8 @@ $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
273$(BUILDDIR)/rombox.bin : $(BUILDDIR)/rombox.elf 268$(BUILDDIR)/rombox.bin : $(BUILDDIR)/rombox.elf
274 $(call PRINTS,OC $(@F))$(call objcopy,$<,$@) 269 $(call PRINTS,OC $(@F))$(call objcopy,$<,$@)
275 270
276#
277# If there's a flashfile defined for this target (rockbox.ucl for Archos
278# models) Then check if the mkfirmware script fails, as then it is (likely)
279# because the image is too big and we need to create a compressed image
280# instead.
281#
282$(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE) 271$(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE)
283 $(call PRINTS,SCRAMBLE $(notdir $@))($(MKFIRMWARE) $< $@; \ 272 $(call PRINTS,SCRAMBLE $(notdir $@)) $(MKFIRMWARE) $< $@
284 stat=$$?; \
285 if test -n "$(FLASHFILE)"; then \
286 if test "$$stat" -ne 0; then \
287 echo "Image too big, making a compressed version!"; \
288 $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \
289 $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \
290 fi \
291 fi )
292
293# archos
294$(BUILDDIR)/rockbox.ucl: $(BUILDDIR)/rockbox.bin
295 $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null
296
297MAXINFILE = $(BUILDDIR)/temp.txt
298MAXOUTFILE = $(BUILDDIR)/romstart.txt
299
300$(BUILDDIR)/rombox.ucl: $(BUILDDIR)/rombox.bin $(MAXOUTFILE)
301 $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --none $< $@ >/dev/null; \
302 perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \
303 if test $$? -ne 0; then \
304 echo "removing UCL file again, making it a fake one"; \
305 echo "fake" > $@; \
306 fi
307 273
308$(MAXOUTFILE): 274$(MAXOUTFILE):
309 $(call PRINTS,Creating $(@F)) 275 $(call PRINTS,Creating $(@F))
@@ -343,7 +309,7 @@ endif
343mapzip: 309mapzip:
344 $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip 310 $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
345 311
346elfzip: 312elfzip:
347 $(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip 313 $(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip
348 314
349fullzip: 315fullzip: