[IMPROVE] x86: apply jumper for US probes installing
[kernel/swap-modules.git] / energy / Kbuild
1 EXTRA_CFLAGS := $(extra_cflags)
2 KBUILD_EXTRA_SYMBOLS = $(src)/../kprobe/Module.symvers \
3                        $(src)/../us_manager/Module.symvers \
4                        $(src)/../driver/Module.symvers
5
6
7
8
9
10 ###############################################################################
11 ###                      swap energy module description                     ###
12 ###############################################################################
13 obj-m := swap_energy.o
14 swap_energy-y := energy_module.o \
15                  energy.o \
16                  rational_debugfs.o \
17                  debugfs_energy.o \
18                  lcd/lcd_base.o \
19                  lcd/lcd_debugfs.o
20
21
22
23
24
25 ###############################################################################
26 ###                               math support                              ###
27 ###############################################################################
28 # S6E8AA0:
29 ifeq ($(CONFIG_LCD_S6E8AA0), y)
30     swap_energy-y += lcd/s6e8aa0.o
31     LCD_FUNC_LIST += s6e8aa0
32 endif
33
34
35 # PANEL_S6E8AA0:
36 ifeq ($(CONFIG_DISPLAY_PANEL_S6E8AA0), y)
37     swap_energy-y += lcd/s6e8aa0_panel.o
38     LCD_FUNC_LIST += s6e8aa0_panel
39 endif
40
41
42 # MARU:
43 ifeq ($(CONFIG_MARU_BACKLIGHT), y)
44     swap_energy-y += lcd/maru.o
45     LCD_FUNC_LIST += maru
46 endif
47
48
49
50
51
52 ###############################################################################
53 ###                          description functions                          ###
54 ###############################################################################
55 LCD_FUNC_ARGS := void
56 LCD_FUNC_RET := struct lcd_ops *
57
58
59
60
61
62 ###############################################################################
63 ###                            generate defines                             ###
64 ###############################################################################
65 LCD_PREFIX := lcd_energy_
66
67 # add prefix
68 TMP := $(foreach it, $(LCD_FUNC_LIST), $(LCD_PREFIX)$(it))
69 LCD_FUNC_LIST := $(TMP)
70
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))
75
76
77 # generate DEFINITION_LCD_ARRAY
78 COMMA := ,
79 AND := &
80 DEFINITION_LCD_ARRAY := DEFINITION_LCD_ARRAY=\
81 "{" $(foreach it, $(LCD_FUNC_LIST), &$(it),) "}"
82
83
84 # generate LCD_MAKE_FNAME
85 LCD_MAKE_FNAME := LCD_MAKE_FNAME(name)=$(LCD_PREFIX)\#\#name
86
87
88
89
90
91 ###############################################################################
92 ###                  add generate defines to EXTRA_CFLAGS                   ###
93 ###############################################################################
94 EXTRA_CFLAGS += -D"$(DEFINITION_LCD_FUNC)" \
95                 -D"$(DEFINITION_LCD_ARRAY)" \
96                 -D"$(LCD_MAKE_FNAME)"