summaryrefslogtreecommitdiff
path: root/examples/Makefile
blob: d09522c67aff4094be1b3a57af89470a2d3bfe48 (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
# Makefile

CFLAGS  = -g -I../include -Wall
LDFLAGS = -g -static
LDLIBS 	= -lsocket

MULIBS	= ../mailbox/.libs/libmailbox.a ../lib/libmailutils.a

EXES    = addr mbox-explode mbox-dates mbox-auth url-parse mbox-check

default: $(EXES)

$(EXES): $(MULIBS)

# example of parsing the date fields, prints all the incorrectly
# formatted dates in a mailbox.

bad-dates: mbox-dates
	for m in ~/Mail/*; do ./mbox-dates $$m; done | tee bad-dates.out

# addr example and test

addr.test: addr
	./addr < Addrs > Addrs.test
	@echo "---- There should be no differences! ----"
	diff -u Addrs.good Addrs.test

# url example and test

url.test: url-parse
	./url-parse < Urls > Urls.test
	@echo "---- There should be no differences! ----"
	diff -u Urls.good Urls.test

# clean and empty

clean:
	rm -f *.o

empty: clean
	rm -f $(EXES)

Return to:

Send suggestions and report system problems to the System administrator.