xref: /openbmc/linux/init/Makefile (revision 92045954)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for the linux kernel.
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
5c33df4eaSJean-Paul Samanobj-y                          := main.o version.o mounts.o
6c33df4eaSJean-Paul Samanifneq ($(CONFIG_BLK_DEV_INITRD),y)
7c33df4eaSJean-Paul Samanobj-y                          += noinitramfs.o
8c33df4eaSJean-Paul Samanelse
9c33df4eaSJean-Paul Samanobj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
10c33df4eaSJean-Paul Samanendif
111da177e4SLinus Torvaldsobj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
121da177e4SLinus Torvalds
131da177e4SLinus Torvaldsmounts-y			:= do_mounts.o
141da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
151da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_INITRD)	+= do_mounts_initrd.o
161da177e4SLinus Torvaldsmounts-$(CONFIG_BLK_DEV_MD)	+= do_mounts_md.o
171da177e4SLinus Torvalds
181da177e4SLinus Torvalds# dependencies on generated files need to be listed explicitly
1992045954SSam Ravnborg$(obj)/version.o: include/generated/compile.h
201da177e4SLinus Torvalds
213eb3c740SRoman Zippel# compile.h changes depending on hostname, generation number, etc,
223eb3c740SRoman Zippel# so we regenerate it always.
233eb3c740SRoman Zippel# mkcompile_h will make sure to only update the
243eb3c740SRoman Zippel# actual file if its content has changed.
253eb3c740SRoman Zippel
26fab1e310SSam Ravnborg       chk_compile.h = :
27d75f4c68SMike Frysinger quiet_chk_compile.h = echo '  CHK     $@'
28d75f4c68SMike Frysingersilent_chk_compile.h = :
2992045954SSam Ravnborginclude/generated/compile.h: FORCE
30d75f4c68SMike Frysinger	@$($(quiet)chk_compile.h)
313eb3c740SRoman Zippel	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
32a0f97e06SSam Ravnborg	"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
33