Fiddling ready for an ARM port
authorJohn Hodge <[email protected]>
Sun, 8 May 2011 12:58:17 +0000 (20:58 +0800)
committerJohn Hodge <[email protected]>
Sun, 8 May 2011 12:58:17 +0000 (20:58 +0800)
Kernel/Makefile
Kernel/arch/x86/Makefile

index c488df7..d7bc08f 100644 (file)
@@ -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 $@
 
index 41a10bc..27a2ec0 100644 (file)
@@ -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         =

UCC git Repository :: git.ucc.asn.au