1 # $Id: Makefile,v 1.50 1999/08/31 13:26:13 anton Exp $
2 # Makefile for the linux kernel.
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).
8 # Note 2! The CFLAGS definitions are now in the main makefile...
11 $(CPP
) -D__ASSEMBLY__
$(AFLAGS
) -ansi
$< -o
$*.s
14 $(CC
) -D__ASSEMBLY__
$(AFLAGS
) -ansi
-c
$< -o
$*.o
16 all: kernel.o head.o init_task.o
19 IRQ_OBJS
:= irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
20 O_OBJS
:= entry.o wof.o wuf.o etrap.o rtrap.o traps.o
${IRQ_OBJS} \
21 process.o signal.o ioport.o setup.o idprom.o \
22 sys_sparc.o sunos_asm.o sparc-stub.o systbls.o sys_sunos.o \
23 sunos_ioctl.o time.o windows.o cpu.o devices.o \
24 sclow.o solaris.o tadpole.o tick14.o ptrace.o sys_solaris.o \
25 unaligned.o muldiv.o pcic.o semaphore.o
27 OX_OBJS
:= sparc_ksyms.o
34 O_OBJS
+= trampoline.o smp.o sun4m_smp.o sun4d_smp.o
37 ifdef CONFIG_SUN_AUXIO
46 $(CC
) -D__ASSEMBLY__
$(AFLAGS
) -ansi
-c
$*.S
-o
$*.o
49 @echo
"/* Automatically generated. Do not edit. */" > asm_offsets.h
50 @echo
"#ifndef __ASM_OFFSETS_H__" >> asm_offsets.h
51 @echo
"#define __ASM_OFFSETS_H__" >> asm_offsets.h
52 @echo
"" >> asm_offsets.h
53 @echo
"#include <linux/config.h>" >> asm_offsets.h
54 @echo
"" >> asm_offsets.h
55 @echo
"#ifndef CONFIG_SMP" >> asm_offsets.h
56 @echo
"" >> asm_offsets.h
57 @echo
"#include <linux/config.h>" > tmp.c
58 @echo
"#undef CONFIG_SMP" >> tmp.c
59 @echo
"#include <linux/sched.h>" >> tmp.c
60 $(CC
) -E tmp.c
-o tmp.i
61 @echo
"/* Automatically generated. Do not edit. */" > check_asm.c
62 @echo
"#include <linux/config.h>" >> check_asm.c
63 @echo
"#undef CONFIG_SMP" >> check_asm.c
64 @echo
"#include <linux/sched.h>" >> check_asm.c
65 @echo
'struct task_struct _task;' >> check_asm.c
66 @echo
'struct mm_struct _mm;' >> check_asm.c
67 @echo
'struct thread_struct _thread;' >> check_asm.c
68 @echo
'int main(void) {' >> check_asm.c
69 $(SH
) .
/check_asm.sh task tmp.i check_asm.c
70 $(SH
) .
/check_asm.sh mm tmp.i check_asm.c
71 $(SH
) .
/check_asm.sh thread tmp.i check_asm.c
72 @echo
'return 0; }' >> check_asm.c
74 $(CC
) -o check_asm check_asm.c
75 .
/check_asm
>> asm_offsets.h
76 @
rm -f check_asm check_asm.c
77 @echo
"" >> asm_offsets.h
78 @echo
"#else /* CONFIG_SMP */" >> asm_offsets.h
79 @echo
"" >> asm_offsets.h
80 @echo
"#include <linux/config.h>" > tmp.c
81 @echo
"#undef CONFIG_SMP" >> tmp.c
82 @echo
"#define CONFIG_SMP 1" >> tmp.c
83 @echo
"#include <linux/sched.h>" >> tmp.c
84 $(CC
) -D__SMP__
-E tmp.c
-o tmp.i
85 @echo
"/* Automatically generated. Do not edit. */" > check_asm.c
86 @echo
"#include <linux/config.h>" >> check_asm.c
87 @echo
"#undef CONFIG_SMP" >> check_asm.c
88 @echo
"#define CONFIG_SMP 1" >> check_asm.c
89 @echo
"#include <linux/sched.h>" >> check_asm.c
90 @echo
'struct task_struct _task;' >> check_asm.c
91 @echo
'struct mm_struct _mm;' >> check_asm.c
92 @echo
'struct thread_struct _thread;' >> check_asm.c
93 @echo
'int main(void) {' >> check_asm.c
94 $(SH
) .
/check_asm.sh task tmp.i check_asm.c
95 $(SH
) .
/check_asm.sh mm tmp.i check_asm.c
96 $(SH
) .
/check_asm.sh thread tmp.i check_asm.c
97 @echo
'return 0; }' >> check_asm.c
99 $(CC
) -D__SMP__
-o check_asm check_asm.c
100 .
/check_asm
>> asm_offsets.h
101 @
rm -f check_asm check_asm.c
102 @echo
"" >> asm_offsets.h
103 @echo
"#endif /* CONFIG_SMP */" >> asm_offsets.h
104 @echo
"" >> asm_offsets.h
105 @echo
"#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h
106 @if
test -r
$(HPATH
)/asm
/asm_offsets.h
; then \
107 if cmp
-s asm_offsets.h
$(HPATH
)/asm
/asm_offsets.h
; then \
108 echo
$(HPATH
)/asm
/asm_offsets.h is unchanged
; \
109 rm -f asm_offsets.h
; \
111 mv
-f asm_offsets.h
$(HPATH
)/asm
/asm_offsets.h
; \
114 mv
-f asm_offsets.h
$(HPATH
)/asm
/asm_offsets.h
; \
118 include $(TOPDIR
)/Rules.make