Makefile 3.7 KB

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