From 93397068ddea82142d9ea04efbd4f5248cfb8ede Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 26 Sep 2011 21:25:21 +0800 Subject: [PATCH] Kernel - Fixes to build info file --- Kernel/Makefile | 7 ++++--- Kernel/include/acess.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) 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)) /** -- 2.20.1