diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-02-15 14:18:21 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-02-15 14:18:21 +0000 |
commit | a5333b24d531dbe61a99da386ef44bc642ee46b7 (patch) | |
tree | 265c1c7df7710bd2b0a38b28f095fa94afa06102 /extras/mini-os | |
parent | a917e6d4785b384046c4bde29a615b745dacd9b8 (diff) | |
download | xen-a5333b24d531dbe61a99da386ef44bc642ee46b7.tar.gz xen-a5333b24d531dbe61a99da386ef44bc642ee46b7.tar.bz2 xen-a5333b24d531dbe61a99da386ef44bc642ee46b7.zip |
minios: build system cleanups.
- Added ARCH_LDFLAGS for architecture specific LDFLAGS
- Fixed build dependencies after changing makerule files
- Fixed ARCH_CFLAGS for 64bit guest, added ARCH_ASFLAGS
- Couple of variable renames
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os')
-rw-r--r-- | extras/mini-os/Makefile | 5 | ||||
-rw-r--r-- | extras/mini-os/arch/x86/Makefile | 5 | ||||
-rw-r--r-- | extras/mini-os/arch/x86/arch.mk | 5 | ||||
-rw-r--r-- | extras/mini-os/minios.mk | 17 |
4 files changed, 16 insertions, 16 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index df313e48d5..e337f1656d 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -44,10 +44,6 @@ ARCH_LINKS = # This can be overwritten from arch specific rules. EXTRA_INC = -# Special build dependencies. -# Build all after touching this/these file(s) (see minios.mk) -SPEC_DEPENDS = minios.mk - # Include the architecture family's special makerules. # This must be before include minios.mk! include $(TARGET_ARCH_DIR)/arch.mk @@ -57,7 +53,6 @@ include minios.mk # Define some default flags for linking. LDLIBS := -LDFLAGS := LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME) LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds diff --git a/extras/mini-os/arch/x86/Makefile b/extras/mini-os/arch/x86/Makefile index 45cfe19136..8e655f1d64 100644 --- a/extras/mini-os/arch/x86/Makefile +++ b/extras/mini-os/arch/x86/Makefile @@ -3,9 +3,6 @@ # It's is used for x86_32, x86_32y and x86_64 # -# Rebuild all after touching this/these extra file(s) (see mini-os.mk) -SPEC_DEP = arch.mk - # include arch.mk has to be before mini-os.mk! include arch.mk include ../../minios.mk @@ -25,5 +22,5 @@ $(ARCH_LIB): $(ARCH_OBJS) $(HEAD_ARCH_OBJ) $(AR) rv $(ARCH_LIB) $(ARCH_OBJS) clean: - rm -f $(ARCH_LIB) $(ARCH_OBJS) + rm -f $(ARCH_LIB) $(ARCH_OBJS) $(HEAD_ARCH_OBJ) diff --git a/extras/mini-os/arch/x86/arch.mk b/extras/mini-os/arch/x86/arch.mk index 5d0ee4add7..9a7704b490 100644 --- a/extras/mini-os/arch/x86/arch.mk +++ b/extras/mini-os/arch/x86/arch.mk @@ -6,6 +6,7 @@ ifeq ($(TARGET_ARCH),x86_32) ARCH_CFLAGS := -m32 -march=i686 ARCH_LDFLAGS := -m elf_i386 +ARCH_ASFLAGS := -m32 EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH) EXTRA_SRC += arch/$(EXTRA_INC) endif @@ -19,10 +20,10 @@ endif ifeq ($(TARGET_ARCH),x86_64) ARCH_CFLAGS := -m64 -mno-red-zone -fpic -fno-reorder-blocks -ARCH_CFLAGS := -fno-asynchronous-unwind-tables +ARCH_CFLAGS += -fno-asynchronous-unwind-tables +ARCH_ASFLAGS := -m64 ARCH_LDFLAGS := -m elf_x86_64 EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH) EXTRA_SRC += arch/$(EXTRA_INC) endif - diff --git a/extras/mini-os/minios.mk b/extras/mini-os/minios.mk index 47542a5852..5f63e61427 100644 --- a/extras/mini-os/minios.mk +++ b/extras/mini-os/minios.mk @@ -11,6 +11,7 @@ DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION) DEF_ASFLAGS = -D__ASSEMBLY__ +DEF_LDFLAGS = ifeq ($(debug),y) DEF_CFLAGS += -g @@ -23,21 +24,27 @@ endif # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS) ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS) +LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS) # The path pointing to the architecture specific header files. -ARCH_SPEC_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM) +ARCH_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM) + +# Special build dependencies. +# Rebuild all after touching this/these file(s) +EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \ + $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk # Find all header files for checking dependencies. HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h) HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h) -HDRS += $(wildcard $(ARCH_SPEC_INC)/*.h) +HDRS += $(wildcard $(ARCH_INC)/*.h) # For special wanted header directories. extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h)) HDRS += $(extra_heads) # Add the special header directories to the include paths. extra_incl := $(foreach dir,$(EXTRA_INC),-I$(MINI-OS_ROOT)/include/$(dir)) -override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_SPEC_INC) $(extra_incl) +override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_INC) $(extra_incl) # The name of the architecture specific library. # This is on x86_32: libx86_32.a @@ -51,10 +58,10 @@ HEAD_ARCH_OBJ := $(TARGET_ARCH).o HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ) -%.o: %.c $(HDRS) Makefile $(SPEC_DEPENDS) +%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS) $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ -%.o: %.S $(HDRS) Makefile $(SPEC_DEPENDS) +%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS) $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@ |