home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / arch / parisc / Makefile < prev   
Encoding:
Makefile  |  2006-08-11  |  4.2 KB  |  130 lines

  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. NM        = sh $(srctree)/arch/parisc/nm
  20. CHECKFLAGS    += -D__hppa__=1
  21.  
  22. TEST_CC        := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc-3.4 ]; then \
  23.             echo true; else echo false; fi)
  24. ifeq ($(TEST_CC),true)
  25. CC        = $(CROSS_COMPILE)gcc-3.4
  26. endif
  27.  
  28. ifdef CONFIG_64BIT
  29. CROSS_COMPILE    := $(shell if [ -x /usr/bin/hppa64-linux-gnu-$(CC) ]; then \
  30.             echo hppa64-linux-gnu-; else echo hppa64-linux-; fi)
  31. UTS_MACHINE    := parisc64
  32. CHECKFLAGS    += -D__LP64__=1 -m64
  33. else
  34. MACHINE := $(subst 64,,$(shell uname -m))
  35. ifneq ($(MACHINE),parisc)
  36. CROSS_COMPILE    := $(shell if [ -x /usr/bin/hppa-linux-gnu-$(CC) ]; then \
  37.             echo hppa-linux-gnu-; else echo hppa-linux-; fi)
  38. endif
  39. endif
  40.  
  41. FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
  42.  
  43. OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
  44.  
  45. #GCC_VERSION     := $(call cc-version)
  46. #ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
  47. #$(error Sorry, couldn't find ($(cc-version)).)
  48. #endif
  49. #ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
  50. #$(error Sorry, your compiler is too old ($(GCC_VERSION)).  GCC v3.3 or above is required.)
  51. #endif
  52.  
  53. cflags-y    := -pipe
  54.  
  55. # These flags should be implied by an hppa-linux configuration, but they
  56. # are not in gcc 3.2.
  57. cflags-y    += -mno-space-regs -mfast-indirect-calls
  58.  
  59. # Currently we save and restore fpregs on all kernel entry/interruption paths.
  60. # If that gets optimized, we might need to disable the use of fpregs in the
  61. # kernel.
  62. cflags-y    += -mdisable-fpregs
  63.  
  64. # Without this, "ld -r" results in .text sections that are too big
  65. # (> 0x40000) for branches to reach stubs.
  66. cflags-y    += -ffunction-sections
  67.  
  68. # select which processor to optimise for
  69. cflags-$(CONFIG_PA7100)        += -march=1.1 -mschedule=7100
  70. cflags-$(CONFIG_PA7200)        += -march=1.1 -mschedule=7200
  71. cflags-$(CONFIG_PA7100LC)    += -march=1.1 -mschedule=7100LC
  72. cflags-$(CONFIG_PA7300LC)    += -march=1.1 -mschedule=7300
  73. cflags-$(CONFIG_PA8X00)        += -march=2.0 -mschedule=8000
  74.  
  75. head-y            := arch/parisc/kernel/head.o 
  76.  
  77. CFLAGS    += $(cflags-y)
  78.  
  79. kernel-y            := mm/ kernel/ math-emu/ kernel/init_task.o
  80. kernel-$(CONFIG_HPUX)        += hpux/
  81.  
  82. core-y    += $(addprefix arch/parisc/, $(kernel-y))
  83. libs-y    += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
  84.  
  85. drivers-$(CONFIG_OPROFILE)        += arch/parisc/oprofile/
  86.  
  87. PALO := $(shell if which palo; then : ; \
  88.     elif [ -x /sbin/palo ]; then echo /sbin/palo; \
  89.     fi)
  90.  
  91. palo: vmlinux
  92.     @if [ -x $PALO ]; then \
  93.         echo 'ERROR: Please install palo first (apt-get install palo)';\
  94.         echo 'or build it from source and install it somewhere in your $$PATH';\
  95.         false; \
  96.     fi
  97.     @if [ ! -f ./palo.conf ]; then \
  98.         cp arch/parisc/defpalo.conf palo.conf; \
  99.         echo 'A generic palo config file (./palo.conf) has been created for you.'; \
  100.         echo 'You should check it and re-run "make palo".'; \
  101.         echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
  102.         false; \
  103.     fi
  104.     $(PALO) -f ./palo.conf
  105.  
  106. oldpalo: vmlinux
  107.     export TOPDIR=`pwd`; \
  108.     unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
  109.  
  110. # Shorthands for known targets not supported by parisc, use palo as default
  111. Image zImage bzImage: palo
  112.  
  113. kernel_install: vmlinux
  114.     sh $(src)/arch/parisc/install.sh \
  115.             $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
  116.  
  117. install: kernel_install modules_install
  118.  
  119. CLEAN_FILES    += lifimage
  120. MRPROPER_FILES    += palo.conf
  121.  
  122. define archhelp
  123.     @echo  '* vmlinux    - Uncompressed kernel image (./vmlinux)'
  124.     @echo  '  palo        - Bootable image (./lifimage)'
  125.     @echo  '  install    - Install kernel using'
  126.     @echo  '          (your) ~/bin/installkernel or'
  127.     @echo  '          (distribution) /sbin/installkernel or'
  128.     @echo  '          copy to $$(INSTALL_PATH)'
  129. endef
  130.