Rev 843 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
NAME := installer-ipodclassicSTACKSIZE := 4096COMPRESS := falseAUTOBUILD_FLASHFILES ?= trueAUTOBUILD_FSFILES ?= trueEMCOREDIR ?= ../../emcore/trunk/BOOTMENUDIR ?= ../bootmenu-ipodclassic/BOOTMENUTHEMEDIR ?= ../bootmenu-ipodclassic-wintertheme/LIBBOOTDIR ?= ../../libs/boot/LIBPNGDIR ?= ../../libs/png/LIBUIDIR ?= ../../libs/ui/LIBMKFAT32DIR ?= ../../libs/mkfat32/UMSBOOTDIR ?= ../../umsboot/TOOLSDIR ?= ../../tools/FLASHFILES = flashfiles/boot.emcorelib flashfiles/png.emcorelib flashfiles/ui.emcorelib flashfiles/mkfat32.emcorelib \flashfiles/bootmenu-ipodclassic.emcoreapp flashfiles/emcoreldr-ipodclassic.bin \flashfiles/emcore-ipodclassic.ucl flashfiles/umsboot-ipodclassic.ucl flashfiles/rockbox.ipod.uclFSFILES = fsfiles/.apps/bootmenu/theme.emcoreappifeq ($(shell uname),WindowsNT)CCACHE :=elseCCACHE := $(shell which ccache)endifCROSS ?= arm-elf-eabi-CC := $(CCACHE) $(CROSS)gccAS := $(CROSS)asLD := $(CROSS)ldOBJCOPY := $(CROSS)objcopyELF2ECA := $(CROSS)elf2emcoreappUCLPACK := ucl2e10singleblkSTUBEMBED := python tools/stubembed.pyEMCOREBOOTCFG := python $(EMCOREDIR)/tools/emcorebootcfg.pyEMCOREEMBEDAPP := python $(EMCOREDIR)/tools/emcoreembedapp.pyGENPWN := python $(EMCOREDIR)/tools/ipodcrypt.py s5l8702-genpwnageLIBINCLUDES := -I$(LIBPNGDIR)/export -I$(LIBUIDIR)/export -I$(LIBMKFAT32DIR)/exportCFLAGS += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMCOREDIR)/export $(LIBINCLUDES) -ffunction-sections -fdata-sections -mcpu=arm926ej-s -DARM_ARCH=5 -marmLDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --emit-relocs --gc-sectionspreprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:" | sed -e "s:^\\./::")REVISION := $(shell svnversion .)REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//")HELPERS := build/__emcore_armhelpers.oSRC := $(call preprocesspaths,SOURCES,-I. -I..)OBJ := $(SRC:%.c=build/%.o)OBJ := $(OBJ:%.S=build/%.o) $(HELPERS)all: $(NAME)-include $(OBJ:%=%.dep)$(NAME): build/bootstrap-ipodclassic.dfu build/$(NAME).ubibuild/bootstrap-ipodclassic.dfu: build/bootstrap.bin@echo [GENPWN] $<@$(GENPWN) $< $@build/bootstrap.bin: build/bootstub.bin $(UMSBOOTDIR)/build/ipodclassic/umsboot.bin@echo [STUBEM] $@@$(STUBEMBED) $^ $@build/$(NAME).ubi: $(EMCOREDIR)/build/ipodclassic/emcore.bin build/$(NAME).emcoreapp@echo [EMBAPP] $@@$(EMCOREEMBEDAPP) $^ $@build/bootstub.bin: build/bootstub.elf@echo [OC] $<@$(OBJCOPY) -O binary $^ $@build/bootstub.elf: bootstub/ls.x build/bootstub/bootstub.o@echo [LD] $@@$(LD) $(LDFLAGS) -o $@ -T bootstub/ls.x build/bootstub/bootstub.obuild/$(NAME).emcoreapp: build/$(NAME).elf@echo [EMCAPP] $<ifeq ($(COMPRESS),true)@$(ELF2ECA) -z -s $(STACKSIZE) -o $@ $^else@$(ELF2ECA) -s $(STACKSIZE) -o $@ $^endififeq ($(AUTOBUILD_FLASHFILES),true)build/resources.o: $(FLASHFILES)elsebuild/resources.o: flashfiles.builtendififeq ($(AUTOBUILD_FSFILES),true)build/resources.o: $(FSFILES)elsebuild/resources.o: fsfiles.builtendifbuild/$(NAME).elf: ls.x $(OBJ)@echo [LD] $@@$(LD) $(LDFLAGS) -o $@ -T ls.x $(OBJ)build/%.o: %.c build/version.h@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.depifeq ($(shell uname),WindowsNT)@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.depelse@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dependif@rm -f $@.dep.tmpbuild/%.o: %.S build/version.h@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.depifeq ($(shell uname),WindowsNT)@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.depelse@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dependif@rm -f $@.dep.tmpbuild/__emcore_%.o: $(EMCOREDIR)/export/%.c@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<build/__emcore_%.o: $(EMCOREDIR)/export/%.S@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<build/version.h: version.h ../../.svn/entries@echo [PP] $<ifeq ($(shell uname),WindowsNT)@-if not exist build md build@sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@else@-mkdir -p build@sed -e 's/\$$REVISION\$$/$(REVISION)/' -e 's/\$$REVISIONINT\$$/$(REVISIONINT)/' < $< > $@endifflashfiles: $(FLASHFILES)@touch flashfiles.built$(LIBBOOTDIR)/build/boot.emcorelib: libboot@$(MAKE) -C $(LIBBOOTDIR)flashfiles/boot.emcorelib: $(LIBBOOTDIR)/build/boot.emcorelib@echo [CP] $@@cp $< $@$(LIBPNGDIR)/build/png.emcorelib: libpng@$(MAKE) -C $(LIBPNGDIR)flashfiles/png.emcorelib: $(LIBPNGDIR)/build/png.emcorelib@echo [CP] $@@cp $< $@$(LIBUIDIR)/build/ui.emcorelib: libui@$(MAKE) -C $(LIBUIDIR)flashfiles/ui.emcorelib: $(LIBUIDIR)/build/ui.emcorelib@echo [CP] $@@cp $< $@$(LIBMKFAT32DIR)/build/mkfat32.emcorelib: libmkfat32@$(MAKE) -C $(LIBMKFAT32DIR)flashfiles/mkfat32.emcorelib: $(LIBMKFAT32DIR)/build/mkfat32.emcorelib@echo [CP] $@@cp $< $@$(UMSBOOTDIR)/build/ipodclassic/umsboot-ipodclassic.ucl $(UMSBOOTDIR)/build/ipodclassic/umsboot.bin: umsboot@$(MAKE) -C $(UMSBOOTDIR) ipodclassicflashfiles/umsboot-ipodclassic.ucl: $(UMSBOOTDIR)/build/ipodclassic/umsboot-ipodclassic.ucl@echo [CP] $@@cp $< $@$(BOOTMENUDIR)/build/bootmenu-ipodclassic.emcoreapp: bootmenu-ipodclassic@$(MAKE) -C $(BOOTMENUDIR)flashfiles/bootmenu-ipodclassic.emcoreapp: $(BOOTMENUDIR)/build/bootmenu-ipodclassic.emcoreapp@echo [CP] $@@cp $< $@$(BOOTMENUTHEMEDIR)/build/bootmenu-ipodclassic.emcoreapp: bootmenu-ipodclassic-theme@$(MAKE) -C $(BOOTMENUTHEMEDIR)fsfiles/.apps/bootmenu/theme.emcoreapp: $(BOOTMENUTHEMEDIR)/build/bootmenu-ipodclassic.emcoreapp@echo [CP] $@ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@cp $< $@$(EMCOREDIR)/loader/ipodclassic/build/emcoreldr-ipodclassic.bin: emcoreldr-ipodclassic@$(MAKE) -C $(EMCOREDIR)/loader/ipodclassicflashfiles/emcoreldr-ipodclassic.bin: $(EMCOREDIR)/loader/ipodclassic/build/emcoreldr-ipodclassic.bin@echo [CP] $@@cp $< $@flashfiles/emcore-ipodclassic.ucl: flashfiles/emcore-ipodclassic.bin@echo [UCL] $<@$(UCLPACK) $< $@$(EMCOREDIR)/build/ipodclassic/emcore.bin: emcore@$(MAKE) -C $(EMCOREDIR) ipodclassicflashfiles/emcore-ipodclassic.bin: $(EMCOREDIR)/build/ipodclassic/emcore.bin@echo [EMBCFG] $@@$(EMCOREBOOTCFG) $< $@ "(3, '/.boot/init.emcoreapp', None, (2, 'bootmenu', None, None))"clean:@rm -rf build.PHONY: all clean emcore emcoreldr-ipodclassic bootmenu-ipodclassic bootmenu-ipodclassic-theme libboot libpng libui libmkfat32 umsboot libucl flashfiles $(NAME)