summaryrefslogtreecommitdiff
path: root/openwrt/scripts/config/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-04-20 20:17:34 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-04-20 20:17:34 +0000
commit43ebd5a027a96bc548c03ca308df05a6926d5e91 (patch)
treee993c15374e53b9732e8876f4c26398bf53b7c1d /openwrt/scripts/config/Makefile
parent4870d7e8876b6aef4590571315dc5a9b7b1af6ea (diff)
downloadmtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.zip
mtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.tar.gz
mtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.tar.bz2
add kconfig from linux 2.6 to scripts/config
SVN-Revision: 3682
Diffstat (limited to 'openwrt/scripts/config/Makefile')
-rw-r--r--openwrt/scripts/config/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/openwrt/scripts/config/Makefile b/openwrt/scripts/config/Makefile
new file mode 100644
index 0000000..04e8330
--- /dev/null
+++ b/openwrt/scripts/config/Makefile
@@ -0,0 +1,49 @@
+# ===========================================================================
+# Kernel configuration targets
+# These targets are used from top-level makefile
+
+# ===========================================================================
+# Shared Makefile for the various kconfig executables:
+# conf: Used for defconfig, oldconfig and related targets
+# mconf: Used for the mconfig target.
+# Utilizes the lxdialog package
+# object files used by all kconfig flavours
+
+conf-objs := conf.o zconf.tab.o
+mconf-objs := mconf.o zconf.tab.o
+
+clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
+ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
+
+all: conf mconf lxdialog
+
+.PHONY: lxdialog
+lxdialog:
+ $(MAKE) -C lxdialog
+
+conf: $(conf-objs)
+mconf: $(mconf-objs)
+
+clean:
+ rm -f *.o $(clean-files) conf mconf
+ $(MAKE) -C lxdialog clean
+
+zconf.tab.o: lex.zconf.c zconf.hash.c
+
+kconfig_load.o: lkc_defs.h
+
+lkc_defs.h: $(src)/lkc_proto.h
+ sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
+
+zconf.tab.c: zconf.y
+lex.zconf.c: zconf.l
+zconf.hash.c: zconf.gperf
+
+%.tab.c: %.y
+ bison -l -b $* -p $(notdir $*) $< && cp $@ $@_shipped || cp $@_shipped $@
+
+lex.%.c: %.l
+ flex -L -P$(notdir $*) -o$@ $< && cp $@ $@_shipped || cp $@_shipped $@
+
+%.hash.c: %.gperf
+ gperf < $< > $@ && cp $@ $@_shipped || cp $@_shipped $@