aboutsummaryrefslogtreecommitdiff
path: root/programs/src/kconfig_parser/Makefile
blob: 6aee15db34011ad7c7833c2c3bff5be4885c70b9 (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
25
26
27
.SUFFIXES:

all: ../../kconfig_parser


INPUT_FILES  = kconfig_parser.c
INPUT_FILES += kconfig/zconf.tab.c \
			   cnfexpr.c \
			   symlist.c \
			   output.c
CFLAGS = -O0 -w -ggdb

../../kconfig_parser: $(INPUT_FILES) kconfig/zconf.lex.c kconfig/zconf.hash.c
	gcc $(CFLAGS) -o $@ $(INPUT_FILES)

%.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) ../../kconfig_parser