From: John Hodge Date: Mon, 26 Sep 2011 13:25:21 +0000 (+0800) Subject: Kernel - Fixes to build info file X-Git-Tag: rel0.11~51 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=93397068ddea82142d9ea04efbd4f5248cfb8ede;p=tpg%2Facess2.git Kernel - Fixes to build info file --- diff --git a/Kernel/Makefile b/Kernel/Makefile index 14bae507..9d92cbfd 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -112,11 +112,12 @@ include/syscalls.h include/syscalls.inc.asm: syscalls.lst Makefile GenSyscalls.p Makefile: ../Makefile.cfg arch/$(ARCHDIR)/Makefile -.PHONY: $(BUILDINFO_SRC) -$(BUILDINFO_SRC): - @echo "const char * const gsGitHash = \""`git log -n 1 | head -n 1 | awk '{print $$1}'`"\";" > $@ +$(BUILDINFO_SRC): $(filter-out $(BUILDINFO_OBJ), $(OBJ)) $(MODS) arch/$(ARCHDIR)/link.ld Makefile + @echo "#include " > $@ + @echo "const char gsGitHash[] = \""`git log -n 1 | head -n 1 | awk '{print $$2}'`"\";" >> $@ @echo "const int giBuildNumber = $(BUILD_NUM);" >> $@ $(BUILDINFO_OBJ): $(BUILDINFO_SRC) + @echo --- CC -o $@ @$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< # Dependency Files diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index d1e0b155..46bd6fa5 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -35,7 +35,8 @@ typedef struct sShortSpinlock tShortSpinlock; #define EXPAND_STR(x) STR(x) extern char __buildnum[]; -#define BUILD_NUM ((int)&__buildnum) +#define BUILD_NUM ((int)(Uint)&__buildnum) +extern const char gsGitHash[]; #define VER2(major,minor) ((((major)&0xFF)<<8)|((minor)&0xFF)) /**