freemyipod r705 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r704‎ | r705 | r706 >
Date:17:52, 24 April 2011
Author:theseven
Status:new
Tags:
Comment:
Installer Makefiles: Rebuild flashfiles correctly
Modified paths:
  • /apps/installer-ipodclassic/Makefile (modified) (history)
  • /apps/installer-ipodnano2g/Makefile (modified) (history)

Diff [purge]

Index: apps/installer-ipodclassic/Makefile
@@ -1,6 +1,7 @@
22 NAME := installer-ipodclassic
33 STACKSIZE := 4096
44 COMPRESS := false
 5+AUTOBUILD_FLASHFILES ?= true
56
67 EMCOREDIR ?= ../../emcore/trunk/
78 BOOTMENUDIR ?= ../bootmenu-ipodclassic/
@@ -84,10 +85,10 @@
8586 @$(ELF2ECA) -s $(STACKSIZE) -o $@ $^
8687 endif
8788
 89+ifeq ($(AUTOBUILD_FLASHFILES),true)
 90+build/resources.o: $(FLASHFILES)
 91+else
8892 build/resources.o: flashfiles.built
89 -
90 -ifeq ($(AUTOBUILD_FLASHFILES),true)
91 -flashfiles.built: flashfiles
9293 endif
9394
9495 build/$(NAME).elf: ls.x $(OBJ)
@@ -160,38 +161,44 @@
161162 @touch flashfiles.built
162163
163164 $(LIBBOOTDIR)/build/boot.emcorelib: libboot
 165+ @$(MAKE) -C $(LIBBOOTDIR)
164166
165 -flashfiles/boot.emcorelib: $(LIBBOOTDIR)/build/boot.emcorelib libboot
 167+flashfiles/boot.emcorelib: $(LIBBOOTDIR)/build/boot.emcorelib
166168 @echo [CP] $@
167169 @cp $< $@
168170
169171 $(LIBPNGDIR)/build/png.emcorelib: libpng
 172+ @$(MAKE) -C $(LIBPNGDIR)
170173
171 -flashfiles/png.emcorelib: $(LIBPNGDIR)/build/png.emcorelib libpng
 174+flashfiles/png.emcorelib: $(LIBPNGDIR)/build/png.emcorelib
172175 @echo [CP] $@
173176 @cp $< $@
174177
175178 $(LIBUIDIR)/build/ui.emcorelib: libui
 179+ @$(MAKE) -C $(LIBUIDIR)
176180
177 -flashfiles/ui.emcorelib: $(LIBUIDIR)/build/ui.emcorelib libui
 181+flashfiles/ui.emcorelib: $(LIBUIDIR)/build/ui.emcorelib
178182 @echo [CP] $@
179183 @cp $< $@
180184
181185 $(LIBMKFAT32DIR)/build/mkfat32.emcorelib: libmkfat32
 186+ @$(MAKE) -C $(LIBMKFAT32DIR)
182187
183 -flashfiles/mkfat32.emcorelib: $(LIBMKFAT32DIR)/build/mkfat32.emcorelib libmkfat32
 188+flashfiles/mkfat32.emcorelib: $(LIBMKFAT32DIR)/build/mkfat32.emcorelib
184189 @echo [CP] $@
185190 @cp $< $@
186191
187 -$(UMSBOOTDIR)/build/ipodclassic/umsboot-ipodclassic.ucl: umsboot
 192+$(UMSBOOTDIR)/build/ipodclassic/umsboot.ucl: umsboot
 193+ @$(MAKE) -C $(UMSBOOTDIR) ipodclassic
188194
189 -flashfiles/umsboot-ipodclassic.ucl: $(UMSBOOTDIR)/build/ipodclassic/umsboot-ipodclassic.ucl umsboot
 195+flashfiles/umsboot-ipodclassic.ucl: $(UMSBOOTDIR)/build/ipodclassic/umsboot-ipodclassic.ucl
190196 @echo [CP] $@
191197 @cp $< $@
192198
193199 $(BOOTMENUDIR)/build/bootmenu-ipodclassic.emcoreapp: bootmenu-ipodclassic
 200+ @$(MAKE) -C $(BOOTMENUDIR)
194201
195 -flashfiles/bootmenu-ipodclassic.emcoreapp: $(BOOTMENUDIR)/build/bootmenu-ipodclassic.emcoreapp bootmenu-ipodclassic
 202+flashfiles/bootmenu-ipodclassic.emcoreapp: $(BOOTMENUDIR)/build/bootmenu-ipodclassic.emcoreapp
196203 @echo [CP] $@
197204 @cp $< $@
198205
@@ -208,8 +215,9 @@
209216 @cp $< $@
210217
211218 $(EMCOREDIR)/loader/ipodclassic/build/emcoreldr-ipodclassic.bin: emcoreldr-ipodclassic
 219+ @$(MAKE) -C $(EMCOREDIR)/loader/ipodclassic
212220
213 -flashfiles/emcoreldr-ipodclassic.bin: $(EMCOREDIR)/loader/ipodclassic/build/emcoreldr-ipodclassic.bin emcoreldr-ipodclassic
 221+flashfiles/emcoreldr-ipodclassic.bin: $(EMCOREDIR)/loader/ipodclassic/build/emcoreldr-ipodclassic.bin
214222 @echo [CP] $@
215223 @cp $< $@
216224
@@ -218,37 +226,12 @@
219227 @$(UCLPACK) $< $@
220228
221229 $(EMCOREDIR)/build/ipodclassic/emcore.bin: emcore
 230+ @$(MAKE) -C $(EMCOREDIR) ipodclassic
222231
223 -flashfiles/emcore-ipodclassic.bin: $(EMCOREDIR)/build/ipodclassic/emcore.bin emcore
 232+flashfiles/emcore-ipodclassic.bin: $(EMCOREDIR)/build/ipodclassic/emcore.bin
224233 @echo [EMBCFG] $@
225234 @$(EMCOREBOOTCFG) $< $@ "(3, '/.boot/init.emcoreapp', None, (2, 'bootmenu', None, None))"
226235
227 -emcore:
228 - @$(MAKE) -C $(EMCOREDIR) ipodclassic
229 -
230 -emcoreldr-ipodclassic:
231 - @$(MAKE) -C $(EMCOREDIR)/loader/ipodclassic
232 -
233 -bootmenu-ipodclassic:
234 - @$(MAKE) -C $(BOOTMENUDIR)
235 -
236 -libboot:
237 - @$(MAKE) -C $(LIBBOOTDIR)
238 -
239 -libpng:
240 - @$(MAKE) -C $(LIBPNGDIR)
241 -
242 -libui:
243 - @$(MAKE) -C $(LIBUIDIR)
244 -
245 -libmkfat32:
246 - @$(MAKE) -C $(LIBMKFAT32DIR)
247 -
248 -$(UMSBOOTDIR)/build/ipodclassic/umsboot.bin: umsboot
249 -
250 -umsboot:
251 - @$(MAKE) -C $(UMSBOOTDIR) ipodclassic
252 -
253236 clean:
254237 @rm -rf build
255238
Index: apps/installer-ipodnano2g/Makefile
@@ -1,6 +1,7 @@
22 NAME := installer-ipodnano2g
33 STACKSIZE := 4096
44 COMPRESS := false
 5+AUTOBUILD_FLASHFILES ?= true
56 BASENAME ?= $(NAME)
67 FATNAME ?= INSTAL~1BOO
78
@@ -100,10 +101,10 @@
101102 @$(ELF2ECA) -s $(STACKSIZE) -o $@ $^
102103 endif
103104
 105+ifeq ($(AUTOBUILD_FLASHFILES),true)
 106+build/resources.o: $(FLASHFILES)
 107+else
104108 build/resources.o: flashfiles.built
105 -
106 -ifeq ($(AUTOBUILD_FLASHFILES),true)
107 -flashfiles.built: flashfiles
108109 endif
109110
110111 build/$(NAME).elf: ls.x $(OBJ) $(LIBS)
@@ -163,8 +164,6 @@
164165 @$(CC) -c $(CFLAGS) -o $@ $<
165166
166167 build/libucl.a: libucl
167 -
168 -libucl:
169168 @$(MAKE) -C libucl CFLAGS="$(CFLAGS) -I../$(EMCOREDIR)/export"
170169
171170 build/version.h: version.h .svn/entries
@@ -181,44 +180,51 @@
182181 @touch flashfiles.built
183182
184183 $(LIBBOOTDIR)/build/boot.emcorelib: libboot
 184+ @$(MAKE) -C $(LIBBOOTDIR)
185185
186 -flashfiles/boot.emcorelib: $(LIBBOOTDIR)/build/boot.emcorelib libboot
 186+flashfiles/boot.emcorelib: $(LIBBOOTDIR)/build/boot.emcorelib
187187 @echo [CP] $@
188188 @cp $< $@
189189
190190 $(LIBPNGDIR)/build/png.emcorelib: libpng
 191+ @$(MAKE) -C $(LIBPNGDIR)
191192
192 -flashfiles/png.emcorelib: $(LIBPNGDIR)/build/png.emcorelib libpng
 193+flashfiles/png.emcorelib: $(LIBPNGDIR)/build/png.emcorelib
193194 @echo [CP] $@
194195 @cp $< $@
195196
196197 $(LIBUIDIR)/build/ui.emcorelib: libui
 198+ @$(MAKE) -C $(LIBUIDIR)
197199
198 -flashfiles/ui.emcorelib: $(LIBUIDIR)/build/ui.emcorelib libui
 200+flashfiles/ui.emcorelib: $(LIBUIDIR)/build/ui.emcorelib
199201 @echo [CP] $@
200202 @cp $< $@
201203
202204 $(LIBMKFAT32DIR)/build/mkfat32.emcorelib: libmkfat32
 205+ @$(MAKE) -C $(LIBMKFAT32DIR)
203206
204 -flashfiles/mkfat32.emcorelib: $(LIBMKFAT32DIR)/build/mkfat32.emcorelib libmkfat32
 207+flashfiles/mkfat32.emcorelib: $(LIBMKFAT32DIR)/build/mkfat32.emcorelib
205208 @echo [CP] $@
206209 @cp $< $@
207210
208211 $(UMSBOOTDIR)/build/ipodnano2g/umsboot-ipodnano2g.ucl: umsboot
 212+ @$(MAKE) -C $(UMSBOOTDIR) ipodnano2g
209213
210 -flashfiles/umsboot-ipodnano2g.ucl: $(UMSBOOTDIR)/build/ipodnano2g/umsboot-ipodnano2g.ucl umsboot
 214+flashfiles/umsboot-ipodnano2g.ucl: $(UMSBOOTDIR)/build/ipodnano2g/umsboot-ipodnano2g.ucl
211215 @echo [CP] $@
212216 @cp $< $@
213217
214218 $(UNINSTDIR)/build/uninstaller-ipodnano2g.emcoreapp: uninstaller-ipodnano2g
 219+ @$(MAKE) -C $(UNINSTDIR)
215220
216 -flashfiles/uninstaller-ipodnano2g.emcoreapp: $(UNINSTDIR)/build/uninstaller-ipodnano2g.emcoreapp uninstaller-ipodnano2g
 221+flashfiles/uninstaller-ipodnano2g.emcoreapp: $(UNINSTDIR)/build/uninstaller-ipodnano2g.emcoreapp
217222 @echo [CP] $@
218223 @cp $< $@
219224
220225 $(BOOTMENUDIR)/build/bootmenu-ipodnano2g.emcoreapp: bootmenu-ipodnano2g
 226+ @$(MAKE) -C $(BOOTMENUDIR)
221227
222 -flashfiles/bootmenu-ipodnano2g.emcoreapp: $(BOOTMENUDIR)/build/bootmenu-ipodnano2g.emcoreapp bootmenu-ipodnano2g
 228+flashfiles/bootmenu-ipodnano2g.emcoreapp: $(BOOTMENUDIR)/build/bootmenu-ipodnano2g.emcoreapp
223229 @echo [CP] $@
224230 @cp $< $@
225231
@@ -239,8 +245,9 @@
240246 @cp $< $@
241247
242248 $(EMCOREDIR)/loader/ipodnano2g/build/emcoreldr-ipodnano2g.dfu: emcoreldr-ipodnano2g
 249+ @$(MAKE) -C $(EMCOREDIR)/loader/ipodnano2g
243250
244 -flashfiles/emcoreldr-ipodnano2g.dfu: $(EMCOREDIR)/loader/ipodnano2g/build/emcoreldr-ipodnano2g.dfu emcoreldr-ipodnano2g
 251+flashfiles/emcoreldr-ipodnano2g.dfu: $(EMCOREDIR)/loader/ipodnano2g/build/emcoreldr-ipodnano2g.dfu
245252 @echo [CP] $@
246253 @cp $< $@
247254
@@ -249,38 +256,12 @@
250257 @$(UCLPACK) $< $@
251258
252259 $(EMCOREDIR)/build/ipodnano2g/emcore.bin: emcore
 260+ @$(MAKE) -C $(EMCOREDIR) ipodnano2g
253261
254 -flashfiles/emcore-ipodnano2g.bin: $(EMCOREDIR)/build/ipodnano2g/emcore.bin emcore
 262+flashfiles/emcore-ipodnano2g.bin: $(EMCOREDIR)/build/ipodnano2g/emcore.bin
255263 @echo [EMBCFG] $@
256264 @$(EMCOREBOOTCFG) $< $@ "(3, '/.boot/init.emcoreapp', None, (2, 'bootmenu', None, None))"
257265
258 -emcore:
259 - @$(MAKE) -C $(EMCOREDIR) ipodnano2g
260 -
261 -emcoreldr-ipodnano2g:
262 - @$(MAKE) -C $(EMCOREDIR)/loader/ipodnano2g
263 -
264 -uninstaller-ipodnano2g:
265 - @$(MAKE) -C $(UNINSTDIR)
266 -
267 -bootmenu-ipodnano2g:
268 - @$(MAKE) -C $(BOOTMENUDIR)
269 -
270 -libboot:
271 - @$(MAKE) -C $(LIBBOOTDIR)
272 -
273 -libpng:
274 - @$(MAKE) -C $(LIBPNGDIR)
275 -
276 -libui:
277 - @$(MAKE) -C $(LIBUIDIR)
278 -
279 -libmkfat32:
280 - @$(MAKE) -C $(LIBMKFAT32DIR)
281 -
282 -umsboot:
283 - @$(MAKE) -C $(UMSBOOTDIR) ipodnano2g
284 -
285266 clean:
286267 @rm -rf build
287268