Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2015 MediaTek Inc.
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License version 2 as
  6. # published by the Free Software Foundation.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. MTK_PLATFORM := $(subst ",,$(CONFIG_MTK_PLATFORM))
  14. subdir-ccflags-y += -Werror -I$(srctree)/drivers/misc/mediatek/include
  15. subdir-ccflags-y += -Werror -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include
  16. subdir-ccflags-y += -Werror -I$(srctree)/drivers/misc/mediatek/include/mt-plat
  17. subdir-ccflags-y += -Werror -I$(srctree)/drivers/misc/mediatek/pmic/include
  18. ifneq ($(CONFIG_FPGA_EARLY_PORTING),y)
  19. ifeq ($(CONFIG_MTK_GAUGE_VERSION),30)
  20. obj-y += battery/
  21. endif
  22. endif
  23. ifeq ($(CONFIG_MTK_GAUGE_VERSION),30)
  24. obj-$(CONFIG_MTK_CHARGER) += charger/
  25. else ifeq ($(CONFIG_MTK_GAUGE_VERSION),20)
  26. obj-$(CONFIG_MTK_SMART_BATTERY) += battery_meter_fg_20.o battery_common_fg_20.o
  27. obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT) += mtk_pep_intf.o
  28. obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_20_SUPPORT) += mtk_pep20_intf.o
  29. else
  30. obj-$(CONFIG_MTK_SMART_BATTERY) += battery_meter.o battery_common.o
  31. obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT) += mtk_pep_intf.o
  32. obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_20_SUPPORT) += mtk_pep20_intf.o
  33. endif
  34. ifeq ($(CONFIG_MTK_GAUGE_VERSION),30)
  35. #nothing
  36. else
  37. ifeq ($(CONFIG_MTK_SWCHR_SUPPORT),y)
  38. obj-$(CONFIG_MTK_SMART_BATTERY) += switch_charging.o
  39. else ifeq ($(CONFIG_MTK_BQ24196_SUPPORT),y)
  40. obj-$(CONFIG_MTK_SMART_BATTERY) += switch_charging.o
  41. else ifeq ($(CONFIG_MTK_BQ24296_SUPPORT),y)
  42. obj-$(CONFIG_MTK_SMART_BATTERY) += switch_charging.o
  43. else
  44. obj-$(CONFIG_MTK_SMART_BATTERY) += linear_charging.o
  45. endif
  46. endif
  47. ifneq ($(CONFIG_MTK_GAUGE_VERSION),10)
  48. obj-y += misc/
  49. endif