xref: /linux-6.15/init/Makefile (revision 3eb3c740)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for the linux kernel.
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
51da177e4SLinus Torvaldsobj-y				:= main.o version.o mounts.o initramfs.o
61da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
71da177e4SLinus Torvalds
81da177e4SLinus Torvaldsmounts-y			:= do_mounts.o
91da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
101da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_INITRD)	+= do_mounts_initrd.o
111da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_MD)	+= do_mounts_md.o
121da177e4SLinus Torvalds
131da177e4SLinus Torvalds# files to be removed upon make clean
141da177e4SLinus Torvaldsclean-files := ../include/linux/compile.h
151da177e4SLinus Torvalds
161da177e4SLinus Torvalds# dependencies on generated files need to be listed explicitly
171da177e4SLinus Torvalds
181da177e4SLinus Torvalds$(obj)/version.o: include/linux/compile.h
191da177e4SLinus Torvalds
20*3eb3c740SRoman Zippel# compile.h changes depending on hostname, generation number, etc,
21*3eb3c740SRoman Zippel# so we regenerate it always.
22*3eb3c740SRoman Zippel# mkcompile_h will make sure to only update the
23*3eb3c740SRoman Zippel# actual file if its content has changed.
24*3eb3c740SRoman Zippel
25*3eb3c740SRoman Zippelinclude/linux/compile.h: FORCE
26*3eb3c740SRoman Zippel	@echo '  CHK     $@'
27*3eb3c740SRoman Zippel	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
28*3eb3c740SRoman Zippel	"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
29