1# 2# parisc/Makefile 3# 4# This file is included by the global makefile so that you can add your own 5# architecture-specific flags and dependencies. Remember to do have actions 6# for "archclean" and "archdep" for cleaning up and making dependencies for 7# this architecture 8# 9# This file is subject to the terms and conditions of the GNU General Public 10# License. See the file "COPYING" in the main directory of this archive 11# for more details. 12# 13# Copyright (C) 1994 by Linus Torvalds 14# Portions Copyright (C) 1999 The Puffin Group 15# 16# Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, 17# Mike Shaver, Helge Deller and Martin K. Petersen 18# 19 20ifdef CONFIG_PARISC64 21LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux64.lds $(LDFLAGS) 22CROSS_COMPILE := hppa64-linux- 23UTS_MACHINE := parisc64 24#CFLAGS += -b hppa64-linux 25 26else 27LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux.lds $(LDFLAGS) 28MACHINE := $(subst 64,,$(shell uname -m)) 29ifneq (${MACHINE},parisc) 30# cross compilation 31CROSS_COMPILE := hppa-linux- 32endif 33endif 34 35OFFSET_H := $(TOPDIR)/include/asm-parisc/offset.h 36FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 37 38CPP=$(CC) -E 39OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S 40LDFLAGS = 41 42 43CFLAGS_PIPE := -pipe 44CFLAGS_NSR := -fno-strength-reduce 45CFLAGS := $(CFLAGS) -D__linux__ $(CFLAGS_PIPE) $(CFLAGS_NSR) 46 47# These should be on for older toolchains or SOM toolchains that don't 48# enable them by default. 49CFLAGS += -mno-space-regs -mfast-indirect-calls 50 51# No fixed-point multiply 52CFLAGS += -mdisable-fpregs 53 54# Without this, "ld -r" results in .text sections that are too big 55# (> 0x40000) for branches to reach stubs. 56CFLAGS += -ffunction-sections 57 58# select which processor to optimise for 59ifdef CONFIG_PA7100 60CFLAGS += -march=1.1 -mschedule=7100 61endif 62 63ifdef CONFIG_PA7200 64CFLAGS += -march=1.1 -mschedule=7200 65endif 66 67ifdef CONFIG_PA7100LC 68CFLAGS += -march=1.1 -mschedule=7100LC 69endif 70 71ifdef CONFIG_PA8X00 72CFLAGS += -march=2.0 -mschedule=8000 73endif 74 75ASFLAGS := -D__ASSEMBLY__ -traditional 76 77HEAD := arch/parisc/kernel/head.o 78 79SUBDIRS := $(SUBDIRS) $(addprefix arch/parisc/, tools kernel mm lib hpux) 80CORE_FILES := $(addprefix arch/parisc/, kernel/pdc_cons.o kernel/process.o \ 81 lib/lib.a mm/mm.o kernel/kernel.o hpux/hpux.o) \ 82 $(CORE_FILES) arch/parisc/kernel/init_task.o 83CLEAN_FILES := $(CLEAN_FILES) arch/parisc/tools/offset.[hs] 84 85ifdef CONFIG_PARISC64 86HEAD := arch/parisc/kernel/head64.o 87endif 88 89LIBS := `$(CC) -print-libgcc-file-name` $(TOPDIR)/arch/parisc/lib/lib.a $(LIBS) 90 91SUBDIRS := $(SUBDIRS) arch/parisc/math-emu 92DRIVERS := $(DRIVERS) arch/parisc/math-emu/math.o 93 94arch/parisc/kernel: dummy 95 $(MAKE) linuxsubdirs SUBDIRS=arch/parisc/kernel 96 97arch/parisc/mm: dummy 98 $(MAKE) linuxsubdirs SUBDIRS=arch/parisc/mm 99 100palo: vmlinux 101 @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \ 102 echo 'ERROR: Please install palo first (apt-get install palo)';\ 103 echo 'or build it from source and install it somewhere in your $$PATH';\ 104 false; \ 105 fi 106 @if [ ! -f ./palo.conf ]; then \ 107 cp arch/parisc/defpalo.conf palo.conf; \ 108 echo 'A generic palo config file (./palo.conf) has been created for you.'; \ 109 echo 'You should check it and re-run "make palo".'; \ 110 echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ 111 false; \ 112 fi 113 palo -f ./palo.conf 114 115oldpalo: vmlinux 116 export TOPDIR=`pwd`; \ 117 unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage 118 119Image: palo 120 121Image-clean: 122 123ramdisk.o: 124 125zImage: palo 126 127bzImage: palo 128 129compressed: zImage 130 131install: 132 133archmrproper: 134 rm -f $(OFFSET_H) 135 136archclean: 137 138archdep: $(OFFSET_H) 139 140$(OFFSET_H): include/linux/version.h 141 $(MAKE) -C $(TOPDIR)/arch/$(ARCH)/tools all 142 143.PHONY: $(OFFSET_H) 144