rules.mk 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # Makefile for misc devices that really don't fit anywhere else.
  3. #
  4. LOCAL_DIR := $(GET_LOCAL_DIR)
  5. LCM_DEFINES := $(shell echo $(CUSTOM_LK_LCM) | tr a-z A-Z)
  6. DEFINES += $(foreach LCM,$(LCM_DEFINES),$(LCM))
  7. DEFINES += MTK_LCM_PHYSICAL_ROTATION=\"$(MTK_LCM_PHYSICAL_ROTATION)\"
  8. DEFINES += LCM_WIDTH=\"$(LCM_WIDTH)\"
  9. DEFINES += LCM_HEIGHT=\"$(LCM_HEIGHT)\"
  10. ifeq ($(PLATFORM), $(filter $(PLATFORM), mt6757 mt6763 mt6771 mt6765 mt6762 mt6779 mt6768 mt6785 mt6885 mt6873 mt6853 mt6833))
  11. DEFINES += LCM_SET_DISPLAY_ON_DELAY=y
  12. endif
  13. LCM_LISTS := $(subst ",,$(CUSTOM_LK_LCM))
  14. CUSTOM_ALPHA := k6885v1_64_alpha
  15. CUSTOM_ALPHA_1 := k6873v1_64_alpha
  16. CUSTOM_ALPHA_2 := k6853v1_64_alpha
  17. ifneq (,$(findstring $(CUSTOM_ALPHA),$(CUSTOM_LK_LCM)))
  18. OBJS += $(foreach LCM,$(LCM_LISTS),$(LOCAL_DIR)/$(CUSTOM_ALPHA)/$(subst $(CUSTOM_ALPHA)_,,$(LCM))/$(addsuffix .o, $(subst $(CUSTOM_ALPHA)_,,$(LCM))))
  19. else ifneq (,$(findstring $(CUSTOM_ALPHA_1),$(CUSTOM_LK_LCM)))
  20. OBJS += $(foreach LCM,$(LCM_LISTS),$(LOCAL_DIR)/$(CUSTOM_ALPHA_1)/$(subst $(CUSTOM_ALPHA_1)_,,$(LCM))/$(addsuffix .o, $(subst $(CUSTOM_ALPHA_1)_,,$(LCM))))
  21. else ifneq (,$(findstring $(CUSTOM_ALPHA_2),$(CUSTOM_LK_LCM)))
  22. OBJS += $(foreach LCM,$(LCM_LISTS),$(LOCAL_DIR)/$(CUSTOM_ALPHA_2)/$(subst $(CUSTOM_ALPHA_2)_,,$(LCM))/$(addsuffix .o, $(subst $(CUSTOM_ALPHA_2)_,,$(LCM))))
  23. else
  24. OBJS += $(foreach LCM,$(LCM_LISTS),$(LOCAL_DIR)/$(LCM)/$(addsuffix .o, $(LCM)))
  25. endif
  26. OBJS += $(LOCAL_DIR)/mt65xx_lcm_list.o \
  27. $(LOCAL_DIR)/lcm_common.o \
  28. $(LOCAL_DIR)/lcm_gpio.o \
  29. $(LOCAL_DIR)/lcm_i2c.o \
  30. $(LOCAL_DIR)/lcm_util.o \
  31. $(LOCAL_DIR)/lcm_pmic.o
  32. INCLUDES += -I$(LOCAL_DIR)/inc