added a lot of printk output to ease writing of emulator
[linux-2.4.21-pre4.git] / arch / parisc / Makefile
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
20 ifdef CONFIG_PARISC64
21 LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux64.lds $(LDFLAGS)
22 CROSS_COMPILE := hppa64-linux-
23 UTS_MACHINE := parisc64
24 #CFLAGS += -b hppa64-linux
25
26 else
27 LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux.lds $(LDFLAGS)
28 MACHINE := $(subst 64,,$(shell uname -m))
29 ifneq (${MACHINE},parisc)
30 # cross compilation
31 CROSS_COMPILE := hppa-linux-
32 endif
33 endif
34
35 OFFSET_H := $(TOPDIR)/include/asm-parisc/offset.h
36 FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
37
38 CPP=$(CC) -E
39 OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
40 LDFLAGS =
41
42
43 CFLAGS_PIPE := -pipe
44 CFLAGS_NSR  := -fno-strength-reduce
45 CFLAGS := $(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.
49 CFLAGS += -mno-space-regs -mfast-indirect-calls
50
51 # No fixed-point multiply
52 CFLAGS += -mdisable-fpregs
53
54 # Without this, "ld -r" results in .text sections that are too big
55 # (> 0x40000) for branches to reach stubs.
56 CFLAGS += -ffunction-sections
57
58 # select which processor to optimise for
59 ifdef CONFIG_PA7100
60 CFLAGS += -march=1.1 -mschedule=7100
61 endif
62
63 ifdef CONFIG_PA7200
64 CFLAGS += -march=1.1 -mschedule=7200
65 endif
66
67 ifdef CONFIG_PA7100LC
68 CFLAGS += -march=1.1 -mschedule=7100LC
69 endif
70
71 ifdef CONFIG_PA8X00
72 CFLAGS += -march=2.0 -mschedule=8000
73 endif
74
75 ASFLAGS := -D__ASSEMBLY__ -traditional
76
77 HEAD := arch/parisc/kernel/head.o 
78
79 SUBDIRS := $(SUBDIRS) $(addprefix arch/parisc/, tools kernel mm lib hpux)
80 CORE_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
83 CLEAN_FILES := $(CLEAN_FILES) arch/parisc/tools/offset.[hs] 
84
85 ifdef CONFIG_PARISC64
86 HEAD := arch/parisc/kernel/head64.o
87 endif
88
89 LIBS := `$(CC) -print-libgcc-file-name` $(TOPDIR)/arch/parisc/lib/lib.a $(LIBS) 
90
91 SUBDIRS := $(SUBDIRS) arch/parisc/math-emu
92 DRIVERS := $(DRIVERS) arch/parisc/math-emu/math.o
93
94 ifdef CONFIG_KWDB
95 SUBDIRS := $(SUBDIRS) arch/parisc/kdb
96 DRIVERS := $(DRIVERS) arch/parisc/kdb/kdb.o
97
98 arch/parisc/kdb: dummy
99         $(MAKE) linuxsubdirs SUBDIRS=arch/parisc/kdb
100 endif
101
102 arch/parisc/kernel: dummy
103         $(MAKE) linuxsubdirs SUBDIRS=arch/parisc/kernel
104
105 arch/parisc/mm: dummy
106         $(MAKE) linuxsubdirs SUBDIRS=arch/parisc/mm
107
108 palo: vmlinux
109         export TOPDIR=`pwd`; \
110         unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
111
112 Image: palo
113
114 Image-clean:
115
116 ramdisk.o:
117
118 zImage: palo
119
120 bzImage: palo
121
122 compressed: zImage
123
124 install: 
125
126 archmrproper:
127         rm -f $(OFFSET_H)
128
129 archclean:
130
131 archdep: $(OFFSET_H)
132
133 $(OFFSET_H): include/linux/version.h
134         $(MAKE) -C $(TOPDIR)/arch/$(ARCH)/tools all
135
136 .PHONY: $(OFFSET_H)