diff options
Diffstat (limited to 'arch/sparc/kernel/Makefile')
-rw-r--r-- | arch/sparc/kernel/Makefile | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 623ab7958..615445364 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $ +# $Id: Makefile,v 1.59 2000/07/16 18:21:24 ecd Exp $ # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also @@ -50,6 +50,9 @@ head.o: head.S $(CC) $(AFLAGS) -ansi -c $*.S -o $*.o check_asm: dummy + @if [ ! -r $(HPATH)/asm/asm_offsets.h ] ; then \ + touch $(HPATH)/asm/asm_offsets.h ; \ + fi @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 @@ -62,21 +65,29 @@ check_asm: dummy @echo "#undef CONFIG_SMP" >> tmp.c @echo "#include <linux/sched.h>" >> tmp.c $(CPP) $(CPPFLAGS) tmp.c -o tmp.i + @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c + @echo "#include <linux/config.h>" >> check_asm_data.c + @echo "#undef CONFIG_SMP" >> check_asm_data.c + @echo "#include <linux/sched.h>" >> check_asm_data.c + @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c + $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c + $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c + $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c + @echo '};' >> check_asm_data.c + $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c @echo "/* Automatically generated. Do not edit. */" > check_asm.c - @echo "#include <linux/config.h>" >> check_asm.c - @echo "#undef CONFIG_SMP" >> 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 'extern int printf(const char *fmt, ...);' >>check_asm.c + @echo "unsigned int check_asm_data[] = {" >> check_asm.c + $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c + @echo "};" >> 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 'int i = 0;' >> check_asm.c + $(SH) ./check_asm.sh -printf task tmp.i check_asm.c + $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c + $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c @echo 'return 0; }' >> check_asm.c - @rm -f tmp.[ci] - $(CC) $(CFLAGS) -o check_asm check_asm.c + @rm -f tmp.[ci] check_asm_data.[cs] + $(HOSTCC) -o check_asm check_asm.c ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c @echo "" >> asm_offsets.h @@ -87,22 +98,30 @@ check_asm: dummy @echo "#define CONFIG_SMP 1" >> tmp.c @echo "#include <linux/sched.h>" >> tmp.c $(CPP) $(CPPFLAGS) tmp.c -o tmp.i + @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c + @echo "#include <linux/config.h>" >> check_asm_data.c + @echo "#undef CONFIG_SMP" >> check_asm_data.c + @echo "#define CONFIG_SMP 1" >> check_asm_data.c + @echo "#include <linux/sched.h>" >> check_asm_data.c + @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c + $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c + $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c + $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c + @echo '};' >> check_asm_data.c + $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c @echo "/* Automatically generated. Do not edit. */" > check_asm.c - @echo "#include <linux/config.h>" >> check_asm.c - @echo "#undef CONFIG_SMP" >> check_asm.c - @echo "#define CONFIG_SMP 1" >> 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 'extern int printf(const char *fmt, ...);' >>check_asm.c + @echo "unsigned int check_asm_data[] = {" >> check_asm.c + $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c + @echo "};" >> 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 'int i = 0;' >> check_asm.c + $(SH) ./check_asm.sh -printf task tmp.i check_asm.c + $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c + $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c @echo 'return 0; }' >> check_asm.c - @rm -f tmp.[ci] - $(CC) $(CFLAGS) -o check_asm check_asm.c + @rm -f tmp.[ci] check_asm_data.[cs] + $(HOSTCC) -o check_asm check_asm.c ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c @echo "" >> asm_offsets.h |