freemyipod r32 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r31‎ | r32 | r33 >
Date:00:52, 6 August 2010
Author:theseven
Status:new
Tags:
Comment:
Another try at making the Makefile cross-platform compatible
Modified paths:
  • /embios/trunk/Makefile (modified) (history)
  • /embios/trunk/init.c (modified) (history)

Diff [purge]

Index: embios/trunk/init.c
@@ -31,7 +31,7 @@
3232 #include "pmu.h"
3333 #include "usb/usb.h"
3434
35 -static const char welcomestring[] INITCONST_ATTR = "emBIOS v" VERSION "\n\n";
 35+static const char welcomestring[] INITCONST_ATTR = "emBIOS v" VERSION " r" VERSION_SVN "\n\n";
3636
3737 void init() INITCODE_ATTR;
3838 void init()
Index: embios/trunk/Makefile
@@ -45,7 +45,11 @@
4646 $(CC) -c $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
4747 @$(CC) -MM $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
4848 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
 49+ifeq ($(shell uname),WindowsNT)
4950 @sed -e "s/.*://" -e "s/\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 51+else
 52+ @sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 53+endif
5054 @rm -f $$@.dep.tmp
5155
5256 build/$(1)/%.o: %.S build/version.h
@@ -57,7 +61,11 @@
5862 $(CC) -c $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
5963 @$(CC) -MM $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
6064 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
 65+ifeq ($(shell uname),WindowsNT)
6166 @sed -e "s/.*://" -e "s/\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 67+else
 68+ @sed -e "s/.*://" -e "s/\\\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
 69+endif
6270 @rm -f $$@.dep.tmp
6371 endef
6472
@@ -66,7 +74,11 @@
6775 $(foreach target,$(TARGETS),$(eval $(call TARGET_template,$(target))))
6876
6977 build/version.h: version.h .svn/entries build
 78+ifeq ($(shell uname),WindowsNT)
7079 @sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@
 80+else
 81+ @sed -e "s/\\$$REVISION\\$$/$(REVISION)/" -e "s/\\$$REVISIONINT\\$$/$(REVISIONINT)/" < $< > $@
 82+endif
7183
7284 build:
7385 @mkdir build