# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the linux kernel.
#
obj-y = fork.o exec_domain.o panic.o \
cpu.o exit.o softirq.o resource.o \
sysctl.o sysctl_binary.o capability.o ptrace.o user.o \
signal.o sys.o umh.o workqueue.o pid.o task_work.o \
extable.o params.o \
kthread.o sys_ni.o nsproxy.o \
notifier.o ksysfs.o cred.o reboot.o \
async.o range.o smpboot.o ucount.o
obj-$([31mCONFIG_MODULES[0m) += kmod.o
obj-$([31mCONFIG_MULTIUSER[0m) += groups.o
ifdef [31mCONFIG_FUNCTION_TRACER[0m
# Do not trace internal ftrace files
CFLAGS_REMOVE_irq_work.o = $(CC_FLAGS_FTRACE)
endif
# Prevents flicker of uninteresting __do_softirq()/__local_bh_disable_ip()
# in coverage traces.
KCOV_INSTRUMENT_softirq.o := n
# These are called from save_stack_trace() on slub debug path,
# and produce insane amounts of uninteresting coverage.
KCOV_INSTRUMENT_module.o := n
KCOV_INSTRUMENT_extable.o := n
# Don't self-instrument.
KCOV_INSTRUMENT_kcov.o := n
KASAN_SANITIZE_kcov.o := n
CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
# cond_syscall is currently not LTO compatible
CFLAGS_sys_ni.o = $(DISABLE_LTO)
obj-y += sched/
obj-y += locking/
obj-y += power/
obj-y += printk/
obj-y += irq/
obj-y += rcu/
obj-y += livepatch/
obj-y += dma/
obj-$([31mCONFIG_LOCKDOC[0m) += lockdoc/
obj-$([31mCONFIG_CHECKPOINT_RESTORE[0m) += kcmp.o
obj-$([31mCONFIG_FREEZER[0m) += freezer.o
obj-$([31mCONFIG_PROFILING[0m) += profile.o
obj-$([31mCONFIG_STACKTRACE[0m) += stacktrace.o
obj-y += time/
obj-$([31mCONFIG_FUTEX[0m) += futex.o
obj-$([31mCONFIG_GENERIC_ISA_DMA[0m) += dma.o
obj-$([31mCONFIG_SMP[0m) += smp.o
ifneq ($([31mCONFIG_SMP[0m),y)
obj-y += up.o
endif
obj-$([31mCONFIG_UID16[0m) += uid16.o
obj-$([31mCONFIG_MODULES[0m) += module.o
obj-$([31mCONFIG_MODULE_SIG[0m) += module_signing.o
obj-$([31mCONFIG_MODULE_SIG_FORMAT[0m) += module_signature.o
obj-$([31mCONFIG_KALLSYMS[0m) += kallsyms.o
obj-$([31mCONFIG_BSD_PROCESS_ACCT[0m) += acct.o
obj-$([31mCONFIG_CRASH_CORE[0m) += crash_core.o
obj-$([31mCONFIG_KEXEC_CORE[0m) += kexec_core.o
obj-$([31mCONFIG_KEXEC[0m) += kexec.o
obj-$([31mCONFIG_KEXEC_FILE[0m) += kexec_file.o
obj-$([31mCONFIG_KEXEC_ELF[0m) += kexec_elf.o
obj-$([31mCONFIG_BACKTRACE_SELF_TEST[0m) += backtracetest.o
obj-$([31mCONFIG_COMPAT[0m) += compat.o
obj-$([31mCONFIG_CGROUPS[0m) += cgroup/
obj-$([31mCONFIG_UTS_NS[0m) += utsname.o
obj-$([31mCONFIG_USER_NS[0m) += user_namespace.o
obj-$([31mCONFIG_PID_NS[0m) += pid_namespace.o
obj-$([31mCONFIG_IKCONFIG[0m) += configs.o
obj-$([31mCONFIG_IKHEADERS[0m) += kheaders.o
obj-$([31mCONFIG_SMP[0m) += stop_machine.o
obj-$([31mCONFIG_KPROBES_SANITY_TEST[0m) += test_kprobes.o
obj-$([31mCONFIG_AUDIT[0m) += audit.o auditfilter.o
obj-$([31mCONFIG_AUDITSYSCALL[0m) += auditsc.o audit_watch.o audit_fsnotify.o audit_tree.o
obj-$([31mCONFIG_GCOV_KERNEL[0m) += gcov/
obj-$([31mCONFIG_KCOV[0m) += kcov.o
obj-$([31mCONFIG_KPROBES[0m) += kprobes.o
obj-$([31mCONFIG_FAIL_FUNCTION[0m) += fail_function.o
obj-$([31mCONFIG_KGDB[0m) += debug/
obj-$([31mCONFIG_DETECT_HUNG_TASK[0m) += hung_task.o
obj-$([31mCONFIG_LOCKUP_DETECTOR[0m) += watchdog.o
obj-$([31mCONFIG_HARDLOCKUP_DETECTOR_PERF[0m) += watchdog_hld.o
obj-$([31mCONFIG_SECCOMP[0m) += seccomp.o
obj-$([31mCONFIG_RELAY[0m) += relay.o
obj-$([31mCONFIG_SYSCTL[0m) += utsname_sysctl.o
obj-$([31mCONFIG_TASK_DELAY_ACCT[0m) += delayacct.o
obj-$([31mCONFIG_TASKSTATS[0m) += taskstats.o tsacct.o
obj-$([31mCONFIG_TRACEPOINTS[0m) += tracepoint.o
obj-$([31mCONFIG_LATENCYTOP[0m) += latencytop.o
obj-$([31mCONFIG_ELFCORE[0m) += elfcore.o
obj-$([31mCONFIG_FUNCTION_TRACER[0m) += trace/
obj-$([31mCONFIG_TRACING[0m) += trace/
obj-$([31mCONFIG_TRACE_CLOCK[0m) += trace/
obj-$([31mCONFIG_RING_BUFFER[0m) += trace/
obj-$([31mCONFIG_TRACEPOINTS[0m) += trace/
obj-$([31mCONFIG_IRQ_WORK[0m) += irq_work.o
obj-$([31mCONFIG_CPU_PM[0m) += cpu_pm.o
obj-$([31mCONFIG_BPF[0m) += bpf/
obj-$([31mCONFIG_PERF_EVENTS[0m) += events/
obj-$([31mCONFIG_USER_RETURN_NOTIFIER[0m) += user-return-notifier.o
obj-$([31mCONFIG_PADATA[0m) += padata.o
obj-$([31mCONFIG_CRASH_DUMP[0m) += crash_dump.o
obj-$([31mCONFIG_JUMP_LABEL[0m) += jump_label.o
obj-$([31mCONFIG_CONTEXT_TRACKING[0m) += context_tracking.o
obj-$([31mCONFIG_TORTURE_TEST[0m) += torture.o
obj-$([31mCONFIG_HAS_IOMEM[0m) += iomem.o
obj-$([31mCONFIG_RSEQ[0m) += rseq.o
obj-$([31mCONFIG_GCC_PLUGIN_STACKLEAK[0m) += stackleak.o
KASAN_SANITIZE_stackleak.o := n
KCOV_INSTRUMENT_stackleak.o := n
$(obj)/configs.o: $(obj)/config_data.gz
targets += config_data.gz
$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
$(call if_changed,gzip)
$(obj)/kheaders.o: $(obj)/kheaders_data.tar.xz
quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
cmd_genikh = $(BASH) $(srctree)/kernel/gen_kheaders.sh $@
$(obj)/kheaders_data.tar.xz: FORCE
$(call cmd,genikh)
clean-files := kheaders_data.tar.xz kheaders.md5