From: John Hodge Date: Sun, 8 May 2011 12:58:17 +0000 (+0800) Subject: Fiddling ready for an ARM port X-Git-Tag: rel0.10~113 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c53f11b9694ec833b145cfa9660eaca17a4732d7;p=tpg%2Facess2.git Fiddling ready for an ARM port --- diff --git a/Kernel/Makefile b/Kernel/Makefile index c488df7d..d7bc08f4 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -18,7 +18,7 @@ CPPFLAGS += -I./include -I./arch/$(ARCHDIR)/include -D_MODULE_NAME_=\"Kernel\" CPPFLAGS += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DKERNEL_VERSION=$(KERNEL_VERSION) -DBUILD_NUM=$(BUILD_NUM) CFLAGS += -Wall -Werror -fno-stack-protector -fno-builtin -Wstrict-prototypes -g CFLAGS += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized -ASFLAGS += -D ARCH=\"$(ARCH)\" -D ARCHDIR=\"$(ARCHDIR)\" +#ASFLAGS += -D ARCH=\"$(ARCH)\" -D ARCHDIR=\"$(ARCHDIR)\" LDFLAGS += -T arch/$(ARCHDIR)/link.ld -g ifeq ($(DEBUG_BUILD),yes) @@ -26,6 +26,10 @@ ifeq ($(DEBUG_BUILD),yes) CFLAGS += -g endif +ifeq ($(AS_SUFFIX),) + AS_SUFFIX = s +endif + OBJ := $(addprefix arch/$(ARCHDIR)/,$(A_OBJ)) OBJ += heap.o drvutil.o logging.o debug.o lib.o adt.o time.o OBJ += messages.o modules.o syscalls.o system.o threads.o @@ -72,7 +76,7 @@ $(BIN): $(OBJ) $(MODS) arch/$(ARCHDIR)/link.ld Makefile $(POSTBUILD) # $(STRIP) $(BIN) -%.ao.$(ARCH): %.asm Makefile +%.ao.$(ARCH): %.$(AS_SUFFIX) Makefile @echo --- AS -o $@ @$(AS) $(ASFLAGS) $< -o $@ diff --git a/Kernel/arch/x86/Makefile b/Kernel/arch/x86/Makefile index 41a10bc3..27a2ec02 100644 --- a/Kernel/arch/x86/Makefile +++ b/Kernel/arch/x86/Makefile @@ -3,11 +3,7 @@ # i386 Architecture Makefile # arch/i386/Makefile -# Assuming build machine is 32-bit ELF -#CC = gcc -#AS = nasm -#LD = ld -#OBJDUMP = objdump +AS_SUFFIX = asm CPPFLAGS = CFLAGS =