Blame view

arch/parisc/Makefile 3.88 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  #
  # 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
  #
c04f7ae2d   Adrian Bunk   [PARISC] move def...
19
20
  
  KBUILD_DEFCONFIG := default_defconfig
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
21
22
  NM		= sh $(srctree)/arch/parisc/nm
  CHECKFLAGS	+= -D__hppa__=1
991b7d6e6   Kyle McMartin   [PARISC] Attempt ...
23
24
25
26
  MACHINE		:= $(shell uname -m)
  ifeq ($(MACHINE),parisc*)
  NATIVE		:= 1
  endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
27
  ifdef CONFIG_64BIT
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
28
29
  UTS_MACHINE	:= parisc64
  CHECKFLAGS	+= -D__LP64__=1 -m64
991b7d6e6   Kyle McMartin   [PARISC] Attempt ...
30
31
32
33
  WIDTH		:= 64
  CROSS_COMPILE	:= hppa64-linux-gnu-
  else # 32-bit
  WIDTH		:=
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
34
  endif
991b7d6e6   Kyle McMartin   [PARISC] Attempt ...
35
36
37
38
  # attempt to help out folks who are cross-compiling
  ifeq ($(NATIVE),1)
  CROSS_COMPILE	:= hppa$(WIDTH)-linux-
  endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
39
40
41
42
43
44
45
46
47
48
49
50
  
  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.
fa681a180   Randolph Chung   [PARISC] Disable ...
51
  cflags-y	+= -mdisable-fpregs
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
52
53
54
  
  # Without this, "ld -r" results in .text sections that are too big
  # (> 0x40000) for branches to reach stubs.
d75f054a2   Helge Deller   parisc: add ftrac...
55
56
57
  ifndef CONFIG_FUNCTION_TRACER
    cflags-y	+= -ffunction-sections
  endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
58
59
60
61
62
63
64
65
66
  
  # 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 
a0f97e06a   Sam Ravnborg   kbuild: enable 'm...
67
  KBUILD_CFLAGS	+= $(cflags-y)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
68
69
70
71
72
  
  kernel-y			:= mm/ kernel/ math-emu/ kernel/init_task.o
  kernel-$(CONFIG_HPUX)		+= hpux/
  
  core-y	+= $(addprefix arch/parisc/, $(kernel-y))
9d29213fd   Kyle McMartin   Revert "[PARISC] ...
73
  libs-y	+= arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
74
75
  
  drivers-$(CONFIG_OPROFILE)		+= arch/parisc/oprofile/
6525ee55b   Kyle McMartin   parisc: quiet pal...
76
  PALO := $(shell if (which palo 2>&1); then : ; \
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
77
78
  	elif [ -x /sbin/palo ]; then echo /sbin/palo; \
  	fi)
f67d4033c   Kyle McMartin   [PARISC] Make pal...
79
80
81
  PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \
  	else echo $(obj)/palo.conf; \
  	fi)
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
82
  palo: vmlinux
f67d4033c   Kyle McMartin   [PARISC] Make pal...
83
  	@if test ! -x "$(PALO)"; then \
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
84
85
86
87
  		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
f67d4033c   Kyle McMartin   [PARISC] Make pal...
88
89
90
  	@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.'; \
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
91
92
93
94
  		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
f67d4033c   Kyle McMartin   [PARISC] Make pal...
95
  	$(PALO) -f $(PALOCONF)
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
96

991b7d6e6   Kyle McMartin   [PARISC] Attempt ...
97
98
  # Shorthands for known targets not supported by parisc, use vmlinux as default
  Image zImage bzImage: vmlinux
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
99
100
101
102
103
104
  
  kernel_install: vmlinux
  	sh $(src)/arch/parisc/install.sh \
  			$(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
  
  install: kernel_install modules_install
0013a8545   Sam Ravnborg   kbuild: m68k,pari...
105
  CLEAN_FILES	+= lifimage
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
106
107
108
109
  MRPROPER_FILES	+= palo.conf
  
  define archhelp
  	@echo  '* vmlinux	- Uncompressed kernel image (./vmlinux)'
5feb4f39a   Kyle McMartin   [PARISC] Restore ...
110
  	@echo  '  palo		- Bootable image (./lifimage)'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
111
  	@echo  '  install	- Install kernel using'
caa27b66b   Sam Ravnborg   kbuild: use INSTA...
112
113
  	@echo  '		  (your) ~/bin/$(INSTALLKERNEL) or'
  	@echo  '		  (distribution) /sbin/$(INSTALLKERNEL) or'
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
114
115
  	@echo  '		  copy to $$(INSTALL_PATH)'
  endef
991b7d6e6   Kyle McMartin   [PARISC] Attempt ...
116
117
118
119
120
121
122
123
124
  
  # 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