aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig_parser/Makefile
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-03-26 15:17:05 +0100
committerKarel Kočí <cynerd@email.cz>2015-03-26 15:17:05 +0100
commita457b9823e4c46b5d7bc7d5800008a483502ad32 (patch)
tree794e88f8a1416e2d317a7aa0af4a1ef973c710fd /scripts/kconfig_parser/Makefile
parentf91e9e472d50795b6e67dfb3905559800a3bef66 (diff)
downloadlinux-conf-perf-a457b9823e4c46b5d7bc7d5800008a483502ad32.tar.gz
linux-conf-perf-a457b9823e4c46b5d7bc7d5800008a483502ad32.tar.bz2
linux-conf-perf-a457b9823e4c46b5d7bc7d5800008a483502ad32.zip
kconfig_parser moved from programs to scripts
This way all executable code is inside scripts directory.
Diffstat (limited to 'scripts/kconfig_parser/Makefile')
-rw-r--r--scripts/kconfig_parser/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/kconfig_parser/Makefile b/scripts/kconfig_parser/Makefile
new file mode 100644
index 0000000..a853f47
--- /dev/null
+++ b/scripts/kconfig_parser/Makefile
@@ -0,0 +1,24 @@
+.SUFFIXES:
+
+KCPARSER_INFILES = parser.c \
+ cnfexpr.c \
+ symlist.c \
+ output.c
+KCPARSER_INFILES += kconfig/zconf.tab.c
+KCPARSER_CFLAGS = -O0 -w -ggdb
+
+parser: $(KCPARSER_INFILES) kconfig/zconf.lex.c kconfig/zconf.hash.c
+ gcc $(KCPARSER_CFLAGS) -o $@ $(KCPARSER_INFILES)
+
+%.hash.c: %.gperf
+ gperf -t --output-file $@ -a -C -E -g -k '1,3,$$' -p -t $<
+
+%.lex.c: %.l
+ flex -o $@ -L -P zconf $<
+
+%.tab.c: %.y kconfig/zconf.lex.c kconfig/zconf.hash.c
+ bison -o $@ $< -p zconf -t -l
+
+clean:
+ $(RM) kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
+ $(RM) parser