#define IHaveSubdirs
SUBDIRS=etc
CDEBUGFLAGS=-g -ansi -ansi-error -Wall -pedantic
YFLAGS=-d
LOCAL_LIBRARIES=$(XTESTLIB) $(XLIB) $(XRENDERLIB) $(XFTLIB) -lfontconfig -lm -ldl -lpthread -lXpm
FLEX=flex
OBJS=xstroke.o args.o backing.o bresenham.o brush.o control_win.o stroke.o matrix.o \
     action.o action_item.o feature.o gesture.o log.o option.o sprintf_alloc.o \
     rec.o rec_callback.o rec_history.o rec_lex.o rec_mode.o rec_parse.o \
     rec_engine.o grid.o regex_feature.o fixed.o \
     anchor_engine.o dir_engine.o grid_engine.o raw_engine.o \
     xlp.o xlp_callback.o xlp_color.o xlp_timeout.o xlp_win.o tray.o
SRCS=xstroke.c args.c backing.c bresenham.c brush.c control_win.c stroke.c matrix.c \
     action.c action_item.c feature.c gesture.c log.c option.c sprintf_alloc.c \
     rec.c rec_callback.c rec_history.c rec_mode.c \
     rec_engine.c grid.c regex_feature.c fixed.c \
     anchor_engine.c dir_engine.c grid_engine.c raw_engine.c \
     xlp.c xlp_callback.c xlp_color.c xlp_timeout.c xlp_win.c tray.c

ComplexProgramTarget(xstroke)

rec.c: rec_parse.h

rec_parse.h: rec_parse_tab.h

rec_parse_tab.h: rec_parse.c
	mv y.tab.h $@

rec_parse.c: rec_parse.y rec.h rec_mode.h gesture.h action.h feature.h option.h

rec_lex.c: rec_lex.l rec.h rec_mode.h gesture.h action.h feature.h option.h rec_parse.h rec_lex.h sprintf_alloc.h
	${FLEX} -t rec_lex.l > $@

clean::
	rm -f rec_lex.c rec_parse.c y.tab.h rec_parse_tab.h

