X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fparisc%2FMakefile;h=5ddad7bd60ac8740de6712aabd6c274fc1fb435d;hb=83454a285714f8365a4d391d8f2be3a956b32498;hp=f3d0d7c7097782bb43bf2e93d5e0eead251274bc;hpb=fe2520094d88018423dfc42b3cd0015f74e8adea;p=linux-2.6-omap-h63xx.git diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index f3d0d7c7097..5ddad7bd60a 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -16,29 +16,33 @@ # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, # Mike Shaver, Helge Deller and Martin K. Petersen # + +KBUILD_DEFCONFIG := default_defconfig + NM = sh $(srctree)/arch/parisc/nm CHECKFLAGS += -D__hppa__=1 +MACHINE := $(shell uname -m) +ifeq ($(MACHINE),parisc*) +NATIVE := 1 +endif + ifdef CONFIG_64BIT -CROSS_COMPILE := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc ]; then \ - echo hppa64-linux-gnu-; else echo hppa64-linux-; fi) UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 -else -MACHINE := $(subst 64,,$(shell uname -m)) -ifneq ($(MACHINE),parisc) -CROSS_COMPILE := hppa-linux- -endif +WIDTH := 64 +CROSS_COMPILE := hppa64-linux-gnu- +else # 32-bit +WIDTH := endif -FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align +# attempt to help out folks who are cross-compiling +ifeq ($(NATIVE),1) +CROSS_COMPILE := hppa$(WIDTH)-linux- +endif OBJCOPY_FLAGS =-O binary -R .note -R .comment -S -ifneq ($(call cc-ifversion, -lt, 0303, "bad"),) -$(error Sorry, GCC v3.3 or above is required.) -endif - cflags-y := -pipe # These flags should be implied by an hppa-linux configuration, but they @@ -77,27 +81,27 @@ PALO := $(shell if which palo; then : ; \ elif [ -x /sbin/palo ]; then echo /sbin/palo; \ fi) +PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \ + else echo $(obj)/palo.conf; \ + fi) + palo: vmlinux - @if [ -x $PALO ]; then \ + @if test ! -x "$(PALO)"; then \ 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 - @if [ ! -f ./palo.conf ]; then \ - cp arch/parisc/defpalo.conf palo.conf; \ - echo 'A generic palo config file (./palo.conf) has been created for you.'; \ + @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.'; \ 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 - $(PALO) -f ./palo.conf + $(PALO) -f $(PALOCONF) -oldpalo: vmlinux - export TOPDIR=`pwd`; \ - unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage - -# Shorthands for known targets not supported by parisc, use palo as default -Image zImage bzImage: palo +# Shorthands for known targets not supported by parisc, use vmlinux as default +Image zImage bzImage: vmlinux kernel_install: vmlinux sh $(src)/arch/parisc/install.sh \ @@ -116,3 +120,12 @@ define archhelp @echo ' (distribution) /sbin/installkernel or' @echo ' copy to $$(INSTALL_PATH)' endef + +# 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