diff options
Diffstat (limited to 'scripts/kconfig_parser/Makefile')
-rw-r--r-- | scripts/kconfig_parser/Makefile | 24 |
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 |