Makefile
905 Bytes
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
# Makefile
CFLAGS = -g -I../include
LDFLAGS = -g -static
LIBS = ../mailbox/.libs/libmailbox.a ../lib/libmailutils.a
default: addr mbox-explode mbox-dates
# showmail
showmail: showmail.c $(LIBS)
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
# example of saving MIME parts to a file
mbox-explode: mbox-explode.c $(LIBS)
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
# example of parsing the date fields, prints all the incorrectly
# formatted dates in a mailbox.
mbox-dates: mbox-dates.c $(LIBS)
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
bad-dates: mbox-dates
for m in ~/Mail/*; do ./mbox-dates $$m; done | tee bad-dates.out
# addr example and test
test: addr
./addr < Addrs > Addrs.test
diff -u Addrs.good Addrs.test
@echo "---- There should be no differences! ----"
addr: addr.c $(LIBS)
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
# clean and empty
clean:
rm -f *.o
empty: clean
rm -f addr showmail mbox-explode mbox-dates