From 331dc848912bb4c55d267b770503228f1c048a30 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 29 May 2010 13:54:44 +0800 Subject: [PATCH] Changed build system to not require calc - Also made separate build counts for each arch - changed the OBJDUMP variable to DISASM to allow better interoperability --- Kernel/Makefile | 6 +++--- Kernel/Makefile.BuildNum | 1 - Makefile.cfg | 2 +- Makefile.x86_64.cfg | 1 + Modules/Makefile.tpl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 Kernel/Makefile.BuildNum diff --git a/Kernel/Makefile b/Kernel/Makefile index 5d48945f..b5a6db0a 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -8,7 +8,7 @@ -include arch/$(ARCHDIR)/Makefile --include Makefile.BuildNum +-include Makefile.BuildNum.$(ARCH) KERNEL_VERSION = 0.5 @@ -62,9 +62,9 @@ apidoc: $(BIN): $(OBJ) $(MODS) arch/$(ARCHDIR)/link.ld Makefile @echo --- LD -o $(BIN) @$(LD) $(LDFLAGS) -o $(BIN) $(OBJ) $(MODS) -Map ../Map.$(ARCH).txt - @objdump $(BIN) -D -S > $(BIN).dsm + $(DISASM) $(BIN) > $(BIN).dsm @wc -l $(SRCFILES) include/*.h > LineCounts.$(ARCH).txt - @echo BUILD_NUM = `calc $(BUILD_NUM)+1` > Makefile.BuildNum + @echo BUILD_NUM = $$(( $(BUILD_NUM) + 1 )) > Makefile.BuildNum.$(ARCH) %.ao.$(ARCH): %.asm Makefile @echo --- NASM -o $@ diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum deleted file mode 100644 index f95a7522..00000000 --- a/Kernel/Makefile.BuildNum +++ /dev/null @@ -1 +0,0 @@ -BUILD_NUM = 2301 diff --git a/Makefile.cfg b/Makefile.cfg index 35080e9c..9c08aead 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -10,7 +10,7 @@ ACESSDIR := /home/tpg/Projects/Acess2 CC := gcc LD := ld AS := nasm -OBJDUMP := objdump +DISASM := objdump -d RM := @rm -f STRIP := strip MKDIR := mkdir diff --git a/Makefile.x86_64.cfg b/Makefile.x86_64.cfg index f40c9003..a5bfe218 100644 --- a/Makefile.x86_64.cfg +++ b/Makefile.x86_64.cfg @@ -1,6 +1,7 @@ CC = x86_64-linux-gnu-gcc LD = ld +DISASM = objdump -d -M x86-64 KERNEL_CFLAGS = -mcmodel=large -nostdlib diff --git a/Modules/Makefile.tpl b/Modules/Makefile.tpl index 103e8d8a..73efa631 100644 --- a/Modules/Makefile.tpl +++ b/Modules/Makefile.tpl @@ -50,7 +50,7 @@ $(BIN): %.kmd.$(ARCH): $(OBJ) @echo --- $(LD) -o $@ # $(LD) -T $(ACESSDIR)/Modules/link.ld --allow-shlib-undefined -shared -nostdlib -o $@ $(OBJ) @$(LD) --allow-shlib-undefined -shared -nostdlib -o $@ $(OBJ) - @$(OBJDUMP) -d $(BIN) > $(BIN).dsm + @$(DISASM) $(BIN) > $(BIN).dsm else $(BIN): %.xo.$(ARCH): $(OBJ) @echo --- $(LD) -o $@ -- 2.20.1