Makefile 1.5 KB

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