xref: /linux/kernel/Makefile (revision fb1c8f93d869b34cacb8b8932e2b83d96a19d720)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for the linux kernel.
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
51da177e4SLinus Torvaldsobj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
61da177e4SLinus Torvalds	    exit.o itimer.o time.o softirq.o resource.o \
71da177e4SLinus Torvalds	    sysctl.o capability.o ptrace.o timer.o user.o \
81da177e4SLinus Torvalds	    signal.o sys.o kmod.o workqueue.o pid.o \
91da177e4SLinus Torvalds	    rcupdate.o intermodule.o extable.o params.o posix-timers.o \
101da177e4SLinus Torvalds	    kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o
111da177e4SLinus Torvalds
121da177e4SLinus Torvaldsobj-$(CONFIG_FUTEX) += futex.o
131da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
141da177e4SLinus Torvaldsobj-$(CONFIG_SMP) += cpu.o spinlock.o
15*fb1c8f93SIngo Molnarobj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
161da177e4SLinus Torvaldsobj-$(CONFIG_UID16) += uid16.o
171da177e4SLinus Torvaldsobj-$(CONFIG_MODULES) += module.o
181da177e4SLinus Torvaldsobj-$(CONFIG_KALLSYMS) += kallsyms.o
191da177e4SLinus Torvaldsobj-$(CONFIG_PM) += power/
201da177e4SLinus Torvaldsobj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
21dc009d92SEric W. Biedermanobj-$(CONFIG_KEXEC) += kexec.o
221da177e4SLinus Torvaldsobj-$(CONFIG_COMPAT) += compat.o
231da177e4SLinus Torvaldsobj-$(CONFIG_CPUSETS) += cpuset.o
241da177e4SLinus Torvaldsobj-$(CONFIG_IKCONFIG) += configs.o
251da177e4SLinus Torvaldsobj-$(CONFIG_IKCONFIG_PROC) += configs.o
261da177e4SLinus Torvaldsobj-$(CONFIG_STOP_MACHINE) += stop_machine.o
271da177e4SLinus Torvaldsobj-$(CONFIG_AUDIT) += audit.o
281da177e4SLinus Torvaldsobj-$(CONFIG_AUDITSYSCALL) += auditsc.o
291da177e4SLinus Torvaldsobj-$(CONFIG_KPROBES) += kprobes.o
301da177e4SLinus Torvaldsobj-$(CONFIG_SYSFS) += ksysfs.o
318446f1d3SIngo Molnarobj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o
321da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_HARDIRQS) += irq/
3360e64d46SVivek Goyalobj-$(CONFIG_CRASH_DUMP) += crash_dump.o
341da177e4SLinus Torvaldsobj-$(CONFIG_SECCOMP) += seccomp.o
351da177e4SLinus Torvalds
367d12e522SAnton Blanchardifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
371da177e4SLinus Torvalds# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
381da177e4SLinus Torvalds# needed for x86 only.  Why this used to be enabled for all architectures is beyond
391da177e4SLinus Torvalds# me.  I suspect most platforms don't need this, but until we know that for sure
401da177e4SLinus Torvalds# I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k
411da177e4SLinus Torvalds# to get a correct value for the wait-channel (WCHAN in ps). --davidm
421da177e4SLinus TorvaldsCFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
431da177e4SLinus Torvaldsendif
441da177e4SLinus Torvalds
451da177e4SLinus Torvalds$(obj)/configs.o: $(obj)/config_data.h
461da177e4SLinus Torvalds
471da177e4SLinus Torvalds# config_data.h contains the same information as ikconfig.h but gzipped.
481da177e4SLinus Torvalds# Info from config_data can be extracted from /proc/config*
491da177e4SLinus Torvaldstargets += config_data.gz
501da177e4SLinus Torvalds$(obj)/config_data.gz: .config FORCE
511da177e4SLinus Torvalds	$(call if_changed,gzip)
521da177e4SLinus Torvalds
531da177e4SLinus Torvaldsquiet_cmd_ikconfiggz = IKCFG   $@
541da177e4SLinus Torvalds      cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
551da177e4SLinus Torvaldstargets += config_data.h
561da177e4SLinus Torvalds$(obj)/config_data.h: $(obj)/config_data.gz FORCE
571da177e4SLinus Torvalds	$(call if_changed,ikconfiggz)
58