summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-12-03 01:40:38 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-12-03 01:40:38 +0000
commite499866cde13bb04b65e4aaac4f229cd8811f7f4 (patch)
treee0a18657f6bb8b74398ec43f7bbadb949f4724c0 /src/Makefile
parentremoved useless source address resolving type option (diff)
added config file parser
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@24 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
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