Commit ff1a7e88 authored by David Mosberger's avatar David Mosberger

ia64: Manual Makefile cleanup merge.

parent f1731ed8
...@@ -5,22 +5,20 @@ ...@@ -5,22 +5,20 @@
# License. See the file "COPYING" in the main directory of this archive # License. See the file "COPYING" in the main directory of this archive
# for more details. # for more details.
# #
# Copyright (C) 1998-2001 by David Mosberger-Tang <davidm@hpl.hp.com> # Copyright (C) 1998-2002 by David Mosberger-Tang <davidm@hpl.hp.com>
# #
NM := $(CROSS_COMPILE)nm -B NM := $(CROSS_COMPILE)nm -B
AWK := awk
export AWK export AWK
OBJCOPYFLAGS := --strip-all OBJCOPYFLAGS := --strip-all
LDFLAGS_vmlinux := -static LDFLAGS_vmlinux := -static
AFLAGS_KERNEL := -mconstant-gp AFLAGS_KERNEL := -mconstant-gp
EXTRA = EXTRA :=
CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \
-falign-functions=32 -falign-functions=32
# -ffunction-sections
CFLAGS_KERNEL := -mconstant-gp CFLAGS_KERNEL := -mconstant-gp
GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
...@@ -29,55 +27,46 @@ ifneq ($(GCC_VERSION),2) ...@@ -29,55 +27,46 @@ ifneq ($(GCC_VERSION),2)
CFLAGS += -frename-registers --param max-inline-insns=5000 CFLAGS += -frename-registers --param max-inline-insns=5000
endif endif
ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y) cflags-$(CONFIG_ITANIUM_BSTEP_SPECIFIC) += -mb-step
CFLAGS += -mb-step cflags-$(CONFIG_IA64_SGI_SN) += -DBRINGUP
endif
HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o HEAD := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
libs-y += arch/$(ARCH)/lib/
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
core-$(CONFIG_IA32_SUPPORT) += arch/$(ARCH)/ia32/
core-$(CONFIG_IA64_DIG) += arch/$(ARCH)/dig/
core-$(CONFIG_IA64_GENERIC) += arch/$(ARCH)/dig/ arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/ \
arch/$(ARCH)/hp/sim/
core-$(CONFIG_IA64_HP_ZX1) += arch/$(ARCH)/dig/
core-$(CONFIG_IA64_SGI_SN) += arch/$(ARCH)/sn/kernel/ \
arch/$(ARCH)/sn/io/ \
arch/$(ARCH)/sn/io/sn2/ \
arch/$(ARCH)/sn/io/sn2/pcibr/ \
arch/$(ARCH)/sn/kernel/sn2/
drivers-$(CONFIG_PCI) += arch/$(ARCH)/pci/
drivers-$(CONFIG_IA64_HP_SIM) += arch/$(ARCH)/hp/sim/
drivers-$(CONFIG_IA64_HP_ZX1) += arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/
ifdef CONFIG_IA64_SGI_SN
CFLAGS += -DBRINGUP
SUBDIRS += arch/$(ARCH)/sn/fakeprom
endif
makeboot = $(call descend,arch/ia64/boot,$(1)) libs-y += arch/ia64/lib/
maketool = $(call descend,arch/ia64/tools,$(1)) core-y += arch/ia64/kernel/ arch/ia64/mm/
core-$(CONFIG_IA32_SUPPORT) += arch/ia64/ia32/
core-$(CONFIG_IA64_DIG) += arch/ia64/dig/
core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ arch/ia64/hp/common/ arch/ia64/hp/zx1/ \
arch/ia64/hp/sim/
core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/kernel/ \
arch/ia64/sn/io/ \
arch/ia64/sn/io/sn2/ \
arch/ia64/sn/io/sn2/pcibr/ \
arch/ia64/sn/kernel/sn2/
drivers-$(CONFIG_PCI) += arch/ia64/pci/
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
drivers-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/fakeprom/
.PHONY: compressed archclean archmrproper $(TOPDIR)/include/asm-ia64/offsets.h makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/boot $(1)
maketool =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/tools $(1)
all: compressed boot .PHONY: compressed archclean archmrproper include/asm-ia64/offsets.h
boot: vmlinux all compressed: vmlinux.gz
+@$(call makeboot,all)
compressed: vmlinux vmlinux.gz: vmlinux
$(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp $(call makeboot,vmlinux.gz)
gzip vmlinux-tmp
mv vmlinux-tmp.gz vmlinux.gz
archmrproper:
archclean: archclean:
$(MAKE) -rR -f scripts/Makefile.clean obj=arch/$(ARCH)/boot $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/ia64/boot
archmrproper: CLEAN_FILES += include/asm-ia64/offsets.h vmlinux.gz bootloader
prepare: $(TOPDIR)/include/asm-ia64/offsets.h prepare: include/asm-ia64/offsets.h
$(TOPDIR)/include/asm-ia64/offsets.h: include/asm include/linux/version.h \ include/asm-ia64/offsets.h: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
+@$(call maketool,$@) $(call maketool,$@)
...@@ -14,8 +14,8 @@ targets-$(CONFIG_IA64_HP_SIM) += bootloader ...@@ -14,8 +14,8 @@ targets-$(CONFIG_IA64_HP_SIM) += bootloader
targets-$(CONFIG_IA64_GENERIC) += bootloader targets-$(CONFIG_IA64_GENERIC) += bootloader
EXTRA_TARGETS += $(sort $(targets-y)) EXTRA_TARGETS += $(sort $(targets-y))
quiet_cmd_cptotop = CP $@ quiet_cmd_cptotop = LN $@
cmd_cptotop = cp $< $@ cmd_cptotop = ln $< $@
vmlinux.gz: $(obj)/vmlinux.gz $(targets-y) vmlinux.gz: $(obj)/vmlinux.gz $(targets-y)
$(call cmd,cptotop) $(call cmd,cptotop)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment