Blame | Last modification | View Log | RSS feed
NAME := installer-nano2gEMBIOSDIR ?= ../../embios/trunk/ILOADERDIR ?= ../iloader/UNINSTDIR ?= ../uninstaller-nano2g/TOOLSDIR ?= ../../tools/BITMAPS = build/backdrop.ucl build/welcome.ucl build/repartition.ucl build/installing.ucl build/badpartition.ucl \build/cancelled.ucl build/repartitioning.ucl build/preparing.ucl build/installfiles.ucl build/flashing.uclFLASHFILES = flashfiles/uninstaller-nano2g.embiosapp.ucl flashfiles/iloader.cfg.ucl flashfiles/iloader.embiosapp.ucl \flashfiles/embiosldr-ipodnano2g.dfu flashfiles/embios-ipodnano2g.uclCROSS ?= arm-none-eabi-CC := $(CROSS)gccAS := $(CROSS)asLD := $(CROSS)ldOBJCOPY := $(CROSS)objcopyUCLPACK := ucl2e10singleblkGENINSTALLER := python tools/geninstaller.pySTUBEMBED := python tools/stubembed.pyCOMPILECONFIG := python $(ILOADERDIR)/tools/compileconfig.pyEMBIOSBOOTCFG := python $(EMBIOSDIR)/tools/embiosbootcfg.pyEMBIOSEMBEDAPP := python $(EMBIOSDIR)/tools/embiosembedapp.pyCRYPTFW := python $(TOOLSDIR)/ipodcrypt.py nano2g-cryptfwSCRAMBLE := python $(TOOLSDIR)/scramble.pyCFLAGS += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940tLDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --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))&:")REVISION := $(shell svnversion .)REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//")HELPERS := build/__embios_armhelpers.oLIBS := build/libucl.aSRC := $(call preprocesspaths,SOURCES,-I. -I..)OBJ := $(SRC:%.c=build/%.o)OBJ := $(OBJ:%.S=build/%.o) $(HELPERS)all: $(NAME)-include $(OBJ:%=%.dep)$(NAME): build/$(NAME).ipodxbuild/$(NAME).ipodx: build/$(NAME).fw@echo [SCRAMB] $<@$(SCRAMBLE) $< $@ --signature=nn2x --targetid=62build/$(NAME).fw: build/$(NAME).bin@echo [CFW] $<@$(CRYPTFW) $< $@build/$(NAME).bin: build/bootstub.bin build/$(NAME).integrated.bin@echo [STUBEM] $@@$(STUBEMBED) $^ $@build/$(NAME).integrated.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin build/$(NAME).embiosapp@echo [EMBAPP] $@@$(EMBIOSEMBEDAPP) $^ $@ --run-from=08000000build/$(NAME).embiosapp: build/$(NAME).plain.embiosapp $(BITMAPS)@echo [GENINS] $<@$(GENINSTALLER) $< $@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/%.ucl: oobe/%.bmp@echo [UCL] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(UCLPACK) $< $@build/$(NAME).plain.embiosapp: build/$(NAME).elf@echo [OC] $<@$(OBJCOPY) -O binary $^ $@build/$(NAME).elf: ls.x $(OBJ) $(LIBS)@echo [LD] $@@$(LD) $(LDFLAGS) -o $@ -T ls.x $(OBJ) $(LIBS)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/__embios_%.o: $(EMBIOSDIR)/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/libucl.a: libucllibucl:@make -C libucl CFLAGS="$(CFLAGS) -I../$(EMBIOSDIR)/export"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)flashfiles/uninstaller-nano2g.embiosapp.ucl: $(UNINSTDIR)/build/uninstaller-nano2g.embiosapp.ucl uninstaller-nano2g@echo [CP] $@@cp $< $@flashfiles/iloader.cfg: flashfiles/iloader.conf@echo [COMCFG] $@@$(COMPILECONFIG) $< $@flashfiles/iloader.cfg.ucl: flashfiles/iloader.cfg@echo [UCL] $<@$(UCLPACK) $< $@flashfiles/iloader.embiosapp.ucl: $(ILOADERDIR)/build/iloader.embiosapp.ucl iloader@echo [CP] $@@cp $< $@flashfiles/embiosldr-ipodnano2g.dfu: $(EMBIOSDIR)/loader/ipodnano2g/build/embiosldr-ipodnano2g.dfu embiosldr-ipodnano2g@echo [CP] $@@cp $< $@flashfiles/embios-ipodnano2g.ucl: flashfiles/embios-ipodnano2g.bin@echo [UCL] $<@$(UCLPACK) $< $@flashfiles/embios-ipodnano2g.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin embios@echo [EMBCFG] $@@$(EMBIOSBOOTCFG) $< $@ --file=/iLoader/boot.embiosapp --file-compressed --file-run-from=08000000 \--flash="iloader " --flash-compressed --flash-run-from=09e00000embios:@make -C $(EMBIOSDIR)embiosldr-ipodnano2g:@make -C $(EMBIOSDIR)/loader/ipodnano2giloader:@make -C $(ILOADERDIR)uninstaller-nano2g:@make -C $(UNINSTDIR)clean:@rm -rf build.PHONY: all clean uninstaller-nano2g iloader embios embiosldr-ipodnano2g libucl flashfiles $(NAME)