diff options
Diffstat (limited to 'arch/sparc/kernel/Makefile')
-rw-r--r-- | arch/sparc/kernel/Makefile | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 7be8ddd3a..53ed6d340 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.41 1997/11/19 15:11:59 jj Exp $ +# $Id: Makefile,v 1.43 1998/03/09 14:03:34 jj Exp $ # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also @@ -15,8 +15,6 @@ ifdef SMP .S.o: $(CC) -D__ASSEMBLY__ $(AFLAGS) -ansi -c $< -o $*.o -CHECKASM_CC = $(CC) -D__SMP__ - else .S.s: @@ -25,7 +23,6 @@ else .S.o: $(CC) -D__ASSEMBLY__ -ansi -c $< -o $*.o -CHECKASM_CC = $(CC) endif all: kernel.o head.o init_task.o @@ -42,7 +39,7 @@ O_OBJS := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \ OX_OBJS := sparc_ksyms.o ifdef SMP -O_OBJS += trampoline.o smp.o +O_OBJS += trampoline.o smp.o sun4m_smp.o sun4d_smp.o endif ifdef CONFIG_SUN_AUXIO @@ -62,18 +59,61 @@ head.o: head.S endif check_asm: dummy + @echo "/* Automatically generated. Do not edit. */" > asm_offsets.h + @echo "#ifndef __ASM_OFFSETS_H__" >> asm_offsets.h + @echo "#define __ASM_OFFSETS_H__" >> asm_offsets.h + @echo "" >> asm_offsets.h + @echo "#ifndef __SMP__" >> asm_offsets.h + @echo "" >> asm_offsets.h + @echo "#include <linux/sched.h>" > tmp.c + $(CC) -E tmp.c -o tmp.i + @echo "/* Automatically generated. Do not edit. */" > check_asm.c + @echo "#include <linux/sched.h>" >> check_asm.c + @echo 'struct task_struct _task;' >> check_asm.c + @echo 'struct mm_struct _mm;' >> check_asm.c + @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'int main(void) {' >> check_asm.c + $(SH) ./check_asm.sh task tmp.i check_asm.c + $(SH) ./check_asm.sh mm tmp.i check_asm.c + $(SH) ./check_asm.sh thread tmp.i check_asm.c + @echo 'return 0; }' >> check_asm.c + @rm -f tmp.[ci] + $(CC) -o check_asm check_asm.c + ./check_asm >> asm_offsets.h + @rm -f check_asm check_asm.c + @echo "" >> asm_offsets.h + @echo "#else /* __SMP__ */" >> asm_offsets.h + @echo "" >> asm_offsets.h @echo "#include <linux/sched.h>" > tmp.c - $(CHECKASM_CC) -E tmp.c -o tmp.i - @echo "/* Automatically generated. Do not edit. */" > check_asm.c; echo "#include <linux/sched.h>" >> check_asm.c; echo 'struct task_struct _task; struct mm_struct _mm; struct thread_struct _thread; int main(void) { printf ("/* Automatically generated. Do not edit. */\n#ifndef __ASM_OFFSETS_H__\n#define __ASM_OFFSETS_H__\n\n");' >> check_asm.c + $(CC) -D__SMP__ -E tmp.c -o tmp.i + @echo "/* Automatically generated. Do not edit. */" > check_asm.c + @echo "#include <linux/sched.h>" >> check_asm.c + @echo 'struct task_struct _task;' >> check_asm.c + @echo 'struct mm_struct _mm;' >> check_asm.c + @echo 'struct thread_struct _thread;' >> check_asm.c + @echo 'int main(void) {' >> check_asm.c $(SH) ./check_asm.sh task tmp.i check_asm.c $(SH) ./check_asm.sh mm tmp.i check_asm.c $(SH) ./check_asm.sh thread tmp.i check_asm.c - @echo 'printf ("\n#endif /* __ASM_OFFSETS_H__ */\n"); return 0; }' >> check_asm.c + @echo 'return 0; }' >> check_asm.c @rm -f tmp.[ci] - $(CHECKASM_CC) -o check_asm check_asm.c - ./check_asm > asm_offsets.h - @if test -r $(HPATH)/asm/asm_offsets.h; then if cmp -s asm_offsets.h $(HPATH)/asm/asm_offsets.h; then echo $(HPATH)/asm/asm_offsets.h is unchanged; rm -f asm_offsets.h; else mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; fi; else mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; fi + $(CC) -D__SMP__ -o check_asm check_asm.c + ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c + @echo "" >> asm_offsets.h + @echo "#endif /* __SMP__ */" >> asm_offsets.h + @echo "" >> asm_offsets.h + @echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h + @if test -r $(HPATH)/asm/asm_offsets.h; then \ + if cmp -s asm_offsets.h $(HPATH)/asm/asm_offsets.h; then \ + echo $(HPATH)/asm/asm_offsets.h is unchanged; \ + rm -f asm_offsets.h; \ + else \ + mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; \ + fi; \ + else \ + mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; \ + fi include $(TOPDIR)/Rules.make |