aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 924ae31f9ded76b99e00ae7dbc395bbb824a44fa (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
OBJS=bogom.o conf.o
BIN=bogom
MAN=bogom.8

# default instalation prefix
PREFIX=/usr/local

# edit to fit your system configuration
CPPFLAGS=
CFLAGS+=-Wall -g
LDFLAGS=
LIBS+=-lmilter -lpthread

all: $(BIN)

bogom.o: milter.c conf.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c milter.c -o bogom.o
conf.o: conf.c conf.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c conf.c -o conf.o

$(BIN): $(OBJS)
	$(CC) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS)

install: $(BIN) $(MAN)
	cp -f $(BIN) $(PREFIX)/libexec
	cp -f $(MAN) $(PREFIX)/man/man8

clean:
	rm -f $(BIN) $(OBJS)