Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # Makefile for the linux kernel.
  3. #
  4. ccflags-y := -fno-function-sections -fno-data-sections
  5. obj-y := main.o version.o mounts.o
  6. ifneq ($(CONFIG_BLK_DEV_INITRD),y)
  7. obj-y += noinitramfs.o
  8. else
  9. obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o
  10. endif
  11. obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
  12. ifneq ($(CONFIG_ARCH_INIT_TASK),y)
  13. obj-y += init_task.o
  14. endif
  15. mounts-y := do_mounts.o
  16. mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o
  17. mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
  18. mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o
  19. # dependencies on generated files need to be listed explicitly
  20. $(obj)/version.o: include/generated/compile.h
  21. # compile.h changes depending on hostname, generation number, etc,
  22. # so we regenerate it always.
  23. # mkcompile_h will make sure to only update the
  24. # actual file if its content has changed.
  25. chk_compile.h = :
  26. quiet_chk_compile.h = echo ' CHK $@'
  27. silent_chk_compile.h = :
  28. include/generated/compile.h: FORCE
  29. @$($(quiet)chk_compile.h)
  30. $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
  31. "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"