1 EXTRA_CFLAGS := $(extra_cflags)
2 KBUILD_EXTRA_SYMBOLS = $(src)/../kprobe/Module.symvers \
3 $(src)/../us_manager/Module.symvers \
4 $(src)/../driver/Module.symvers
10 ###############################################################################
11 ### swap energy module description ###
12 ###############################################################################
13 obj-m := swap_energy.o
14 swap_energy-y := energy_module.o \
25 ###############################################################################
27 ###############################################################################
29 ifeq ($(CONFIG_LCD_S6E8AA0), y)
30 swap_energy-y += lcd/s6e8aa0.o
31 LCD_FUNC_LIST += s6e8aa0
36 ifeq ($(CONFIG_DISPLAY_PANEL_S6E8AA0), y)
37 swap_energy-y += lcd/s6e8aa0_panel.o
38 LCD_FUNC_LIST += s6e8aa0_panel
43 ifeq ($(CONFIG_MARU_BACKLIGHT), y)
44 swap_energy-y += lcd/maru.o
52 ###############################################################################
53 ### description functions ###
54 ###############################################################################
56 LCD_FUNC_RET := struct lcd_ops *
62 ###############################################################################
63 ### generate defines ###
64 ###############################################################################
65 LCD_PREFIX := lcd_energy_
68 TMP := $(foreach it, $(LCD_FUNC_LIST), $(LCD_PREFIX)$(it))
69 LCD_FUNC_LIST := $(TMP)
71 # generate DEFINITION_LCD_FUNC
72 TMP := ($(LCD_FUNC_ARGS));
73 DEFINITION_LCD_FUNC := DEFINITION_LCD_FUNC=\
74 $(foreach it, $(LCD_FUNC_LIST), "extern" $(LCD_FUNC_RET) $(it)$(TMP))
77 # generate DEFINITION_LCD_ARRAY
80 DEFINITION_LCD_ARRAY := DEFINITION_LCD_ARRAY=\
81 "{" $(foreach it, $(LCD_FUNC_LIST), &$(it),) "}"
84 # generate LCD_MAKE_FNAME
85 LCD_MAKE_FNAME := LCD_MAKE_FNAME(name)=$(LCD_PREFIX)\#\#name
91 ###############################################################################
92 ### add generate defines to EXTRA_CFLAGS ###
93 ###############################################################################
94 EXTRA_CFLAGS += -D"$(DEFINITION_LCD_FUNC)" \
95 -D"$(DEFINITION_LCD_ARRAY)" \