Subversion Repositories freemyipod

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 4
Line 39... Line 39...
39
endif
39
endif
40
	$(CC) -c $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) -o $$@ $$<
40
	$(CC) -c $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) -o $$@ $$<
41
	@$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
41
	@$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
42
	@mv -f $$@.dep $$@.dep.tmp
42
	@mv -f $$@.dep $$@.dep.tmp
43
	@sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
43
	@sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
-
 
44
	@# Those many backslashes are necessary as make escapes them itself, then the shell
-
 
45
	@# So make makes 4 out of 8, then the shell makes 2 out of 4 which is what we want
44
	@sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
46
	@sed -e "s/.*://" -e "s/\\\\\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
45
	@rm -f $$@.dep.tmp
47
	@rm -f $$@.dep.tmp
46
 
48
 
47
build/$(1)/%.o: %.S
49
build/$(1)/%.o: %.S
48
ifeq ($(shell uname),WindowsNT)
50
ifeq ($(shell uname),WindowsNT)
49
	@-if not exist $$(subst /,\,$$(dir $$@)) md $$(subst /,\,$$(dir $$@))
51
	@-if not exist $$(subst /,\,$$(dir $$@)) md $$(subst /,\,$$(dir $$@))
Line 52... Line 54...
52
endif
54
endif
53
	$(CC) -c $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) -o $$@ $$<
55
	$(CC) -c $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) -o $$@ $$<
54
	@$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
56
	@$(CC) -MM $(CFLAGS) -Itarget/$(1) -D TARGET=$(1) $$< > $$@.dep
55
	@mv -f $$@.dep $$@.dep.tmp
57
	@mv -f $$@.dep $$@.dep.tmp
56
	@sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
58
	@sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
-
 
59
	@# Those many backslashes are necessary as make escapes them itself, then the shell
-
 
60
	@# So make makes 4 out of 8, then the shell makes 2 out of 4 which is what we want
57
	@sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
61
	@sed -e "s/.*://" -e "s/\\\\\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
58
	@rm -f $$@.dep.tmp
62
	@rm -f $$@.dep.tmp
59
endef
63
endef
60
 
64
 
61
all: $(TARGETS)
65
all: $(TARGETS)
62
 
66