clean
[linux-2.4.21-pre4.git] / arch / s390 / kernel / Makefile
1 #
2 # Makefile for the linux kernel.
3 #
4 # Note! Dependencies are done automagically by 'make dep', which also
5 # removes any old dependencies. DON'T put your own dependencies here
6 # unless it's something special (ie not a .c file).
7 #
8 # Note 2! The CFLAGS definitions are now in the main makefile...
9
10 .S.o:
11         $(CC) $(AFLAGS) -traditional -c $< -o $*.o
12
13 all: asm-offsets.h kernel.o head.o init_task.o
14
15 O_TARGET := kernel.o
16
17 export-objs     := debug.o ebcdic.o irq.o s390_ext.o smp.o s390_ksyms.o
18 obj-y   := entry.o bitmap.o traps.o time.o process.o irq.o \
19             setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
20             semaphore.o s390fpu.o reipl.o s390_ext.o debug.o
21
22 obj-$(CONFIG_MODULES)           += s390_ksyms.o
23 obj-$(CONFIG_SMP)               += smp.o
24
25 #
26 # Kernel debugging
27 #
28 obj-$(CONFIG_REMOTE_DEBUG)      += gdb-stub.o #gdb-low.o 
29
30 .PHONY: asm-offsets.h
31
32 entry.S: asm-offsets.h
33
34 #
35 # Automatic offset generation for assembler files.
36 #
37 asm-offsets.h: asm-offsets.c
38         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -S $< -o - | grep -- "->" | \
39         (echo "#ifndef __ASM_OFFSETS_H__"; \
40          echo "#define __ASM_OFFSETS_H__"; \
41          echo "/*"; \
42          echo " * DO NOT MODIFY"; \
43          echo " *"; \
44          echo " * This file was generated by arch/s390/kernel/Makefile"; \
45          echo " */"; \
46          sed -e "s:^->\([^ ]*\) \([^ ]*\) \(.*\):#define \\1 \\2 /* \\3*/:" \
47              -e "s:->::"; \
48          echo "#endif" \
49         ) > asm-offsets.h
50
51 clean:
52         rm -f asm-offsets.h
53
54 include $(TOPDIR)/Rules.make
55