PROGRAMS = postlicyd
+GENERATED = tokens.h tokens.c
+
postlicyd_SOURCES = \
- str.h buffer.h job.h postfix.h gai.h query.h \
- str.c buffer.c job.c postfix.c gai.c \
- postlicyd.c
+ str.h buffer.h job.h postfix.h gai.h \
+ str.c buffer.c job.c postfix.c gai.c \
+ postlicyd.c $(GENERATED)
postlicyd_LIBADD = -lanl
$(RM) .*.o
distclean: clean
+ $(RM) $(GENERATED)
tags: .tags
.tags: $(shell git ls-files | egrep '\.[hc]$$')
( echo "package headache not installed" ; exit 1 )
@git ls-files | egrep '(\.h|\.c|Makefile|*\.mk)$$' | xargs -t headache $(HEADACHEOPTS)
+%.c: %.sh
+ ./$< $@ || ($(RM) $@; exit 1)
+
+%.h: %.sh
+ ./$< $@ || ($(RM) $@; exit 1)
+
.%.o: %.c Makefile
$(CC) $(CFLAGS) -MMD -MT ".$*.d $@" -MF .$*.d -g -c -o $@ $<