Kbuild 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. KDIR := $(TOP)/kernel_platform/common
  2. ifeq ($(CONFIG_ARCH_WAIPIO), y)
  3. include $(TOUCH_ROOT)/config/gki_waipiotouch.conf
  4. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_waipiotouchconf.h
  5. endif
  6. ifeq ($(CONFIG_ARCH_KALAMA), y)
  7. include $(TOUCH_ROOT)/config/gki_kalamatouch.conf
  8. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_kalamatouchconf.h
  9. endif
  10. ifeq ($(CONFIG_ARCH_KHAJE), y)
  11. include $(TOUCH_ROOT)/config/gki_khajetouch.conf
  12. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_khajetouchconf.h
  13. endif
  14. ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
  15. include $(TOUCH_ROOT)/config/gki_pineappletouch.conf
  16. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_pineappletouchconf.h
  17. endif
  18. ifeq ($(CONFIG_ARCH_MONACO), y)
  19. include $(TOUCH_ROOT)/config/gki_monacotouch.conf
  20. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_monacotouchconf.h
  21. endif
  22. ifeq ($(CONFIG_ARCH_KONA), y)
  23. include $(TOUCH_ROOT)/config/gki_konatouch.conf
  24. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_konatouchconf.h
  25. endif
  26. ifeq ($(CONFIG_ARCH_BLAIR), y)
  27. include $(TOUCH_ROOT)/config/gki_blairtouch.conf
  28. LINUX_INC += -include $(TOUCH_ROOT)/config/gki_blairtouchconf.h
  29. endif
  30. LINUX_INC += -Iinclude/linux \
  31. -Iinclude/linux/drm \
  32. -Iinclude/linux/gunyah \
  33. -Iinclude/linux/input
  34. CDEFINES += -DANI_LITTLE_BYTE_ENDIAN \
  35. -DANI_LITTLE_BIT_ENDIAN \
  36. -DDOT11F_LITTLE_ENDIAN_HOST \
  37. -DANI_COMPILER_TYPE_GCC \
  38. -DANI_OS_TYPE_ANDROID=6 \
  39. -DPTT_SOCK_SVC_ENABLE \
  40. -Wall\
  41. -Werror\
  42. -D__linux__
  43. KBUILD_CPPFLAGS += $(CDEFINES)
  44. ccflags-y += $(LINUX_INC)
  45. ifeq ($(call cc-option-yn, -Wmaybe-uninitialized),y)
  46. EXTRA_CFLAGS += -Wmaybe-uninitialized
  47. endif
  48. ifeq ($(call cc-option-yn, -Wheader-guard),y)
  49. EXTRA_CFLAGS += -Wheader-guard
  50. endif
  51. ######### CONFIG_MSM_TOUCH ########
  52. ifeq ($(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX), y)
  53. LINUX_INC += -include $(TOUCH_ROOT)/synaptics_dsx/synaptics_dsx.h
  54. LINUX_INC += -include $(TOUCH_ROOT)/synaptics_dsx/synaptics_dsx_core.h
  55. synaptics_dsx-y := \
  56. ./synaptics_dsx/synaptics_dsx_core.o \
  57. ./synaptics_dsx/synaptics_dsx_i2c.o
  58. obj-$(CONFIG_MSM_TOUCH) += synaptics_dsx.o
  59. endif
  60. ifeq ($(CONFIG_TOUCH_FOCALTECH), y)
  61. LINUX_INC += -include $(TOUCH_ROOT)/focaltech_touch/focaltech_common.h
  62. LINUX_INC += -include $(TOUCH_ROOT)/focaltech_touch/focaltech_config.h
  63. LINUX_INC += -include $(TOUCH_ROOT)/focaltech_touch/focaltech_core.h
  64. LINUX_INC += -include $(TOUCH_ROOT)/focaltech_touch/focaltech_flash.h
  65. focaltech_fts-y := \
  66. ./focaltech_touch/focaltech_core.o \
  67. ./focaltech_touch/focaltech_ex_fun.o \
  68. ./focaltech_touch/focaltech_ex_mode.o \
  69. ./focaltech_touch/focaltech_gesture.o \
  70. ./focaltech_touch/focaltech_esdcheck.o \
  71. ./focaltech_touch/focaltech_point_report_check.o \
  72. ./focaltech_touch/focaltech_i2c.o \
  73. ./focaltech_touch/focaltech_flash.o \
  74. ./focaltech_touch/focaltech_flash/focaltech_upgrade_ft3518.o
  75. obj-$(CONFIG_MSM_TOUCH) += focaltech_fts.o
  76. endif
  77. ifeq ($(CONFIG_TOUCHSCREEN_NT36XXX_I2C), y)
  78. LINUX_INC += -include $(TOUCH_ROOT)/nt36xxx/nt36xxx.h
  79. LINUX_INC += -include $(TOUCH_ROOT)/nt36xxx/nt36xxx_mem_map.h
  80. LINUX_INC += -include $(TOUCH_ROOT)/nt36xxx/nt36xxx_mp_ctrlram.h
  81. nt36xxx-i2c-y := \
  82. ./nt36xxx/nt36xxx.o \
  83. ./nt36xxx/nt36xxx_fw_update.o \
  84. ./nt36xxx/nt36xxx_ext_proc.o \
  85. ./nt36xxx/nt36xxx_mp_ctrlram.o
  86. obj-$(CONFIG_MSM_TOUCH) += nt36xxx-i2c.o
  87. endif
  88. ifeq ($(CONFIG_TOUCHSCREEN_GOODIX_BRL), y)
  89. LINUX_INC += -include $(TOUCH_ROOT)/goodix_berlin_driver/goodix_ts_core.h
  90. LINUX_INC += -include $(TOUCH_ROOT)/qts/qts_core.h
  91. LINUX_INC += -include $(TOUCH_ROOT)/qts/qts_core_common.h
  92. goodix_ts-y := \
  93. ./goodix_berlin_driver/goodix_ts_core.o \
  94. ./goodix_berlin_driver/goodix_brl_hw.o \
  95. ./goodix_berlin_driver/goodix_cfg_bin.o \
  96. ./goodix_berlin_driver/goodix_ts_utils.o \
  97. ./goodix_berlin_driver/goodix_brl_fwupdate.o \
  98. ./goodix_berlin_driver/goodix_ts_tools.o \
  99. ./goodix_berlin_driver/goodix_ts_gesture.o \
  100. ./goodix_berlin_driver/goodix_ts_inspect.o \
  101. ./goodix_berlin_driver/goodix_brl_spi.o \
  102. ./goodix_berlin_driver/goodix_brl_i2c.o \
  103. ./qts/qts_core.o
  104. obj-$(CONFIG_MSM_TOUCH) += goodix_ts.o
  105. endif
  106. ifeq ($(CONFIG_TOUCHSCREEN_ATMEL_MXT), y)
  107. atmel_mxt_ts-y := \
  108. ./atmel_mxt/atmel_mxt_ts.o
  109. obj-$(CONFIG_MSM_TOUCH) += atmel_mxt_ts.o
  110. endif
  111. ifeq ($(CONFIG_TOUCHSCREEN_DUMMY), y)
  112. dummy_ts-y := ./dummy_touch/dummy_touch.o
  113. obj-$(CONFIG_MSM_TOUCH) += dummy_ts.o
  114. endif
  115. ifeq ($(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM), y)
  116. synaptics_tcm_ts-y := \
  117. ./synaptics_tcm/synaptics_tcm_core.o \
  118. ./synaptics_tcm/synaptics_tcm_i2c.o \
  119. ./synaptics_tcm/synaptics_tcm_touch.o
  120. obj-$(CONFIG_MSM_TOUCH) += synaptics_tcm_ts.o
  121. endif
  122. ifneq ($(CONFIG_ARCH_PINEAPPLE), y)
  123. ifeq ($(CONFIG_TOUCHSCREEN_PARADE), y)
  124. LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
  125. LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_core.h
  126. LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_platform.h
  127. pt_ts-y := \
  128. ./pt/pt_core.o \
  129. ./pt/pt_mt_common.o \
  130. ./pt/pt_platform.o \
  131. ./pt/pt_devtree.o \
  132. ./pt/pt_btn.o \
  133. ./pt/pt_mtb.o \
  134. ./pt/pt_proximity.o
  135. obj-$(CONFIG_MSM_TOUCH) += pt_ts.o
  136. endif
  137. ifeq ($(CONFIG_TOUCHSCREEN_PARADE_I2C), y)
  138. LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
  139. pt_i2c-y := \
  140. ./pt/pt_i2c.o
  141. obj-$(CONFIG_MSM_TOUCH) += pt_i2c.o
  142. endif
  143. ifeq ($(CONFIG_TOUCHSCREEN_PARADE_DEVICE_ACCESS), y)
  144. LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
  145. pt_device_access-y := \
  146. ./pt/pt_device_access.o
  147. obj-$(CONFIG_MSM_TOUCH) += pt_device_access.o
  148. endif
  149. ifeq ($(CONFIG_TOUCHSCREEN_RM_TS), y)
  150. LINUX_INC += -include $(TOUCH_ROOT)/raydium/Config.h
  151. LINUX_INC += -include $(TOUCH_ROOT)/raydium/drv_interface.h
  152. LINUX_INC += -include $(TOUCH_ROOT)/raydium/rad_fw_image_30.h
  153. LINUX_INC += -include $(TOUCH_ROOT)/raydium/raydium_driver.h
  154. LINUX_INC += -include $(TOUCH_ROOT)/raydium/raydium_selftest.h
  155. LINUX_INC += -include $(TOUCH_ROOT)/raydium/tpselftest_30.h
  156. LINUX_INC += -include $(TOUCH_ROOT)/raydium/chip_raydium/f303_ic_control.h
  157. LINUX_INC += -include $(TOUCH_ROOT)/raydium/chip_raydium/f303_ic_reg.h
  158. LINUX_INC += -include $(TOUCH_ROOT)/raydium/chip_raydium/f303_ic_test.h
  159. LINUX_INC += -include $(TOUCH_ROOT)/raydium/chip_raydium/ic_drv_global.h
  160. LINUX_INC += -include $(TOUCH_ROOT)/raydium/chip_raydium/ic_drv_interface.h
  161. raydium_ts-y := \
  162. ./raydium/drv_interface.o \
  163. ./raydium/raydium_driver.o \
  164. ./raydium/raydium_fw_update.o \
  165. ./raydium/raydium_selftest.o \
  166. ./raydium/raydium_sysfs.o \
  167. ./raydium/chip_raydium/f303_ic_control.o \
  168. ./raydium/chip_raydium/f303_ic_test.o \
  169. ./raydium/chip_raydium/ic_drv_global.o \
  170. ./raydium/chip_raydium/ic_drv_interface.o
  171. obj-$(CONFIG_MSM_TOUCH) += raydium_ts.o
  172. endif
  173. endif # pineapple
  174. CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"