summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 122abf4..7ee758e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -33,6 +33,8 @@ EXECUTABLE := tcpproxy
C_OBJS := log.o \
options.o \
+ cfg_scan.o \
+ cfg_parse.o \
slist.o \
string_list.o \
sig_handler.o \
@@ -47,6 +49,14 @@ C_SRCS := $(C_OBJS:%.o=%.c)
all: $(EXECUTABLE)
+cfg_scan.c: cfg_scan.lex cfg_parse.h
+ $(FLEX) -Cem -o $@ cfg_scan.lex
+
+cfg_parse.h: cfg_parse.c
+
+cfg_parse.c: cfg_parse.y
+ $(BISON) -d -o $@ $<
+
%.d: %.c
@set -e; rm -f $@; \
$(CC) -MM $(CFLAGS) $< > $@.$$$$; \
@@ -77,6 +87,8 @@ clean:
rm -f *.o
rm -f *.d
rm -f *.d.*
+ rm -f cfg_scan.c
+ rm -f cfg_parse.c cfg_parse.h
rm -f $(EXECUTABLE)
rm -f $(EXECUTABLE).exe