[REFACTOR] Buffer: move getting next queue element into separate function
[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 # MARU:
36 ifeq ($(CONFIG_MARU_BACKLIGHT), y)
37     swap_energy-y += lcd/maru.o
38     LCD_FUNC_LIST += maru
39 endif
40
41
42
43
44
45 ###############################################################################
46 ###                          description functions                          ###
47 ###############################################################################
48 LCD_FUNC_ARGS := void
49 LCD_FUNC_RET := struct lcd_ops *
50
51
52
53
54
55 ###############################################################################
56 ###                            generate defines                             ###
57 ###############################################################################
58 LCD_PREFIX := lcd_energy_
59
60 # add prefix
61 TMP := $(foreach it, $(LCD_FUNC_LIST), $(LCD_PREFIX)$(it))
62 LCD_FUNC_LIST := $(TMP)
63
64 # generate DEFINITION_LCD_FUNC
65 TMP := ($(LCD_FUNC_ARGS));
66 DEFINITION_LCD_FUNC := DEFINITION_LCD_FUNC=\
67 $(foreach it, $(LCD_FUNC_LIST), "extern" $(LCD_FUNC_RET) $(it)$(TMP))
68
69
70 # generate DEFINITION_LCD_ARRAY
71 COMMA := ,
72 AND := &
73 DEFINITION_LCD_ARRAY := DEFINITION_LCD_ARRAY=\
74 "{" $(foreach it, $(LCD_FUNC_LIST), &$(it),) "}"
75
76
77 # generate LCD_MAKE_FNAME
78 LCD_MAKE_FNAME := LCD_MAKE_FNAME(name)=$(LCD_PREFIX)\#\#name
79
80
81
82
83
84 ###############################################################################
85 ###                  add generate defines to EXTRA_CFLAGS                   ###
86 ###############################################################################
87 EXTRA_CFLAGS += -D"$(DEFINITION_LCD_FUNC)" \
88                 -D"$(DEFINITION_LCD_ARRAY)" \
89                 -D"$(LCD_MAKE_FNAME)"