SHELL	= /bin/sh
SRCS	= master.c master_conf.c master_ent.c master_sig.c master_avail.c \
	master_spawn.c master_service.c master_status.c master_listen.c \
	master_proto.c single_server.c multi_server.c master_vars.c \
	master_wakeup.c master_flow.c mail_flow.c
OBJS	= master.o master_conf.o master_ent.o master_sig.o master_avail.o \
	master_spawn.o master_service.o master_status.o master_listen.o \
	master_vars.o master_wakeup.o master_flow.o
LIB_OBJ	= single_server.o multi_server.o trigger_server.o master_proto.o \
	mail_flow.o
HDRS	= mail_server.h master_proto.h mail_flow.h
INT_HDR	= master.h
DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
LIB	= libmaster.a
PROG	= master
TESTPROG= 
LIBS	= ../../lib/libglobal.a ../../lib/libutil.a
LIB_DIR	= ../../lib
INC_DIR	= ../../include
BIN_DIR	= ../../libexec

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

all:	$(PROG) $(LIB)

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

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

test:	$(TESTPROG)

tests:	test

$(LIB):	$(LIB_OBJ)
	$(AR) $(ARFL) $(LIB) $?
	$(RANLIB) $(LIB)

$(LIB_DIR)/$(LIB): $(LIB)
	cp $(LIB) $(LIB_DIR)/$(LIB)
	$(RANLIB) $(LIB_DIR)/$(LIB)

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

update: $(LIB_DIR)/$(LIB) $(BIN_DIR)/$(PROG)
	-for i in $(HDRS); \
	do \
	  cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
	done
	cd $(INC_DIR); chmod 644 $(HDRS)

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 $(PROG) 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'
mail_flow.o: mail_flow.c
mail_flow.o: ../../include/sys_defs.h
mail_flow.o: ../../include/msg.h
mail_flow.o: ../../include/iostuff.h
mail_flow.o: mail_flow.h
mail_flow.o: master_proto.h
master.o: master.c
master.o: ../../include/sys_defs.h
master.o: ../../include/events.h
master.o: ../../include/msg.h
master.o: ../../include/msg_syslog.h
master.o: ../../include/vstring.h
master.o: ../../include/vbuf.h
master.o: ../../include/mymalloc.h
master.o: ../../include/iostuff.h
master.o: ../../include/vstream.h
master.o: ../../include/stringops.h
master.o: ../../include/myflock.h
master.o: ../../include/watchdog.h
master.o: ../../include/clean_env.h
master.o: ../../include/argv.h
master.o: ../../include/safe.h
master.o: ../../include/mail_params.h
master.o: ../../include/mail_version.h
master.o: ../../include/debug_process.h
master.o: ../../include/mail_task.h
master.o: ../../include/mail_conf.h
master.o: ../../include/open_lock.h
master.o: ../../include/inet_proto.h
master.o: master.h
master_avail.o: master_avail.c
master_avail.o: ../../include/sys_defs.h
master_avail.o: ../../include/events.h
master_avail.o: ../../include/msg.h
master_avail.o: master_proto.h
master_avail.o: master.h
master_conf.o: master_conf.c
master_conf.o: ../../include/sys_defs.h
master_conf.o: ../../include/msg.h
master_conf.o: ../../include/argv.h
master_conf.o: master.h
master_ent.o: master_ent.c
master_ent.o: ../../include/sys_defs.h
master_ent.o: ../../include/msg.h
master_ent.o: ../../include/mymalloc.h
master_ent.o: ../../include/vstring.h
master_ent.o: ../../include/vbuf.h
master_ent.o: ../../include/vstream.h
master_ent.o: ../../include/argv.h
master_ent.o: ../../include/stringops.h
master_ent.o: ../../include/readlline.h
master_ent.o: ../../include/inet_addr_list.h
master_ent.o: ../../include/myaddrinfo.h
master_ent.o: ../../include/host_port.h
master_ent.o: ../../include/inet_addr_host.h
master_ent.o: ../../include/mail_proto.h
master_ent.o: ../../include/iostuff.h
master_ent.o: ../../include/attr.h
master_ent.o: ../../include/mail_params.h
master_ent.o: ../../include/own_inet_addr.h
master_ent.o: ../../include/wildcard_inet_addr.h
master_ent.o: master_proto.h
master_ent.o: master.h
master_flow.o: master_flow.c
master_flow.o: ../../include/sys_defs.h
master_flow.o: ../../include/msg.h
master_flow.o: ../../include/iostuff.h
master_flow.o: master.h
master_flow.o: master_proto.h
master_listen.o: master_listen.c
master_listen.o: ../../include/sys_defs.h
master_listen.o: ../../include/msg.h
master_listen.o: ../../include/listen.h
master_listen.o: ../../include/iostuff.h
master_listen.o: ../../include/mymalloc.h
master_listen.o: ../../include/stringops.h
master_listen.o: ../../include/vstring.h
master_listen.o: ../../include/vbuf.h
master_listen.o: ../../include/inet_addr_list.h
master_listen.o: ../../include/myaddrinfo.h
master_listen.o: ../../include/set_eugid.h
master_listen.o: ../../include/set_ugid.h
master_listen.o: ../../include/sock_addr.h
master_listen.o: ../../include/mail_params.h
master_listen.o: master.h
master_proto.o: master_proto.c
master_proto.o: ../../include/sys_defs.h
master_proto.o: ../../include/msg.h
master_proto.o: master_proto.h
master_service.o: master_service.c
master_service.o: ../../include/sys_defs.h
master_service.o: ../../include/msg.h
master_service.o: ../../include/mymalloc.h
master_service.o: master.h
master_sig.o: master_sig.c
master_sig.o: ../../include/sys_defs.h
master_sig.o: ../../include/msg.h
master_sig.o: ../../include/posix_signals.h
master_sig.o: master.h
master_sig.o: ../../include/iostuff.h
master_sig.o: ../../include/events.h
master_spawn.o: master_spawn.c
master_spawn.o: ../../include/sys_defs.h
master_spawn.o: ../../include/msg.h
master_spawn.o: ../../include/binhash.h
master_spawn.o: ../../include/mymalloc.h
master_spawn.o: ../../include/events.h
master_spawn.o: ../../include/vstring.h
master_spawn.o: ../../include/vbuf.h
master_spawn.o: ../../include/argv.h
master_spawn.o: master_proto.h
master_spawn.o: master.h
master_status.o: master_status.c
master_status.o: ../../include/sys_defs.h
master_status.o: ../../include/msg.h
master_status.o: ../../include/events.h
master_status.o: ../../include/binhash.h
master_status.o: ../../include/iostuff.h
master_status.o: master_proto.h
master_status.o: master.h
master_vars.o: master_vars.c
master_vars.o: ../../include/sys_defs.h
master_vars.o: ../../include/msg.h
master_vars.o: ../../include/stringops.h
master_vars.o: ../../include/vstring.h
master_vars.o: ../../include/vbuf.h
master_vars.o: ../../include/mymalloc.h
master_vars.o: ../../include/mail_conf.h
master_vars.o: ../../include/mail_params.h
master_vars.o: master.h
master_wakeup.o: master_wakeup.c
master_wakeup.o: ../../include/sys_defs.h
master_wakeup.o: ../../include/msg.h
master_wakeup.o: ../../include/trigger.h
master_wakeup.o: ../../include/events.h
master_wakeup.o: ../../include/set_eugid.h
master_wakeup.o: ../../include/set_ugid.h
master_wakeup.o: ../../include/mail_proto.h
master_wakeup.o: ../../include/vstream.h
master_wakeup.o: ../../include/vbuf.h
master_wakeup.o: ../../include/iostuff.h
master_wakeup.o: ../../include/attr.h
master_wakeup.o: ../../include/mail_params.h
master_wakeup.o: mail_server.h
master_wakeup.o: master.h
multi_server.o: multi_server.c
multi_server.o: ../../include/sys_defs.h
multi_server.o: ../../include/msg.h
multi_server.o: ../../include/msg_syslog.h
multi_server.o: ../../include/chroot_uid.h
multi_server.o: ../../include/listen.h
multi_server.o: ../../include/iostuff.h
multi_server.o: ../../include/events.h
multi_server.o: ../../include/vstring.h
multi_server.o: ../../include/vbuf.h
multi_server.o: ../../include/vstream.h
multi_server.o: ../../include/msg_vstream.h
multi_server.o: ../../include/mymalloc.h
multi_server.o: ../../include/stringops.h
multi_server.o: ../../include/sane_accept.h
multi_server.o: ../../include/myflock.h
multi_server.o: ../../include/safe_open.h
multi_server.o: ../../include/watchdog.h
multi_server.o: ../../include/split_at.h
multi_server.o: ../../include/mail_task.h
multi_server.o: ../../include/debug_process.h
multi_server.o: ../../include/mail_params.h
multi_server.o: ../../include/mail_conf.h
multi_server.o: ../../include/mail_dict.h
multi_server.o: ../../include/timed_ipc.h
multi_server.o: ../../include/resolve_local.h
multi_server.o: mail_flow.h
multi_server.o: master_proto.h
multi_server.o: mail_server.h
single_server.o: single_server.c
single_server.o: ../../include/sys_defs.h
single_server.o: ../../include/msg.h
single_server.o: ../../include/msg_syslog.h
single_server.o: ../../include/chroot_uid.h
single_server.o: ../../include/vstring.h
single_server.o: ../../include/vbuf.h
single_server.o: ../../include/vstream.h
single_server.o: ../../include/msg_vstream.h
single_server.o: ../../include/mymalloc.h
single_server.o: ../../include/events.h
single_server.o: ../../include/iostuff.h
single_server.o: ../../include/stringops.h
single_server.o: ../../include/sane_accept.h
single_server.o: ../../include/myflock.h
single_server.o: ../../include/safe_open.h
single_server.o: ../../include/listen.h
single_server.o: ../../include/watchdog.h
single_server.o: ../../include/split_at.h
single_server.o: ../../include/mail_params.h
single_server.o: ../../include/mail_task.h
single_server.o: ../../include/debug_process.h
single_server.o: ../../include/mail_conf.h
single_server.o: ../../include/mail_dict.h
single_server.o: ../../include/timed_ipc.h
single_server.o: ../../include/resolve_local.h
single_server.o: mail_flow.h
single_server.o: master_proto.h
single_server.o: mail_server.h
trigger_server.o: trigger_server.c
trigger_server.o: ../../include/sys_defs.h
trigger_server.o: ../../include/msg.h
trigger_server.o: ../../include/msg_syslog.h
trigger_server.o: ../../include/chroot_uid.h
trigger_server.o: ../../include/vstring.h
trigger_server.o: ../../include/vbuf.h
trigger_server.o: ../../include/vstream.h
trigger_server.o: ../../include/msg_vstream.h
trigger_server.o: ../../include/mymalloc.h
trigger_server.o: ../../include/events.h
trigger_server.o: ../../include/iostuff.h
trigger_server.o: ../../include/stringops.h
trigger_server.o: ../../include/sane_accept.h
trigger_server.o: ../../include/myflock.h
trigger_server.o: ../../include/safe_open.h
trigger_server.o: ../../include/listen.h
trigger_server.o: ../../include/watchdog.h
trigger_server.o: ../../include/split_at.h
trigger_server.o: ../../include/mail_params.h
trigger_server.o: ../../include/mail_task.h
trigger_server.o: ../../include/debug_process.h
trigger_server.o: ../../include/mail_conf.h
trigger_server.o: ../../include/mail_dict.h
trigger_server.o: ../../include/resolve_local.h
trigger_server.o: mail_flow.h
trigger_server.o: master_proto.h
trigger_server.o: mail_server.h
