summaryrefslogtreecommitdiffstats
path: root/src/milter/Makefile.in
blob: 98e3ba00822958401b4858b5e7f290401d51f4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
SHELL	= /bin/sh
SRCS	= milter.c milter8.c milter_macros.c
OBJS	= milter.o milter8.o milter_macros.o
HDRS	= milter.h
TESTSRC	= 
DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
INCL	=
LIB	= libmilter.a
TESTPROG= milter test-milter

LIBS	= ../../$(LIB_PREFIX)global$(LIB_SUFFIX) \
	../../$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR	= ../../lib
INC_DIR	= ../../include
MAKES	=

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

all: $(LIB)

$(OBJS): ../../conf/makedefs.out

Makefile: Makefile.in
	cat ../../conf/makedefs.out $? >$@

test:	$(TESTPROG)

tests:

root_tests:

$(LIB):	$(OBJS)
	$(_AR) $(ARFL) $(LIB) $?
	$(_RANLIB) $(LIB)

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

update: $(LIB_DIR)/$(LIB) $(HDRS)
	-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 $(LIB) *core $(TESTPROG) junk
	rm -rf printfck

tidy:	clean

milter:	milter.c $(LIB) $(LIBS)
	mv $@.o junk
	$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
	mv junk $@.o

test-milter: test-milter.c
	cc -g -I/usr/local/include -o $@ $? -L/usr/local/lib -lmilter -lpthread

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 's/o: \.\//o: /' -e p -e '}' ; \
	done | LANG=C sort -u) | 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'
milter.o: ../../include/argv.h
milter.o: ../../include/attr.h
milter.o: ../../include/attr_override.h
milter.o: ../../include/check_arg.h
milter.o: ../../include/htable.h
milter.o: ../../include/iostuff.h
milter.o: ../../include/mail_params.h
milter.o: ../../include/mail_proto.h
milter.o: ../../include/msg.h
milter.o: ../../include/mymalloc.h
milter.o: ../../include/nvtable.h
milter.o: ../../include/rec_type.h
milter.o: ../../include/record.h
milter.o: ../../include/stringops.h
milter.o: ../../include/sys_defs.h
milter.o: ../../include/vbuf.h
milter.o: ../../include/vstream.h
milter.o: ../../include/vstring.h
milter.o: milter.c
milter.o: milter.h
milter8.o: ../../include/argv.h
milter8.o: ../../include/attr.h
milter8.o: ../../include/check_arg.h
milter8.o: ../../include/compat_va_copy.h
milter8.o: ../../include/connect.h
milter8.o: ../../include/header_opts.h
milter8.o: ../../include/htable.h
milter8.o: ../../include/iostuff.h
milter8.o: ../../include/is_header.h
milter8.o: ../../include/mail_params.h
milter8.o: ../../include/mail_proto.h
milter8.o: ../../include/mime_state.h
milter8.o: ../../include/msg.h
milter8.o: ../../include/mymalloc.h
milter8.o: ../../include/name_code.h
milter8.o: ../../include/name_mask.h
milter8.o: ../../include/nvtable.h
milter8.o: ../../include/rec_type.h
milter8.o: ../../include/record.h
milter8.o: ../../include/split_at.h
milter8.o: ../../include/stringops.h
milter8.o: ../../include/sys_defs.h
milter8.o: ../../include/vbuf.h
milter8.o: ../../include/vstream.h
milter8.o: ../../include/vstring.h
milter8.o: milter.h
milter8.o: milter8.c
milter_macros.o: ../../include/argv.h
milter_macros.o: ../../include/attr.h
milter_macros.o: ../../include/check_arg.h
milter_macros.o: ../../include/htable.h
milter_macros.o: ../../include/iostuff.h
milter_macros.o: ../../include/mail_proto.h
milter_macros.o: ../../include/msg.h
milter_macros.o: ../../include/mymalloc.h
milter_macros.o: ../../include/nvtable.h
milter_macros.o: ../../include/sys_defs.h
milter_macros.o: ../../include/vbuf.h
milter_macros.o: ../../include/vstream.h
milter_macros.o: ../../include/vstring.h
milter_macros.o: milter.h
milter_macros.o: milter_macros.c
test-milter.o: test-milter.c