1SHELL = /bin/sh 2SRCS = milter.c milter8.c milter_macros.c 3OBJS = milter.o milter8.o milter_macros.o 4HDRS = milter.h 5TESTSRC = 6DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) 7CFLAGS = $(DEBUG) $(OPT) $(DEFS) 8INCL = 9LIB = libmilter.a 10TESTPROG= milter test-milter 11 12LIBS = ../../$(LIB_PREFIX)global$(LIB_SUFFIX) \ 13 ../../$(LIB_PREFIX)util$(LIB_SUFFIX) 14LIB_DIR = ../../lib 15INC_DIR = ../../include 16MAKES = 17 18.c.o:; $(CC) $(CFLAGS) -c $*.c 19 20all: $(LIB) 21 22$(OBJS): ../../conf/makedefs.out 23 24Makefile: Makefile.in 25 cat ../../conf/makedefs.out $? >$@ 26 27test: $(TESTPROG) 28 29tests: 30 31root_tests: 32 33$(LIB): $(OBJS) 34 $(_AR) $(ARFL) $(LIB) $? 35 $(_RANLIB) $(LIB) 36 37$(LIB_DIR)/$(LIB): $(LIB) 38 cp $(LIB) $(LIB_DIR) 39 $(_RANLIB) $(LIB_DIR)/$(LIB) 40 41update: $(LIB_DIR)/$(LIB) $(HDRS) 42 -for i in $(HDRS); \ 43 do \ 44 cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \ 45 done 46 cd $(INC_DIR); chmod 644 $(HDRS) 47 48printfck: $(OBJS) $(PROG) 49 rm -rf printfck 50 mkdir printfck 51 cp *.h printfck 52 sed '1,/^# do not edit/!d' Makefile >printfck/Makefile 53 set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done 54 cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o` 55 56lint: 57 lint $(DEFS) $(SRCS) $(LINTFIX) 58 59clean: 60 rm -f *.o $(LIB) *core $(TESTPROG) junk 61 rm -rf printfck 62 63tidy: clean 64 65milter: milter.c $(LIB) $(LIBS) 66 mv $@.o junk 67 $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS) 68 mv junk $@.o 69 70test-milter: test-milter.c 71 cc -g -I/usr/local/include -o $@ $? -L/usr/local/lib -lmilter -lpthread 72 73depend: $(MAKES) 74 (sed '1,/^# do not edit/!d' Makefile.in; \ 75 set -e; for i in [a-z][a-z0-9]*.c; do \ 76 $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \ 77 -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \ 78 -e 's/o: \.\//o: /' -e p -e '}' ; \ 79 done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in 80 @$(EXPORT) make -f Makefile.in Makefile 1>&2 81 82# do not edit below this line - it is generated by 'make depend' 83milter.o: ../../include/argv.h 84milter.o: ../../include/attr.h 85milter.o: ../../include/attr_override.h 86milter.o: ../../include/check_arg.h 87milter.o: ../../include/htable.h 88milter.o: ../../include/iostuff.h 89milter.o: ../../include/mail_params.h 90milter.o: ../../include/mail_proto.h 91milter.o: ../../include/msg.h 92milter.o: ../../include/mymalloc.h 93milter.o: ../../include/nvtable.h 94milter.o: ../../include/rec_type.h 95milter.o: ../../include/record.h 96milter.o: ../../include/stringops.h 97milter.o: ../../include/sys_defs.h 98milter.o: ../../include/vbuf.h 99milter.o: ../../include/vstream.h 100milter.o: ../../include/vstring.h 101milter.o: milter.c 102milter.o: milter.h 103milter8.o: ../../include/argv.h 104milter8.o: ../../include/attr.h 105milter8.o: ../../include/check_arg.h 106milter8.o: ../../include/compat_va_copy.h 107milter8.o: ../../include/connect.h 108milter8.o: ../../include/header_opts.h 109milter8.o: ../../include/htable.h 110milter8.o: ../../include/iostuff.h 111milter8.o: ../../include/is_header.h 112milter8.o: ../../include/mail_params.h 113milter8.o: ../../include/mail_proto.h 114milter8.o: ../../include/mime_state.h 115milter8.o: ../../include/msg.h 116milter8.o: ../../include/mymalloc.h 117milter8.o: ../../include/name_code.h 118milter8.o: ../../include/name_mask.h 119milter8.o: ../../include/nvtable.h 120milter8.o: ../../include/rec_type.h 121milter8.o: ../../include/record.h 122milter8.o: ../../include/split_at.h 123milter8.o: ../../include/stringops.h 124milter8.o: ../../include/sys_defs.h 125milter8.o: ../../include/vbuf.h 126milter8.o: ../../include/vstream.h 127milter8.o: ../../include/vstring.h 128milter8.o: milter.h 129milter8.o: milter8.c 130milter_macros.o: ../../include/argv.h 131milter_macros.o: ../../include/attr.h 132milter_macros.o: ../../include/check_arg.h 133milter_macros.o: ../../include/htable.h 134milter_macros.o: ../../include/iostuff.h 135milter_macros.o: ../../include/mail_proto.h 136milter_macros.o: ../../include/msg.h 137milter_macros.o: ../../include/mymalloc.h 138milter_macros.o: ../../include/nvtable.h 139milter_macros.o: ../../include/sys_defs.h 140milter_macros.o: ../../include/vbuf.h 141milter_macros.o: ../../include/vstream.h 142milter_macros.o: ../../include/vstring.h 143milter_macros.o: milter.h 144milter_macros.o: milter_macros.c 145test-milter.o: test-milter.c 146