aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig_parser/Makefile
blob: 68fbb9322026e8d29387c571e4c91b993065ddcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.SUFFIXES:

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

clean:
	$(RM) kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
	$(RM) parser