1 # SPDX-License-Identifier: GPL-2.0-only !! 1 # $Id: Makefile,v 1.62 2000/12/15 00:41:17 davem Exp $ 2 extra-y := vmlinux.lds !! 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... 3 9 4 obj-y += head.o entry.o atomic.o signal.o trap !! 10 SH = $(CONFIG_SHELL) 5 obj-y += power.o syscall.o syscall_table.o set << 6 obj-y += process.o cpu-probe.o ptrace.o stackt << 7 obj-y += probes/ << 8 << 9 obj-$(CONFIG_MODULES) += mod << 10 obj-$(CONFIG_SMP) += smp << 11 obj-$(CONFIG_FUNCTION_TRACER) += ftr << 12 obj-$(CONFIG_STACKTRACE) += sta << 13 obj-$(CONFIG_CSKY_PMU_V1) += per << 14 obj-$(CONFIG_PERF_EVENTS) += per << 15 obj-$(CONFIG_HAVE_PERF_REGS) += per << 16 obj-$(CONFIG_JUMP_LABEL) += jum << 17 11 18 ifdef CONFIG_FUNCTION_TRACER !! 12 .S.s: 19 CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) !! 13 $(CPP) $(AFLAGS) -ansi $< -o $*.s >> 14 >> 15 .S.o: >> 16 $(CC) $(AFLAGS) -ansi -c $< -o $*.o >> 17 >> 18 all: kernel.o head.o init_task.o >> 19 >> 20 O_TARGET := kernel.o >> 21 >> 22 export-objs := sparc_ksyms.o >> 23 IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o >> 24 obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \ >> 25 process.o signal.o ioport.o setup.o idprom.o \ >> 26 sys_sparc.o sunos_asm.o sparc-stub.o systbls.o \ >> 27 time.o windows.o cpu.o devices.o sclow.o \ >> 28 tadpole.o tick14.o ptrace.o sys_solaris.o \ >> 29 unaligned.o muldiv.o pcic.o semaphore.o sparc_ksyms.o >> 30 >> 31 obj-$(CONFIG_SUN4) += sun4setup.o >> 32 obj-$(CONFIG_SMP) += trampoline.o smp.o sun4m_smp.o sun4d_smp.o >> 33 obj-$(CONFIG_SUN_AUXIO) += auxio.o >> 34 obj-$(CONFIG_PCI) += ebus.o >> 35 obj-$(CONFIG_SUN_PM) += apc.o pmc.o >> 36 >> 37 ifdef CONFIG_SUNOS_EMUL >> 38 obj-y += sys_sunos.o sunos_ioctl.o 20 endif 39 endif >> 40 >> 41 head.o: head.S >> 42 $(CC) $(AFLAGS) -ansi -c $*.S -o $*.o >> 43 >> 44 check_asm: dummy >> 45 @if [ ! -r $(HPATH)/asm/asm_offsets.h ] ; then \ >> 46 touch $(HPATH)/asm/asm_offsets.h ; \ >> 47 fi >> 48 @echo "/* Automatically generated. Do not edit. */" > asm_offsets.h >> 49 @echo "#ifndef __ASM_OFFSETS_H__" >> asm_offsets.h >> 50 @echo "#define __ASM_OFFSETS_H__" >> asm_offsets.h >> 51 @echo "" >> asm_offsets.h >> 52 @echo "#include <linux/config.h>" >> asm_offsets.h >> 53 @echo "" >> asm_offsets.h >> 54 @echo "#include <linux/config.h>" > tmp.c >> 55 @echo "#include <linux/sched.h>" >> tmp.c >> 56 $(CPP) $(CPPFLAGS) tmp.c -o tmp.i >> 57 @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c >> 58 @echo "#include <linux/config.h>" >> check_asm_data.c >> 59 @echo "#include <linux/sched.h>" >> check_asm_data.c >> 60 @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c >> 61 $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c >> 62 $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c >> 63 $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c >> 64 @echo '};' >> check_asm_data.c >> 65 $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c >> 66 @echo "/* Automatically generated. Do not edit. */" > check_asm.c >> 67 @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c >> 68 @echo "unsigned int check_asm_data[] = {" >> check_asm.c >> 69 $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c >> 70 @echo "};" >> check_asm.c >> 71 @echo 'int main(void) {' >> check_asm.c >> 72 @echo 'int i = 0;' >> check_asm.c >> 73 $(SH) ./check_asm.sh -printf task tmp.i check_asm.c >> 74 $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c >> 75 $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c >> 76 @echo 'return 0; }' >> check_asm.c >> 77 @rm -f tmp.[ci] check_asm_data.[cs] >> 78 $(HOSTCC) -o check_asm check_asm.c >> 79 ./check_asm >> asm_offsets.h >> 80 @rm -f check_asm check_asm.c >> 81 @echo "" >> asm_offsets.h >> 82 @echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h >> 83 @if test -r $(HPATH)/asm/asm_offsets.h; then \ >> 84 if cmp -s asm_offsets.h $(HPATH)/asm/asm_offsets.h; then \ >> 85 echo $(HPATH)/asm/asm_offsets.h is unchanged; \ >> 86 rm -f asm_offsets.h; \ >> 87 else \ >> 88 mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; \ >> 89 fi; \ >> 90 else \ >> 91 mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; \ >> 92 fi >> 93 >> 94 >> 95 include $(TOPDIR)/Rules.make
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.