18c2ecf20Sopenharmony_ci#
28c2ecf20Sopenharmony_ci# ia64/Makefile
38c2ecf20Sopenharmony_ci#
48c2ecf20Sopenharmony_ci# This file is included by the global makefile so that you can add your own
58c2ecf20Sopenharmony_ci# architecture-specific flags and dependencies.
68c2ecf20Sopenharmony_ci#
78c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public
88c2ecf20Sopenharmony_ci# License.  See the file "COPYING" in the main directory of this archive
98c2ecf20Sopenharmony_ci# for more details.
108c2ecf20Sopenharmony_ci#
118c2ecf20Sopenharmony_ci# Copyright (C) 1998-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
128c2ecf20Sopenharmony_ci#
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciKBUILD_DEFCONFIG := generic_defconfig
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciNM := $(CROSS_COMPILE)nm -B
178c2ecf20Sopenharmony_ciREADELF := $(CROSS_COMPILE)readelf
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciCHECKFLAGS	+= -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciOBJCOPYFLAGS	:= --strip-all
228c2ecf20Sopenharmony_ciLDFLAGS_vmlinux	:= -static
238c2ecf20Sopenharmony_ciKBUILD_AFLAGS_KERNEL := -mconstant-gp
248c2ecf20Sopenharmony_ciEXTRA		:=
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cicflags-y	:= -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
278c2ecf20Sopenharmony_ci		   -falign-functions=32 -frename-registers -fno-optimize-sibling-calls
288c2ecf20Sopenharmony_ciKBUILD_CFLAGS_KERNEL := -mconstant-gp
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciGAS_STATUS	= $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
318c2ecf20Sopenharmony_ciKBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciifeq ($(GAS_STATUS),buggy)
348c2ecf20Sopenharmony_ci$(error Sorry, you need a newer version of the assember, one that is built from	\
358c2ecf20Sopenharmony_ci	a source-tree that post-dates 18-Dec-2002.  You can find a pre-compiled	\
368c2ecf20Sopenharmony_ci	static binary of such an assembler at:					\
378c2ecf20Sopenharmony_ci										\
388c2ecf20Sopenharmony_ci		ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
398c2ecf20Sopenharmony_ciendif
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciquiet_cmd_gzip = GZIP    $@
428c2ecf20Sopenharmony_cicmd_gzip = cat $(real-prereqs) | $(KGZIP) -n -f -9 > $@
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciquiet_cmd_objcopy = OBJCOPY $@
458c2ecf20Sopenharmony_cicmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciKBUILD_CFLAGS += $(cflags-y)
488c2ecf20Sopenharmony_cihead-y := arch/ia64/kernel/head.o
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_cilibs-y				+= arch/ia64/lib/
518c2ecf20Sopenharmony_cicore-y				+= arch/ia64/kernel/ arch/ia64/mm/
528c2ecf20Sopenharmony_cicore-$(CONFIG_IA64_SGI_UV)	+= arch/ia64/uv/
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_cidrivers-y			+= arch/ia64/pci/ arch/ia64/hp/common/
558c2ecf20Sopenharmony_cidrivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciPHONY += compressed check
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ciall: compressed unwcheck
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_cicompressed: vmlinux.gz
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_civmlinuz: vmlinux.gz
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_civmlinux.gz: vmlinux.bin FORCE
668c2ecf20Sopenharmony_ci	$(call if_changed,gzip)
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_civmlinux.bin: vmlinux FORCE
698c2ecf20Sopenharmony_ci	$(call if_changed,objcopy)
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciunwcheck: vmlinux
728c2ecf20Sopenharmony_ci	-$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciarchclean:
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ciarchheaders:
778c2ecf20Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ciCLEAN_FILES += vmlinux.gz
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciinstall: vmlinux.gz
828c2ecf20Sopenharmony_ci	sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_cidefine archhelp
858c2ecf20Sopenharmony_ci  echo '* compressed	- Build compressed kernel image'
868c2ecf20Sopenharmony_ci  echo '  install	- Install compressed kernel image'
878c2ecf20Sopenharmony_ci  echo '* unwcheck	- Check vmlinux for invalid unwind info'
888c2ecf20Sopenharmony_ciendef
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciarchprepare: make_nr_irqs_h
918c2ecf20Sopenharmony_ciPHONY += make_nr_irqs_h
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_cimake_nr_irqs_h:
948c2ecf20Sopenharmony_ci	$(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
95