From a457b9823e4c46b5d7bc7d5800008a483502ad32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 26 Mar 2015 15:17:05 +0100 Subject: kconfig_parser moved from programs to scripts This way all executable code is inside scripts directory. --- scripts/kconfig_parser/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/kconfig_parser/Makefile (limited to 'scripts/kconfig_parser/Makefile') 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 -- cgit v1.2.3