blob: 84abb2fc61d106bd32a5cfb16268c85d457c0b5f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001# ===========================================================================
2# Kernel configuration targets
3# These targets are used from top-level makefile
4
Steven Rostedt03fa25d2009-04-29 22:52:22 -04005PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
Steven Rostedt281c9da2009-04-29 22:52:23 -04006 localmodconfig localyesconfig
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Al Viro61bee202008-08-25 04:51:27 -04008ifdef KBUILD_KCONFIG
9Kconfig := $(KBUILD_KCONFIG)
10else
Arnaud Lacombe838a2e52010-09-04 17:10:20 -040011Kconfig := Kconfig
Al Viro61bee202008-08-25 04:51:27 -040012endif
Sam Ravnborge703f752007-10-25 20:42:18 +020013
Linus Torvalds1da177e2005-04-16 15:20:36 -070014xconfig: $(obj)/qconf
Sam Ravnborge703f752007-10-25 20:42:18 +020015 $< $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17gconfig: $(obj)/gconf
Sam Ravnborge703f752007-10-25 20:42:18 +020018 $< $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
20menuconfig: $(obj)/mconf
Sam Ravnborge703f752007-10-25 20:42:18 +020021 $< $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23config: $(obj)/conf
Sam Ravnborg4062f1a2010-07-31 23:35:26 +020024 $< --oldaskconfig $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +020026nconfig: $(obj)/nconf
27 $< $(Kconfig)
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029oldconfig: $(obj)/conf
Sam Ravnborg4062f1a2010-07-31 23:35:26 +020030 $< --$@ $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
32silentoldconfig: $(obj)/conf
Michal Marek32197c72009-11-25 15:14:49 +010033 $(Q)mkdir -p include/generated
Sam Ravnborg4062f1a2010-07-31 23:35:26 +020034 $< --$@ $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Steven Rostedt615f0832010-02-02 21:51:27 -050036# if no path is given, then use src directory to find file
37ifdef LSMOD
Michal Marek3cebbb82010-02-03 17:20:14 +010038LSMOD_F := $(LSMOD)
39ifeq ($(findstring /,$(LSMOD)),)
40 LSMOD_F := $(objtree)/$(LSMOD)
41endif
Steven Rostedt615f0832010-02-02 21:51:27 -050042endif
43
Steven Rostedt03fa25d2009-04-29 22:52:22 -040044localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
Steven Rostedt17263ba2010-01-06 16:43:08 -050045 $(Q)mkdir -p include/generated
Steven Rostedt615f0832010-02-02 21:51:27 -050046 $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
Michal Marek7a996d32010-08-04 14:05:07 +020047 $(Q)if [ -f .config ]; then \
Sam Ravnborg4062f1a2010-07-31 23:35:26 +020048 cmp -s .tmp.config .config || \
49 (mv -f .config .config.old.1; \
50 mv -f .tmp.config .config; \
51 $(obj)/conf --silentoldconfig $(Kconfig); \
52 mv -f .config.old.1 .config.old) \
53 else \
54 mv -f .tmp.config .config; \
55 $(obj)/conf --silentoldconfig $(Kconfig); \
Steven Rostedta7c02602009-05-07 11:09:55 -040056 fi
Steven Rostedt03fa25d2009-04-29 22:52:22 -040057 $(Q)rm -f .tmp.config
58
Steven Rostedt48586212009-08-21 12:42:20 -040059localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
Steven Rostedt17263ba2010-01-06 16:43:08 -050060 $(Q)mkdir -p include/generated
Steven Rostedt615f0832010-02-02 21:51:27 -050061 $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
Steven Rostedt281c9da2009-04-29 22:52:23 -040062 $(Q)sed -i s/=m/=y/ .tmp.config
Sam Ravnborg4062f1a2010-07-31 23:35:26 +020063 $(Q)if [ -f .config ]; then \
64 cmp -s .tmp.config .config || \
65 (mv -f .config .config.old.1; \
66 mv -f .tmp.config .config; \
67 $(obj)/conf --silentoldconfig $(Kconfig); \
68 mv -f .config.old.1 .config.old) \
69 else \
70 mv -f .tmp.config .config; \
71 $(obj)/conf --silentoldconfig $(Kconfig); \
Steven Rostedta7c02602009-05-07 11:09:55 -040072 fi
Steven Rostedt281c9da2009-04-29 22:52:23 -040073 $(Q)rm -f .tmp.config
74
EGRY Gabor10200262008-01-11 23:40:00 +010075# Create new linux.pot file
Sam Ravnborgb70e325c2007-06-10 20:38:27 +020076# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
77# The symlink is used to repair a deficiency in arch/um
EGRY Gabor46d26312008-01-11 23:46:11 +010078update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
EGRY Gabor10200262008-01-11 23:40:00 +010079 $(Q)echo " GEN config"
Peter Foleya24a1b82011-04-26 18:13:05 -040080 $(Q)xgettext --default-domain=linux \
81 --add-comments --keyword=_ --keyword=N_ \
82 --from-code=UTF-8 \
83 --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
84 --directory=$(srctree) --directory=$(objtree) \
Sam Ravnborgb70e325c2007-06-10 20:38:27 +020085 --output $(obj)/config.pot
86 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
Peter Foleybdc69ca2011-04-26 18:13:56 -040087 $(Q)ln -fs Kconfig.x86 arch/um/Kconfig
Peter Foleya24a1b82011-04-26 18:13:05 -040088 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`; \
EGRY Gabor10200262008-01-11 23:40:00 +010089 do \
90 echo " GEN $$i"; \
Sam Ravnborg42175162008-04-25 21:15:41 +020091 $(obj)/kxgettext $$i \
EGRY Gabor10200262008-01-11 23:40:00 +010092 >> $(obj)/config.pot; \
93 done )
94 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
Sam Ravnborgb70e325c2007-06-10 20:38:27 +020095 --output $(obj)/linux.pot
Peter Foleybdc69ca2011-04-26 18:13:56 -040096 $(Q)rm -f $(srctree)/arch/um/Kconfig
Sam Ravnborgb70e325c2007-06-10 20:38:27 +020097 $(Q)rm -f $(obj)/config.pot
Arnaldo Carvalho de Melo3b9fa092005-05-05 15:09:46 -070098
Sam Ravnborg0748cb32010-07-31 23:35:31 +020099PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100
Sam Ravnborg0748cb32010-07-31 23:35:31 +0200101allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
Sam Ravnborg4062f1a2010-07-31 23:35:26 +0200102 $< --$@ $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103
Sam Ravnborg7cf3d732010-07-31 23:35:34 +0200104PHONY += listnewconfig oldnoconfig savedefconfig defconfig
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105
Sam Ravnborg861b4ea2010-07-31 23:35:28 +0200106listnewconfig oldnoconfig: $(obj)/conf
Sam Ravnborg4062f1a2010-07-31 23:35:26 +0200107 $< --$@ $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108
Sam Ravnborg7cf3d732010-07-31 23:35:34 +0200109savedefconfig: $(obj)/conf
110 $< --$@=defconfig $(Kconfig)
111
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112defconfig: $(obj)/conf
113ifeq ($(KBUILD_DEFCONFIG),)
Sam Ravnborg4062f1a2010-07-31 23:35:26 +0200114 $< --defconfig $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700115else
Sam Ravnborg2266cfd2007-10-25 20:31:19 +0200116 @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
Sam Ravnborg4062f1a2010-07-31 23:35:26 +0200117 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118endif
119
120%_defconfig: $(obj)/conf
Sam Ravnborg4062f1a2010-07-31 23:35:26 +0200121 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122
123# Help text used by make help
124help:
125 @echo ' config - Update current config utilising a line-oriented program'
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200126 @echo ' nconfig - Update current config utilising a ncurses menu based program'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127 @echo ' menuconfig - Update current config utilising a menu based program'
128 @echo ' xconfig - Update current config utilising a QT based front-end'
129 @echo ' gconfig - Update current config utilising a GTK based front-end'
130 @echo ' oldconfig - Update current config utilising a provided .config as base'
Steven Rostedt03fa25d2009-04-29 22:52:22 -0400131 @echo ' localmodconfig - Update current config disabling modules not loaded'
Steven Rostedt281c9da2009-04-29 22:52:23 -0400132 @echo ' localyesconfig - Update current config converting local mods to core'
Markus Heidelberg590a5852009-05-18 01:36:46 +0200133 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
Sam Ravnborg0748cb32010-07-31 23:35:31 +0200134 @echo ' defconfig - New config with default from ARCH supplied defconfig'
Sam Ravnborg7cf3d732010-07-31 23:35:34 +0200135 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
Jesper Juhle11f0492006-02-25 21:52:50 +0100136 @echo ' allnoconfig - New config where all options are answered with no'
Sam Ravnborg0748cb32010-07-31 23:35:31 +0200137 @echo ' allyesconfig - New config where all options are accepted with yes'
138 @echo ' allmodconfig - New config selecting modules when possible'
139 @echo ' alldefconfig - New config with all symbols set to default'
140 @echo ' randconfig - New config with random answer to all options'
Sam Ravnborg861b4ea2010-07-31 23:35:28 +0200141 @echo ' listnewconfig - List new options'
Sam Ravnborgef61ca82010-07-31 23:35:27 +0200142 @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143
Sam Ravnborg2982de62006-07-27 22:10:27 +0200144# lxdialog stuff
145check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
146
Rob Landleye9e40e12007-10-15 19:23:12 -0500147# Use recursively expanded variables so we do not call gcc unless
Sam Ravnborg2982de62006-07-27 22:10:27 +0200148# we really need to do so. (Do not call gcc as part of make mrproper)
Arnaud Lacombe9ba95682010-08-22 20:03:06 -0400149HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
150 -DLOCALE
Sam Ravnborg2982de62006-07-27 22:10:27 +0200151
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152# ===========================================================================
153# Shared Makefile for the various kconfig executables:
154# conf: Used for defconfig, oldconfig and related targets
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200155# nconf: Used for the nconfig target.
156# Utilizes ncurses
Markus Heidelberg6f26e5e2009-05-18 01:36:45 +0200157# mconf: Used for the menuconfig target
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158# Utilizes the lxdialog package
159# qconf: Used for the xconfig target
160# Based on QT which needs to be installed to compile it
161# gconf: Used for the gconfig target
162# Based on GTK which needs to be installed to compile it
163# object files used by all kconfig flavours
164
Sam Ravnborg2982de62006-07-27 22:10:27 +0200165lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
166lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
167
Linus Torvalds1da177e2005-04-16 15:20:36 -0700168conf-objs := conf.o zconf.tab.o
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200169mconf-objs := mconf.o zconf.tab.o $(lxdialog)
170nconf-objs := nconf.o zconf.tab.o nconf.gui.o
Arnaldo Carvalho de Melo3b9fa092005-05-05 15:09:46 -0700171kxgettext-objs := kxgettext.o zconf.tab.o
Peter Foleyf1943042011-04-26 18:00:05 -0400172qconf-cxxobjs := qconf.o
Arnaud Lacombe5a6f8d22011-06-01 16:14:47 -0400173qconf-objs := zconf.tab.o
174gconf-objs := gconf.o zconf.tab.o
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175
Peter Foleyd02ab882011-04-26 18:02:08 -0400176hostprogs-y := conf
Sam Ravnborgc29121b2006-09-02 21:32:14 +0200177
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200178ifeq ($(MAKECMDGOALS),nconfig)
179 hostprogs-y += nconf
180endif
181
Sam Ravnborgc29121b2006-09-02 21:32:14 +0200182ifeq ($(MAKECMDGOALS),menuconfig)
183 hostprogs-y += mconf
184endif
185
Peter Foley1f594712011-04-26 17:57:38 -0400186ifeq ($(MAKECMDGOALS),update-po-config)
187 hostprogs-y += kxgettext
188endif
189
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190ifeq ($(MAKECMDGOALS),xconfig)
191 qconf-target := 1
192endif
193ifeq ($(MAKECMDGOALS),gconfig)
194 gconf-target := 1
195endif
196
197
198ifeq ($(qconf-target),1)
Peter Foleyf1943042011-04-26 18:00:05 -0400199 hostprogs-y += qconf
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200endif
201
202ifeq ($(gconf-target),1)
Peter Foleyd02ab882011-04-26 18:02:08 -0400203 hostprogs-y += gconf
Linus Torvalds1da177e2005-04-16 15:20:36 -0700204endif
205
Arnaud Lacombe5a6f8d22011-06-01 16:14:47 -0400206clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
Peter Foleyb24d7d72011-04-26 18:06:55 -0400207clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200208clean-files += mconf qconf gconf nconf
EGRY Gabor10200262008-01-11 23:40:00 +0100209clean-files += config.pot linux.pot
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
Sam Ravnborg6e588f62007-12-09 20:11:15 +0100211# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
212PHONY += $(obj)/dochecklxdialog
213$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
214$(obj)/dochecklxdialog:
Arnaud Lacombe7080e472010-08-16 00:19:04 -0400215 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
Sam Ravnborg6e588f62007-12-09 20:11:15 +0100216
217always := dochecklxdialog
218
Sam Ravnborgaa1e5ef2007-08-12 23:15:44 +0200219# Add environment specific flags
220HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
Yuri Vasilevski70a6a0c2005-10-30 15:03:20 -0800221
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222# generated files seem to need this to find local include files
223HOSTCFLAGS_lex.zconf.o := -I$(src)
224HOSTCFLAGS_zconf.tab.o := -I$(src)
225
Arnaud Lacombe5a6f8d22011-06-01 16:14:47 -0400226HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
227HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228
Arnaud Lacombe5a6f8d22011-06-01 16:14:47 -0400229HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
Arnaud Lacombe1ea3ad42011-06-05 23:36:05 -0400230HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
231 -Wno-missing-prototypes
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232
Arnaud Lacombe7080e472010-08-16 00:19:04 -0400233HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
234
nir.tzachar@gmail.com692d97c2009-11-25 12:28:43 +0200235HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236$(obj)/qconf.o: $(obj)/.tmp_qtcheck
237
238ifeq ($(qconf-target),1)
Roman Zippelb3a52252005-11-21 21:32:38 -0800239$(obj)/.tmp_qtcheck: $(src)/Makefile
Linus Torvalds1da177e2005-04-16 15:20:36 -0700240-include $(obj)/.tmp_qtcheck
241
242# QT needs some extra effort...
243$(obj)/.tmp_qtcheck:
Roman Zippelb3a52252005-11-21 21:32:38 -0800244 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
Alexander Stein133c5f72010-08-31 17:34:37 +0200245 if ! pkg-config --exists QtCore 2> /dev/null; then \
246 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
247 pkg-config --exists qt 2> /dev/null && pkg=qt; \
248 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
249 if [ -n "$$pkg" ]; then \
250 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
251 libs="\$$(shell pkg-config $$pkg --libs)"; \
252 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
253 dir="$$(pkg-config $$pkg --variable=prefix)"; \
254 else \
255 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
256 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
257 done; \
258 if [ -z "$$dir" ]; then \
259 echo "*"; \
260 echo "* Unable to find any QT installation. Please make sure that"; \
261 echo "* the QT4 or QT3 development package is correctly installed and"; \
262 echo "* either qmake can be found or install pkg-config or set"; \
263 echo "* the QTDIR environment variable to the correct location."; \
264 echo "*"; \
265 false; \
266 fi; \
267 libpath=$$dir/lib; lib=qt; osdir=""; \
268 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
269 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
270 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
271 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
272 cflags="-I$$dir/include"; \
273 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
274 moc="$$dir/bin/moc"; \
275 fi; \
276 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
277 echo "*"; \
278 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
279 echo "*"; \
280 moc="/usr/bin/moc"; \
281 fi; \
Sam Ravnborgab919c02005-11-06 11:05:21 +0100282 else \
Michal Marek458452f2010-09-13 13:41:31 +0200283 cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
284 libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
Alexander Stein20f4ad82010-09-10 19:01:14 +0200285 binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
286 moc="$$binpath/bin/moc"; \
Roman Zippelb3a52252005-11-21 21:32:38 -0800287 fi; \
288 echo "KC_QT_CFLAGS=$$cflags" > $@; \
289 echo "KC_QT_LIBS=$$libs" >> $@; \
290 echo "KC_QT_MOC=$$moc" >> $@
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291endif
292
293$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
294
295ifeq ($(gconf-target),1)
296-include $(obj)/.tmp_gtkcheck
297
298# GTK needs some extra effort, too...
299$(obj)/.tmp_gtkcheck:
Adrian Bunk37193142006-01-02 11:25:30 +0100300 @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
301 if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302 touch $@; \
303 else \
304 echo "*"; \
305 echo "* GTK+ is present but version >= 2.0.0 is required."; \
306 echo "*"; \
307 false; \
308 fi \
309 else \
310 echo "*"; \
311 echo "* Unable to find the GTK+ installation. Please make sure that"; \
312 echo "* the GTK+ 2.0 development package is correctly installed..."; \
313 echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
314 echo "*"; \
315 false; \
316 fi
317endif
318
Roman Zippel7a884882005-11-08 21:34:51 -0800319$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
Linus Torvalds1da177e2005-04-16 15:20:36 -0700320
Arnaud Lacombe5a6f8d22011-06-01 16:14:47 -0400321$(obj)/qconf.o: $(obj)/qconf.moc
Linus Torvalds1da177e2005-04-16 15:20:36 -0700322
323$(obj)/%.moc: $(src)/%.h
Roman Zippelb3a52252005-11-21 21:32:38 -0800324 $(KC_QT_MOC) -i $< -o $@
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325
EGRY Gabor46d26312008-01-11 23:46:11 +0100326# Extract gconf menu items for I18N support
327$(obj)/gconf.glade.h: $(obj)/gconf.glade
Peter Foley2d80eb02011-04-26 18:16:53 -0400328 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
Peter Foleya24a1b82011-04-26 18:13:05 -0400329 $(obj)/gconf.glade
Linus Torvalds1da177e2005-04-16 15:20:36 -0700330
331###
Roman Zippel7a884882005-11-08 21:34:51 -0800332# The following requires flex/bison/gperf
Linus Torvalds1da177e2005-04-16 15:20:36 -0700333# By default we use the _shipped versions, uncomment the following line if
334# you are modifying the flex/bison src.
335# LKC_GENPARSER := 1
336
337ifdef LKC_GENPARSER
338
Roman Zippel491d7112005-11-08 21:34:50 -0800339$(obj)/zconf.tab.c: $(src)/zconf.y
340$(obj)/lex.zconf.c: $(src)/zconf.l
Roman Zippel7a884882005-11-08 21:34:51 -0800341$(obj)/zconf.hash.c: $(src)/zconf.gperf
Linus Torvalds1da177e2005-04-16 15:20:36 -0700342
343%.tab.c: %.y
Roman Zippel491d7112005-11-08 21:34:50 -0800344 bison -l -b $* -p $(notdir $*) $<
345 cp $@ $@_shipped
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346
347lex.%.c: %.l
Roman Zippel491d7112005-11-08 21:34:50 -0800348 flex -L -P$(notdir $*) -o$@ $<
349 cp $@ $@_shipped
Linus Torvalds1da177e2005-04-16 15:20:36 -0700350
Roman Zippel7a884882005-11-08 21:34:51 -0800351%.hash.c: %.gperf
352 gperf < $< > $@
353 cp $@ $@_shipped
354
Linus Torvalds1da177e2005-04-16 15:20:36 -0700355endif