Build - Cleaning up distinction between architectures and configs
authorJohn Hodge <[email protected]>
Sat, 3 Dec 2011 03:13:20 +0000 (11:13 +0800)
committerJohn Hodge <[email protected]>
Sat, 3 Dec 2011 03:13:20 +0000 (11:13 +0800)
BuildConf/x86/smp.mk [new symlink]
BuildConf/x86_smp [deleted symlink]
Kernel/Makefile
Kernel/arch/armv7/Makefile
Kernel/arch/x86/Makefile

diff --git a/BuildConf/x86/smp.mk b/BuildConf/x86/smp.mk
new file mode 120000 (symlink)
index 0000000..1296c19
--- /dev/null
@@ -0,0 +1 @@
+default.mk
\ No newline at end of file
diff --git a/BuildConf/x86_smp b/BuildConf/x86_smp
deleted file mode 120000 (symlink)
index ef2bea7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-x86/
\ No newline at end of file
index c972ed4..2b2d96f 100644 (file)
@@ -15,29 +15,38 @@ BUILD_NUM = 0
 endif
 
 KERNEL_VERSION = $(ACESS_VERSION)
-
 MAKEDEP                = $(CC) -M
 
+ifeq ($(AS_SUFFIX),)
+       AS_SUFFIX = S
+endif
+
+ASFLAGS         += -D ARCHDIR_IS_$(ARCHDIR)=1 -DCONFIG_is_$(CONFIG)=1
 CPPFLAGS       += -I./include -I./arch/$(ARCHDIR)/include -D_MODULE_NAME_=\"Kernel\"
-CPPFLAGS       += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DARCHDIR_IS_$(ARCHDIR)=1
+CPPFLAGS       += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DARCHDIR_IS_$(ARCHDIR)=1 -DCONFIG_is_$(CONFIG)=1
 CPPFLAGS       += -DKERNEL_VERSION=$(KERNEL_VERSION)
 CFLAGS         += -Wall -fno-stack-protector -Wstrict-prototypes -g
 CFLAGS         += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized
 CFLAGS          += -O3
 LDFLAGS                += -T arch/$(ARCHDIR)/link.ld -g
 
-OBJDIR := obj-$(ARCH)/
-#OBJSUFFIX := .$(ARCH)
+ifeq ($(CONFIG),default)
+       OBJDIR := obj-$(ARCH)/
+       #OBJSUFFIX := .$(ARCH)
+       BIN := ../Acess2.$(ARCH).bin
+       GZBIN := ../Acess2.$(ARCH).gz
+else
+       OBJDIR := obj-$(ARCH)-$(CONFIG)/
+       #OBJSUFFIX := .$(ARCH)-$(CONFIG)
+       BIN := ../Acess2.$(ARCH)-$(CONFIG).bin
+       GZBIN := ../Acess2.$(ARCH)-$(CONFIG).gz
+endif
 
 ifeq ($(DEBUG_BUILD),yes)
        LDFLAGS += -g
        CFLAGS += -g
 endif
 
-ifeq ($(AS_SUFFIX),)
-       AS_SUFFIX = S
-endif
-
 BUILDINFO_OBJ := $(OBJDIR)buildinfo.o$(OBJSUFFIX)
 BUILDINFO_SRC := $(OBJDIR)buildinfo.c$(OBJSUFFIX)
 
@@ -56,8 +65,6 @@ OBJ := $(addsuffix $(OBJSUFFIX), $(OBJ))
 OBJ := $(addprefix $(OBJDIR), $(OBJ))
 
 MODS += $(addprefix ../Modules/, $(addsuffix .xo.$(ARCH),$(MODULES)))
-BIN = ../Acess2.$(ARCH).bin
-GZBIN = ../Acess2.$(ARCH).gz
 
 DEPFILES := $(OBJ:%$(OBJSUFFIX)=%.dep$(OBJSUFFIX))
 
index 67bea82..b041aa9 100644 (file)
@@ -7,17 +7,8 @@ CPPFLAGS       =
 CFLAGS         =
 ASFLAGS                =
 
-PCI_ADDRESS=0
-ifeq ($(ARCH),integrator-cp)
-       MMU_PRESENT=1
-else
-       MMU_PRESENT=1
-endif
-
-
-
 ASFLAGS += -DCONFIG_is_$(CONFIG)=1
-CPPFLAGS += -DMMU_PRESENT=$(MMU_PRESENT) -DPCI_ADDRESS=$(PCI_ADDRESS) -DCONFIG_is_$(CONFIG)=1
+CPPFLAGS += -DMMU_PRESENT=$(MMU_PRESENT)
 LDFLAGS += `$(CC) --print-libgcc-file-name`
 
 A_OBJ  = start.ao main.o lib.o lib.ao time.o pci.o debug.o
index 10cd645..0683d58 100644 (file)
@@ -11,13 +11,12 @@ ASFLAGS             = -f elf
 
 USE_MP=0
 
-ifeq ($(ARCH),x86)
+ifeq ($(CONFIG),default)
        USE_MP=0
-else ifeq ($(ARCH),x86-smp)
+else ifeq ($(CONFIG),smp)
        USE_MP=1
 endif
 
-#ASFLAGS               += -D ARCH=\"$(ARCH)\" -D ARCHDIR=\"$(ARCHDIR)\"
 ASFLAGS += -D USE_MP=$(USE_MP)
 CPPFLAGS += -DUSE_MP=$(USE_MP)
 

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