# OK, OK. This Makefile includes some ugly hard-coded paths.  Yes, I
# am planning on using some real build environment such as autoconf
# eventually. For now, change whatever you need to here:

LIBSTROKE_CFLAGS  = -I/usr/local/include
LIBSTROKE_LDFLAGS = -L/usr/local/lib
X_LDFLAGS         = -L/usr/X11R6/lib

CFLAGS = -Wall ${LIBSTROKE_CFLAGS}
LDFLAGS = ${LIBSTROKE_LDFLAGS} ${X_LDFLAGS}

.PHONY: all clean

all: xstroke

xstroke: xstroke.o rec_file.o rec_node.o xmalloc.o
	${CC} -o xstroke $^ ${LDFLAGS} -lstroke -lX11 -lXtst

xstroke.o: xmalloc.h rec_node.h rec_file.h

rec_node.o: rec_node.h xmalloc.h

rec_file.o: rec_node.h rec_file.h xmalloc.h

xmalloc.o: xmalloc.h

clean:
	rm -f xstroke *.o
