Merged revisions 11544-11580 via svnmerge from
[wvapps.git] / retchmail / Makefile
blobecf6a6f86c486f59f333b09415a774bfb4284e0a
1 ifeq ($(TOPDIR),)
2 TOPDIR=.
4 prefix=/usr/local
5 WVSTREAMS_INC=
6 WVSTREAMS_LIB=
7 WVSTREAMS_BIN=$(prefix)/bin
8 WVSTREAMS_SRC=.
10 PC_CFLAGS=$(shell pkg-config --cflags libwvstreams)
11 ifeq ($(PC_CFLAGS),)
12 $(error WvStreams does not appear to be installed)
13 endif
14 CPPFLAGS+=$(PC_CFLAGS)
16 PC_LIBS=$(shell pkg-config --libs libwvstreams)
17 ifeq ($(PC_LIBS),)
18 $(error WvStreams does not appear to be installed)
19 endif
20 LIBS+=$(PC_LIBS)
21 else
22 XPATH=$(TOPDIR)/src
23 endif
25 include $(TOPDIR)/wvrules.mk
27 default: retchmail
28 all: retchmail
30 #LIBS += ${EFENCE}
31 LDFLAGS += -rdynamic
33 ifneq ($(WVSTREAMS_LIB),)
34 retchmail-LIBS+=$(LIBUNICONF) ${LIBWVSTREAMS} $(LIBWVUTILS)
35 endif
36 retchmail: retchmail.o wvpopclient.o wvsendmail.o -luniconf
38 install: install-bin install-man
40 install-bin: all
41 [ -d ${prefix}/bin ] || install -d ${prefix}/bin
42 install -m 0755 retchmail ${prefix}/bin
44 install-man:
45 [ -d ${prefix}/share/man ] || install -d ${prefix}/share/man
46 [ -d ${prefix}/share/man/man1 ] || install -d ${prefix}/share/man/man1
47 [ -d ${prefix}/share/man/man5 ] || install -d ${prefix}/share/man/man5
48 install -m 0644 retchmail.1 ${prefix}/share/man/man1
49 install -m 0644 retchmail.conf.5 ${prefix}/share/man/man5
51 clean:
52 rm -f retchmail
54 .PHONY: install install-bin install-man clean