aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig_parser/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig_parser/Makefile')
-rw-r--r--scripts/kconfig_parser/Makefile23
1 files changed, 9 insertions, 14 deletions
diff --git a/scripts/kconfig_parser/Makefile b/scripts/kconfig_parser/Makefile
index 68fbb93..f582673 100644
--- a/scripts/kconfig_parser/Makefile
+++ b/scripts/kconfig_parser/Makefile
@@ -1,24 +1,19 @@
+.PHONY: all clean
.SUFFIXES:
+all: parser
+
+KCONFIG_PREFIX = ../shared/kconfig
+include $(KCONFIG_PREFIX)/files.mk
+
SRC = parser.c \
cnfexpr.c \
symlist.c \
output.c
-SRC += kconfig/zconf.tab.c
CFLAGS = -O0 -w -ggdb
-parser: $(SRC) kconfig/zconf.lex.c kconfig/zconf.hash.c
- gcc $(CFLAGS) -o $@ $(SRC)
-
-%.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
+parser: $(SRC) $(KCONFIG_SRC)
+ gcc $(CFLAGS) -o $@ $^ -I$(KCONFIG_PREFIX)
-clean:
- $(RM) kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
+clean::
$(RM) parser