SHELL	= /bin/sh
SRCS	= trivial-rewrite.c rewrite.c resolve.c transport.c
OBJS	= trivial-rewrite.o rewrite.o resolve.o transport.o
HDRS	= 
TESTSRC	= 
DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
LIB	= 
TESTPROG= 
PROG	= trivial-rewrite
LIBS	= ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
LIB_DIR	= ../../lib
INC_DIR	= ../../include
BIN_DIR	= ../../libexec

.c.o:;	$(CC) $(CFLAGS) -c $*.c

all:	$(PROG) $(LIB)

$(PROG): $(OBJS) $(LIBS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)

Makefile: Makefile.in
	(echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@

test:	$(TESTPROG)

tests:	test

$(BIN_DIR)/$(PROG): $(PROG)
	cp $(PROG) $@

update: $(BIN_DIR)/$(PROG)

printfck: $(OBJS) $(PROG)
	rm -rf printfck
	mkdir printfck
	cp *.h printfck
	sed '1,/^# do not edit/!d' Makefile >printfck/Makefile
	set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done
	cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o`

lint:
	lint $(DEFS) $(SRCS) $(LINTFIX)

clean:
	rm -f *.o *core trivial-rewrite $(TESTPROG) junk $(LIB) 
	rm -rf printfck

tidy:	clean

depend: $(MAKES)
	(sed '1,/^# do not edit/!d' Makefile.in; \
	set -e; for i in [a-z][a-z0-9]*.c; do \
	    $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' -e 'p' -e '}'; \
	done) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
	@$(EXPORT) make -f Makefile.in Makefile 1>&2

# do not edit below this line - it is generated by 'make depend'
resolve.o: resolve.c
resolve.o: ../../include/sys_defs.h
resolve.o: ../../include/msg.h
resolve.o: ../../include/vstring.h
resolve.o: ../../include/vbuf.h
resolve.o: ../../include/vstream.h
resolve.o: ../../include/vstring_vstream.h
resolve.o: ../../include/split_at.h
resolve.o: ../../include/valid_hostname.h
resolve.o: ../../include/stringops.h
resolve.o: ../../include/mymalloc.h
resolve.o: ../../include/mail_params.h
resolve.o: ../../include/mail_proto.h
resolve.o: ../../include/iostuff.h
resolve.o: ../../include/attr.h
resolve.o: ../../include/resolve_local.h
resolve.o: ../../include/mail_conf.h
resolve.o: ../../include/quote_822_local.h
resolve.o: ../../include/quote_flags.h
resolve.o: ../../include/tok822.h
resolve.o: ../../include/resolve_clnt.h
resolve.o: ../../include/domain_list.h
resolve.o: ../../include/match_list.h
resolve.o: ../../include/match_ops.h
resolve.o: ../../include/string_list.h
resolve.o: ../../include/match_parent_style.h
resolve.o: ../../include/maps.h
resolve.o: ../../include/dict.h
resolve.o: ../../include/argv.h
resolve.o: ../../include/mail_addr_find.h
resolve.o: ../../include/valid_mailhost_addr.h
resolve.o: trivial-rewrite.h
resolve.o: transport.h
rewrite.o: rewrite.c
rewrite.o: ../../include/sys_defs.h
rewrite.o: ../../include/msg.h
rewrite.o: ../../include/vstring.h
rewrite.o: ../../include/vbuf.h
rewrite.o: ../../include/vstream.h
rewrite.o: ../../include/vstring_vstream.h
rewrite.o: ../../include/split_at.h
rewrite.o: ../../include/mail_params.h
rewrite.o: ../../include/mail_proto.h
rewrite.o: ../../include/iostuff.h
rewrite.o: ../../include/attr.h
rewrite.o: ../../include/resolve_local.h
rewrite.o: ../../include/tok822.h
rewrite.o: ../../include/resolve_clnt.h
rewrite.o: ../../include/mail_conf.h
rewrite.o: trivial-rewrite.h
transport.o: transport.c
transport.o: ../../include/sys_defs.h
transport.o: ../../include/msg.h
transport.o: ../../include/stringops.h
transport.o: ../../include/vstring.h
transport.o: ../../include/vbuf.h
transport.o: ../../include/mymalloc.h
transport.o: ../../include/split_at.h
transport.o: ../../include/dict.h
transport.o: ../../include/vstream.h
transport.o: ../../include/argv.h
transport.o: ../../include/strip_addr.h
transport.o: ../../include/mail_params.h
transport.o: ../../include/maps.h
transport.o: ../../include/match_parent_style.h
transport.o: ../../include/match_ops.h
transport.o: ../../include/mail_proto.h
transport.o: ../../include/iostuff.h
transport.o: ../../include/attr.h
transport.o: transport.h
trivial-rewrite.o: trivial-rewrite.c
trivial-rewrite.o: ../../include/sys_defs.h
trivial-rewrite.o: ../../include/msg.h
trivial-rewrite.o: ../../include/vstring.h
trivial-rewrite.o: ../../include/vbuf.h
trivial-rewrite.o: ../../include/vstream.h
trivial-rewrite.o: ../../include/vstring_vstream.h
trivial-rewrite.o: ../../include/split_at.h
trivial-rewrite.o: ../../include/stringops.h
trivial-rewrite.o: ../../include/dict.h
trivial-rewrite.o: ../../include/argv.h
trivial-rewrite.o: ../../include/events.h
trivial-rewrite.o: ../../include/mail_params.h
trivial-rewrite.o: ../../include/mail_proto.h
trivial-rewrite.o: ../../include/iostuff.h
trivial-rewrite.o: ../../include/attr.h
trivial-rewrite.o: ../../include/resolve_local.h
trivial-rewrite.o: ../../include/mail_conf.h
trivial-rewrite.o: ../../include/resolve_clnt.h
trivial-rewrite.o: ../../include/rewrite_clnt.h
trivial-rewrite.o: ../../include/tok822.h
trivial-rewrite.o: ../../include/mail_addr.h
trivial-rewrite.o: ../../include/mail_server.h
trivial-rewrite.o: trivial-rewrite.h
trivial-rewrite.o: transport.h
trivial-rewrite.o: ../../include/maps.h
