2005-04-16 18:20:36 -04:00
|
|
|
#
|
|
|
|
# parisc/Makefile
|
|
|
|
#
|
|
|
|
# This file is included by the global makefile so that you can add your own
|
|
|
|
# architecture-specific flags and dependencies. Remember to do have actions
|
|
|
|
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
|
|
|
# this architecture
|
|
|
|
#
|
|
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
|
|
# for more details.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1994 by Linus Torvalds
|
|
|
|
# Portions Copyright (C) 1999 The Puffin Group
|
|
|
|
#
|
|
|
|
# Modified for PA-RISC Linux by Paul Lahaie, Alex deVries,
|
|
|
|
# Mike Shaver, Helge Deller and Martin K. Petersen
|
|
|
|
#
|
2008-02-26 14:55:17 -05:00
|
|
|
|
|
|
|
KBUILD_DEFCONFIG := default_defconfig
|
|
|
|
|
2005-04-16 18:20:36 -04:00
|
|
|
NM = sh $(srctree)/arch/parisc/nm
|
|
|
|
CHECKFLAGS += -D__hppa__=1
|
|
|
|
|
2007-10-18 16:54:51 -04:00
|
|
|
MACHINE := $(shell uname -m)
|
|
|
|
ifeq ($(MACHINE),parisc*)
|
|
|
|
NATIVE := 1
|
|
|
|
endif
|
|
|
|
|
2005-04-16 18:20:36 -04:00
|
|
|
ifdef CONFIG_64BIT
|
|
|
|
UTS_MACHINE := parisc64
|
|
|
|
CHECKFLAGS += -D__LP64__=1 -m64
|
2007-10-18 16:54:51 -04:00
|
|
|
WIDTH := 64
|
|
|
|
CROSS_COMPILE := hppa64-linux-gnu-
|
|
|
|
else # 32-bit
|
|
|
|
WIDTH :=
|
2005-04-16 18:20:36 -04:00
|
|
|
endif
|
|
|
|
|
2007-10-18 16:54:51 -04:00
|
|
|
# attempt to help out folks who are cross-compiling
|
|
|
|
ifeq ($(NATIVE),1)
|
|
|
|
CROSS_COMPILE := hppa$(WIDTH)-linux-
|
|
|
|
endif
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
|
|
|
|
|
|
|
|
cflags-y := -pipe
|
|
|
|
|
|
|
|
# These flags should be implied by an hppa-linux configuration, but they
|
|
|
|
# are not in gcc 3.2.
|
|
|
|
cflags-y += -mno-space-regs -mfast-indirect-calls
|
|
|
|
|
|
|
|
# Currently we save and restore fpregs on all kernel entry/interruption paths.
|
|
|
|
# If that gets optimized, we might need to disable the use of fpregs in the
|
|
|
|
# kernel.
|
2005-10-21 22:48:34 -04:00
|
|
|
cflags-y += -mdisable-fpregs
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
# Without this, "ld -r" results in .text sections that are too big
|
|
|
|
# (> 0x40000) for branches to reach stubs.
|
|
|
|
cflags-y += -ffunction-sections
|
|
|
|
|
|
|
|
# select which processor to optimise for
|
|
|
|
cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
|
|
|
|
cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
|
|
|
|
cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC
|
|
|
|
cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300
|
|
|
|
cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
|
|
|
|
|
|
|
|
head-y := arch/parisc/kernel/head.o
|
|
|
|
|
2007-10-14 16:21:35 -04:00
|
|
|
KBUILD_CFLAGS += $(cflags-y)
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
|
|
|
|
kernel-$(CONFIG_HPUX) += hpux/
|
|
|
|
|
|
|
|
core-y += $(addprefix arch/parisc/, $(kernel-y))
|
2007-11-28 02:07:35 -05:00
|
|
|
libs-y += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/
|
|
|
|
|
2007-10-18 18:09:59 -04:00
|
|
|
PALO := $(shell if which palo; then : ; \
|
|
|
|
elif [ -x /sbin/palo ]; then echo /sbin/palo; \
|
|
|
|
fi)
|
|
|
|
|
2007-10-20 12:31:33 -04:00
|
|
|
PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \
|
|
|
|
else echo $(obj)/palo.conf; \
|
|
|
|
fi)
|
|
|
|
|
2007-10-18 18:09:59 -04:00
|
|
|
palo: vmlinux
|
2007-10-20 12:31:33 -04:00
|
|
|
@if test ! -x "$(PALO)"; then \
|
2007-10-18 18:09:59 -04:00
|
|
|
echo 'ERROR: Please install palo first (apt-get install palo)';\
|
|
|
|
echo 'or build it from source and install it somewhere in your $$PATH';\
|
|
|
|
false; \
|
|
|
|
fi
|
2007-10-20 12:31:33 -04:00
|
|
|
@if test ! -f "$(PALOCONF)"; then \
|
|
|
|
cp $(src)/arch/parisc/defpalo.conf $(obj)/palo.conf; \
|
|
|
|
echo 'A generic palo config file ($(obj)/palo.conf) has been created for you.'; \
|
2007-10-18 18:09:59 -04:00
|
|
|
echo 'You should check it and re-run "make palo".'; \
|
|
|
|
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
|
|
|
|
false; \
|
|
|
|
fi
|
2007-10-20 12:31:33 -04:00
|
|
|
$(PALO) -f $(PALOCONF)
|
2007-10-18 18:09:59 -04:00
|
|
|
|
2007-10-18 16:54:51 -04:00
|
|
|
# Shorthands for known targets not supported by parisc, use vmlinux as default
|
|
|
|
Image zImage bzImage: vmlinux
|
2005-04-16 18:20:36 -04:00
|
|
|
|
|
|
|
kernel_install: vmlinux
|
|
|
|
sh $(src)/arch/parisc/install.sh \
|
|
|
|
$(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
|
|
|
|
|
|
|
|
install: kernel_install modules_install
|
|
|
|
|
2005-09-09 14:57:26 -04:00
|
|
|
CLEAN_FILES += lifimage
|
2005-04-16 18:20:36 -04:00
|
|
|
MRPROPER_FILES += palo.conf
|
|
|
|
|
|
|
|
define archhelp
|
|
|
|
@echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
|
2007-10-18 18:09:59 -04:00
|
|
|
@echo ' palo - Bootable image (./lifimage)'
|
2005-04-16 18:20:36 -04:00
|
|
|
@echo ' install - Install kernel using'
|
|
|
|
@echo ' (your) ~/bin/installkernel or'
|
|
|
|
@echo ' (distribution) /sbin/installkernel or'
|
|
|
|
@echo ' copy to $$(INSTALL_PATH)'
|
|
|
|
endef
|
2007-10-18 16:54:51 -04:00
|
|
|
|
|
|
|
# we require gcc 3.3 or above to compile the kernel
|
|
|
|
archprepare: checkbin
|
|
|
|
checkbin:
|
|
|
|
@if test "$(call cc-version)" -lt "0303"; then \
|
|
|
|
echo -n "Sorry, GCC v3.3 or above is required to build " ; \
|
|
|
|
echo "the kernel." ; \
|
|
|
|
false ; \
|
|
|
|
fi
|