blob: 3b00da3cf19e041b6cf0a3dc29db0a376db0ddd5 [file] [log] [blame]
Patrick Georgi0588d192009-08-12 15:00:51 +00001# ===========================================================================
2# Kernel configuration targets
3# These targets are used from top-level makefile
4
Patrick Georgi4647bb12015-06-11 09:45:00 +02005export LC_ALL=C
6export LANG=C
7
Patrick Georgidb6dd812015-06-11 09:55:43 +02008DEFCONFIG?=defconfig
9
Patrick Georgid5208402014-04-11 20:24:06 +020010PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
11 localmodconfig localyesconfig
Patrick Georgi0588d192009-08-12 15:00:51 +000012
Patrick Georgi26774f22009-11-21 19:54:02 +000013_OS=$(shell uname -s |cut -c-7)
14regex-objs=
15ifeq ($(_OS),MINGW32)
16 regex-objs=regex.o
17endif
18
Stefan Reinauered564992015-06-11 14:57:36 -070019Kconfig ?= src/Kconfig
Patrick Georgi0588d192009-08-12 15:00:51 +000020
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000021xconfig: $(objk)/qconf
Patrick Georgid5208402014-04-11 20:24:06 +020022 $< $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000023
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000024gconfig: $(objk)/gconf
Uwe Hermann6113c1c2012-04-12 21:39:27 +020025 cp -f $(srck)/gconf.glade $(objk)/gconf.glade
Patrick Georgid5208402014-04-11 20:24:06 +020026 $< $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000027
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000028menuconfig: $(objk)/mconf
Patrick Georgid5208402014-04-11 20:24:06 +020029 $< $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000030
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000031config: $(objk)/conf
Patrick Georgid5208402014-04-11 20:24:06 +020032 $< --oldaskconfig $(Kconfig)
33
34nconfig: $(objk)/nconf
35 $< $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000036
Patrick Georgi4ed5cb32016-02-11 22:04:55 +010037# Disable strict mode because oldconfig is typically used to clean up
38# templates and the like. The second invocation should already have sane data.
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000039oldconfig: $(objk)/conf
Patrick Georgi4ed5cb32016-02-11 22:04:55 +010040 KCONFIG_STRICT= $< --$@ $(Kconfig)
Patrick Georgid5208402014-04-11 20:24:06 +020041 $< --silentoldconfig $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000042
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000043silentoldconfig: $(objk)/conf
Patrick Georgid5208402014-04-11 20:24:06 +020044 $< --$@ $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000045
46# --- UNUSED, ignore ----------------------------------------------------------
Patrick Georgid5208402014-04-11 20:24:06 +020047localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
48 $(Q)mkdir -p include/generated
49 $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
50 $(Q)if [ -f .config ]; then \
51 cmp -s .tmp.config .config || \
52 (mv -f .config .config.old.1; \
53 mv -f .tmp.config .config; \
54 $(obj)/conf --silentoldconfig $(Kconfig); \
55 mv -f .config.old.1 .config.old) \
56 else \
57 mv -f .tmp.config .config; \
58 $(obj)/conf --silentoldconfig $(Kconfig); \
59 fi
60 $(Q)rm -f .tmp.config
61
Patrick Georgi0588d192009-08-12 15:00:51 +000062# Create new linux.pot file
63# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
Patrick Georgi0588d192009-08-12 15:00:51 +000064update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
Patrick Georgid5208402014-04-11 20:24:06 +020065 $(Q)echo " GEN config.pot"
66 $(Q)xgettext --default-domain=linux \
67 --add-comments --keyword=_ --keyword=N_ \
68 --from-code=UTF-8 \
69 --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
70 --directory=$(srctree) --directory=$(objtree) \
Patrick Georgi0588d192009-08-12 15:00:51 +000071 --output $(obj)/config.pot
Patrick Georgid5208402014-04-11 20:24:06 +020072 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
73 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
74 $(srctree)/arch/*/um/Kconfig`; \
Patrick Georgi0588d192009-08-12 15:00:51 +000075 do \
Patrick Georgid5208402014-04-11 20:24:06 +020076 echo " GEN $$i"; \
77 $(obj)/kxgettext $$i \
Patrick Georgi0588d192009-08-12 15:00:51 +000078 >> $(obj)/config.pot; \
79 done )
Patrick Georgid5208402014-04-11 20:24:06 +020080 $(Q)echo " GEN linux.pot"
81 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
Patrick Georgi0588d192009-08-12 15:00:51 +000082 --output $(obj)/linux.pot
Patrick Georgid5208402014-04-11 20:24:06 +020083 $(Q)rm -f $(obj)/config.pot
Patrick Georgi0588d192009-08-12 15:00:51 +000084# --- UNUSED, ignore ----------------------------------------------------------
85
Martin Rothf099e1b2015-06-07 20:30:28 -060086PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig savedefconfig
Patrick Georgi0588d192009-08-12 15:00:51 +000087
Patrick Georgid5208402014-04-11 20:24:06 +020088allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(objk)/conf
89 $< --$@ $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000090
Martin Rothf099e1b2015-06-07 20:30:28 -060091savedefconfig: $(objk)/conf
Patrick Georgidb6dd812015-06-11 09:55:43 +020092 $< --$@=$(DEFCONFIG) $(Kconfig)
Martin Rothf099e1b2015-06-07 20:30:28 -060093
Patrick Georgi9ebd65d2010-04-27 09:23:33 +000094defconfig: $(objk)/conf
Patrick Georgi0588d192009-08-12 15:00:51 +000095ifeq ($(KBUILD_DEFCONFIG),)
Stefan Reinauerb12a4482015-06-29 16:45:57 -070096 $< --defconfig $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +000097else
98 @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
Stefan Reinauerb12a4482015-06-29 16:45:57 -070099 $< --defconfig=$(KBUILD_DEFCONFIG) $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +0000100endif
101
Martin Roth56354d52015-08-18 14:30:27 -0600102olddefconfig: $(objk)/conf
103 $< --olddefconfig $(Kconfig)
104
Patrick Georgi9ebd65d2010-04-27 09:23:33 +0000105%_defconfig: $(objk)/conf
Stefan Reinauerb12a4482015-06-29 16:45:57 -0700106 $< --defconfig=configs/$@ $(Kconfig)
Patrick Georgi0588d192009-08-12 15:00:51 +0000107
108# Help text used by make help
Martin Rothc24f3d62015-11-25 12:50:25 -0700109help_kconfig help::
110 @echo '*** Kconfig Targets ***'
Patrick Georgi0588d192009-08-12 15:00:51 +0000111 @echo ' config - Update current config utilising a line-oriented program'
Patrick Georgid5208402014-04-11 20:24:06 +0200112 @echo ' nconfig - Update current config utilising a ncurses menu based program'
Patrick Georgi0588d192009-08-12 15:00:51 +0000113 @echo ' menuconfig - Update current config utilising a menu based program'
114 @echo ' xconfig - Update current config utilising a QT based front-end'
115 @echo ' gconfig - Update current config utilising a GTK based front-end'
116 @echo ' oldconfig - Update current config utilising a provided .config as base'
Martin Rothbfe6f6a2016-06-22 13:34:42 -0600117 @echo ' olddefconfig - Same as oldconfig, but with default answer to all new options'
Martin Roth76f14b22015-11-18 13:09:23 -0700118 #@echo ' localmodconfig - Update current config disabling modules not loaded'
119 #@echo ' localyesconfig - Update current config converting local mods to core'
Patrick Georgid5208402014-04-11 20:24:06 +0200120 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
Patrick Georgi0588d192009-08-12 15:00:51 +0000121 @echo ' defconfig - New config with default answer to all options'
Martin Rothf099e1b2015-06-07 20:30:28 -0600122 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
Martin Roth76f14b22015-11-18 13:09:23 -0700123 #@echo ' allnoconfig - New config where all options are answered with no'
124 #@echo ' allyesconfig - New config where all options are accepted with yes'
125 #@echo ' allmodconfig - New config selecting modules when possible'
126 #@echo ' randconfig - New config with random answer to all options'
127 @echo
Patrick Georgi0588d192009-08-12 15:00:51 +0000128
129# lxdialog stuff
130check-lxdialog := $(srck)/lxdialog/check-lxdialog.sh
131
132# Use recursively expanded variables so we do not call gcc unless
133# we really need to do so. (Do not call gcc as part of make mrproper)
Patrick Georgid5208402014-04-11 20:24:06 +0200134HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
135 -DLOCALE
Patrick Georgi0588d192009-08-12 15:00:51 +0000136HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
137
Patrick Georgi0588d192009-08-12 15:00:51 +0000138
139# ===========================================================================
140# Shared Makefile for the various kconfig executables:
141# conf: Used for defconfig, oldconfig and related targets
Patrick Georgid5208402014-04-11 20:24:06 +0200142# nconf: Used for the nconfig target.
143# Utilizes ncurses
144# mconf: Used for the menuconfig target
Patrick Georgi0588d192009-08-12 15:00:51 +0000145# Utilizes the lxdialog package
146# qconf: Used for the xconfig target
147# Based on QT which needs to be installed to compile it
148# gconf: Used for the gconfig target
149# Based on GTK which needs to be installed to compile it
150# object files used by all kconfig flavours
151
152lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
153lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
154
Patrick Georgi26774f22009-11-21 19:54:02 +0000155conf-objs := conf.o zconf.tab.o $(regex-objs)
Patrick Georgid5208402014-04-11 20:24:06 +0200156mconf-objs := mconf.o zconf.tab.o $(lxdialog) $(regex-objs)
157nconf-objs := nconf.o zconf.tab.o nconf.gui.o
Patrick Georgi0588d192009-08-12 15:00:51 +0000158kxgettext-objs := kxgettext.o zconf.tab.o
Patrick Georgid5208402014-04-11 20:24:06 +0200159qconf-cxxobjs := qconf.o
160qconf-objs := zconf.tab.o
161gconf-objs := gconf.o zconf.tab.o
Patrick Georgi0588d192009-08-12 15:00:51 +0000162
Patrick Georgid5208402014-04-11 20:24:06 +0200163hostprogs-y := conf
164
165ifeq ($(MAKECMDGOALS),nconfig)
166 hostprogs-y += nconf
167endif
Patrick Georgi0588d192009-08-12 15:00:51 +0000168
169ifeq ($(MAKECMDGOALS),menuconfig)
170 hostprogs-y += mconf
171endif
172
Patrick Georgid5208402014-04-11 20:24:06 +0200173ifeq ($(MAKECMDGOALS),update-po-config)
174 hostprogs-y += kxgettext
175endif
176
Patrick Georgi0588d192009-08-12 15:00:51 +0000177ifeq ($(MAKECMDGOALS),xconfig)
178 qconf-target := 1
179endif
180ifeq ($(MAKECMDGOALS),gconfig)
181 gconf-target := 1
182endif
183
184
185ifeq ($(qconf-target),1)
Patrick Georgid5208402014-04-11 20:24:06 +0200186 hostprogs-y += qconf
Patrick Georgi0588d192009-08-12 15:00:51 +0000187endif
188
189ifeq ($(gconf-target),1)
Patrick Georgid5208402014-04-11 20:24:06 +0200190 hostprogs-y += gconf
Patrick Georgi0588d192009-08-12 15:00:51 +0000191endif
192
Patrick Georgid5208402014-04-11 20:24:06 +0200193clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
194clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
195clean-files += mconf qconf gconf nconf
196clean-files += config.pot linux.pot
Patrick Georgi0588d192009-08-12 15:00:51 +0000197
198# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
199PHONY += $(objk)/dochecklxdialog
200$(addprefix $(obj)/,$(lxdialog)): $(objk)/dochecklxdialog
201$(objk)/dochecklxdialog:
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000202 $(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
Patrick Georgi0588d192009-08-12 15:00:51 +0000203
204always := dochecklxdialog
205
206# Add environment specific flags
207HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srck)/check.sh $(HOSTCC) $(HOSTCFLAGS))
208
209# generated files seem to need this to find local include files
Patrick Georgid5208402014-04-11 20:24:06 +0200210HOSTCFLAGS_zconf.lex.o := -I$(src)
Patrick Georgi0588d192009-08-12 15:00:51 +0000211HOSTCFLAGS_zconf.tab.o := -I$(src)
212
Patrick Georgid5208402014-04-11 20:24:06 +0200213LEX_PREFIX_zconf := zconf
214YACC_PREFIX_zconf := zconf
215
Patrick Georgi0588d192009-08-12 15:00:51 +0000216HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
Patrick Georgid5208402014-04-11 20:24:06 +0200217HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
Patrick Georgi0588d192009-08-12 15:00:51 +0000218
219HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
220HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
Patrick Georgid5208402014-04-11 20:24:06 +0200221 -Wno-missing-prototypes
222
223HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
224
225HOSTLOADLIBES_nconf = $(shell \
226 pkg-config --libs menu panel ncurses 2>/dev/null \
227 || echo "-lmenu -lpanel -lncurses" )
Patrick Georgi0588d192009-08-12 15:00:51 +0000228
229$(objk)/qconf.o: $(objk)/.tmp_qtcheck
230
231ifeq ($(qconf-target),1)
232$(objk)/.tmp_qtcheck: $(srck)/Makefile
233-include $(objk)/.tmp_qtcheck
234
235# QT needs some extra effort...
Patrick Georgi9ebd65d2010-04-27 09:23:33 +0000236$(objk)/.tmp_qtcheck:
Patrick Georgid5208402014-04-11 20:24:06 +0200237 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
zbao11a262c2016-01-22 18:54:22 +0800238 if pkg-config --exists Qt5Core; then \
239 cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
240 libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
241 moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
242 elif pkg-config --exists QtCore; then \
243 cflags=`pkg-config --cflags QtCore QtGui`; \
244 libs=`pkg-config --libs QtCore QtGui`; \
245 moc=`pkg-config --variable=moc_location QtCore`; \
Patrick Georgi0588d192009-08-12 15:00:51 +0000246 else \
zbao11a262c2016-01-22 18:54:22 +0800247 echo >&2 "*"; \
248 echo >&2 "* Could not find Qt via pkg-config."; \
249 echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
250 echo >&2 "*"; \
251 exit 1; \
Patrick Georgi0588d192009-08-12 15:00:51 +0000252 fi; \
253 echo "KC_QT_CFLAGS=$$cflags" > $@; \
254 echo "KC_QT_LIBS=$$libs" >> $@; \
255 echo "KC_QT_MOC=$$moc" >> $@
256endif
257
258$(objk)/gconf.o: $(objk)/.tmp_gtkcheck
259
260ifeq ($(gconf-target),1)
261-include $(objk)/.tmp_gtkcheck
262
263# GTK needs some extra effort, too...
Patrick Georgi9ebd65d2010-04-27 09:23:33 +0000264$(objk)/.tmp_gtkcheck:
Patrick Georgi0588d192009-08-12 15:00:51 +0000265 @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
266 if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
267 touch $@; \
268 else \
Patrick Georgid5208402014-04-11 20:24:06 +0200269 echo >&2 "*"; \
270 echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
271 echo >&2 "*"; \
Patrick Georgi0588d192009-08-12 15:00:51 +0000272 false; \
273 fi \
274 else \
Patrick Georgid5208402014-04-11 20:24:06 +0200275 echo >&2 "*"; \
276 echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
277 echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
278 echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
279 echo >&2 "*"; \
Patrick Georgi0588d192009-08-12 15:00:51 +0000280 false; \
281 fi
282endif
283
284# --- UNUSED, ignore ----------------------------------------------------------
285ifdef UNUSED
Patrick Georgid5208402014-04-11 20:24:06 +0200286$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
Patrick Georgi0588d192009-08-12 15:00:51 +0000287
288$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
289
290$(obj)/gconf.o: $(obj)/lkc_defs.h
291
Patrick Georgid5208402014-04-11 20:24:06 +0200292$(obj)/%.moc: $(srck)/%.h
Patrick Georgi0588d192009-08-12 15:00:51 +0000293 $(KC_QT_MOC) -i $< -o $@
294
295$(obj)/lkc_defs.h: $(src)/lkc_proto.h
296 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
297
298# Extract gconf menu items for I18N support
299$(obj)/gconf.glade.h: $(obj)/gconf.glade
300 intltool-extract --type=gettext/glade $(obj)/gconf.glade
301endif
302# --- UNUSED, ignore ----------------------------------------------------------
303
304###
305# The following requires flex/bison/gperf
306# By default we use the _shipped versions, uncomment the following line if
307# you are modifying the flex/bison src.
308# LKC_GENPARSER := 1
309
310ifdef LKC_GENPARSER
311
312# --- UNUSED, ignore ----------------------------------------------------------
313$(obj)/zconf.tab.c: $(src)/zconf.y
Patrick Georgid5208402014-04-11 20:24:06 +0200314$(obj)/zconf.lex.c: $(src)/zconf.l
Patrick Georgi0588d192009-08-12 15:00:51 +0000315$(obj)/zconf.hash.c: $(src)/zconf.gperf
316
317%.tab.c: %.y
Stefan Reinauerf78a09b2015-04-03 20:01:38 +0200318 bison -t -l -b $* -p $(notdir $*) $<
Patrick Georgi39618342015-05-10 17:58:48 +0200319
320%.tab.c_shipped: %.tab.c
321 cp $< $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000322
Stefan Reinauerf78a09b2015-04-03 20:01:38 +0200323%.lex.c: %.l
Patrick Georgi0588d192009-08-12 15:00:51 +0000324 flex -L -P$(notdir $*) -o$@ $<
Patrick Georgi39618342015-05-10 17:58:48 +0200325
326%.lex.c_shipped: %.lex.c
327 cp $< $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000328
329%.hash.c: %.gperf
330 gperf < $< > $@
331 cp $@ $@_shipped
332# --- UNUSED, ignore ----------------------------------------------------------
333
334endif
335
336$(objk)/qconf: $(patsubst %,$(objk)/%,$(qconf-cxxobjs)) \
337 $(patsubst %,$(objk)/%,$(qconf-objs))
Patrick Georgid5208402014-04-11 20:24:06 +0200338 $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^ $(HOSTLOADLIBES_qconf)
Patrick Georgi0588d192009-08-12 15:00:51 +0000339$(objk)/gconf: $(patsubst %,$(objk)/%,$(gconf-objs))
Patrick Georgid5208402014-04-11 20:24:06 +0200340 $(HOSTCC) $(HOSTCFLAGS) -o $@ $^ $(HOSTLOADLIBES_gconf)
Patrick Georgi0588d192009-08-12 15:00:51 +0000341$(objk)/mconf: $(patsubst %,$(objk)/%,$(mconf-objs))
Patrick Georgid5208402014-04-11 20:24:06 +0200342 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -o $@ $(HOST_LOADLIBES)
343$(objk)/nconf: $(patsubst %,$(objk)/%,$(nconf-objs))
344 $(HOSTCC) $(HOSTCFLAGS) -o $@ $^ $(HOSTLOADLIBES_nconf)
Patrick Georgi0588d192009-08-12 15:00:51 +0000345$(objk)/conf: $(patsubst %,$(objk)/%,$(conf-objs))
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000346 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
Patrick Georgi0588d192009-08-12 15:00:51 +0000347
348$(objk)/mconf.o: $(srck)/mconf.c
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000349 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
Patrick Georgid5208402014-04-11 20:24:06 +0200350$(objk)/nconf.o: $(srck)/nconf.c
351 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
352$(objk)/nconf.gui.o: $(srck)/nconf.gui.c
353 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
Patrick Georgi0588d192009-08-12 15:00:51 +0000354$(objk)/conf.o: $(srck)/conf.c
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000355 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
Patrick Georgi26774f22009-11-21 19:54:02 +0000356$(objk)/regex.o: $(srck)/regex.c
357 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -DHAVE_STRING_H -c -o $@ $<
Patrick Georgi0588d192009-08-12 15:00:51 +0000358
Patrick Georgid5208402014-04-11 20:24:06 +0200359$(objk)/zconf.tab.o: $(objk)/zconf.tab.c $(objk)/zconf.lex.c \
Patrick Georgi0588d192009-08-12 15:00:51 +0000360 $(objk)/zconf.hash.c
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000361 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $(objk)/zconf.tab.c
Patrick Georgi0588d192009-08-12 15:00:51 +0000362$(objk)/qconf.o: $(srck)/qconf.cc $(objk)/qconf.moc $(objk)/lkc_defs.h
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000363 $(HOSTCXX) $(HOSTCXXFLAGS) $(HOSTCXXFLAGS_qconf.o) -c -o $@ $<
Patrick Georgi0588d192009-08-12 15:00:51 +0000364$(objk)/gconf.o: $(srck)/gconf.c $(objk)/lkc_defs.h
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000365 $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_gconf.o) -c -o $@ $<
Patrick Georgi0588d192009-08-12 15:00:51 +0000366$(objk)/%.moc: $(srck)/%.h
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000367 $(KC_QT_MOC) -i $< -o $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000368$(objk)/lkc_defs.h: $(srck)/lkc_proto.h
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000369 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
Patrick Georgi0588d192009-08-12 15:00:51 +0000370
Patrick Georgid5208402014-04-11 20:24:06 +0200371$(objk)/zconf.lex.c: $(srck)/zconf.lex.c_shipped
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000372 cp $< $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000373$(objk)/zconf.hash.c: $(srck)/zconf.hash.c_shipped
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000374 cp $< $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000375$(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000376 cp $< $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000377
378$(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \
379 $(patsubst %,$(objk)/lxdialog/%,$(lxdialog))
Christian Ruppert74b65992011-12-17 21:56:05 +0100380 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
381 $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) $(HOST_LOADLIBES) -o $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000382$(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c
Patrick Georgi2b7418e2009-08-25 19:38:46 +0000383 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@
Patrick Georgi0588d192009-08-12 15:00:51 +0000384
Patrick Georgib3a18ac2012-09-13 22:13:33 +0200385$(objk)/%.o: HOSTCFLAGS+=-I$(srck) -I$(objk)
386$(objk)/%.o: HOSTCXXFLAGS+=-I$(srck) -I$(objk)