nitlog: oops, didn't deal properly with posts in months that haven't
[wvapps.git] / wvdial / Makefile
blobf4f80297de7c311ba7a8b65c56d097d79dfa334a
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 BINDIR=${prefix}/bin
26 MANDIR=${prefix}/share/man
27 PPPDIR=/etc/ppp/peers
29 include $(TOPDIR)/wvrules.mk
32 default: all papchaptest
33 all: wvdial.a wvdial wvdialconf pppmon
35 wvdial.a: wvdialer.o wvmodemscan.o wvpapchap.o wvdialbrain.o \
36 wvdialmon.o
38 ifeq ($(WVSTREAMS_LIB),)
39 LIBUNICONF:=-luniconf
40 endif
41 wvdial wvdialconf papchaptest pppmon: wvdial.a $(LIBUNICONF)
43 install-bin: all
44 [ -d ${BINDIR} ] || install -d ${BINDIR}
45 [ -d ${PPPDIR} ] || install -d ${PPPDIR}
46 install -m 0755 wvdial wvdialconf ${BINDIR}
47 cp ppp.provider ${PPPDIR}/wvdial
48 cp ppp.provider-pipe ${PPPDIR}/wvdial-pipe
50 install-man:
51 [ -d ${MANDIR}/man1 ] || install -d ${MANDIR}/man1
52 [ -d ${MANDIR}/man5 ] || install -d ${MANDIR}/man5
53 install -m 0644 wvdial.1 wvdialconf.1 ${MANDIR}/man1
54 install -m 0644 wvdial.conf.5 ${MANDIR}/man5
56 install: install-bin install-man
58 uninstall-bin:
59 rm -f ${BINDIR}/wvdial ${BINDIR}/wvdialconf
60 rm -f ${PPPDIR}/wvdial
61 rm -f ${PPPDIR}/wvdial-pipe
63 uninstall-man:
64 rm -f ${MANDIR}/man1/wvdial.1 ${MANDIR}/man1/wvdialconf.1
65 rm -f ${MANDIR}/man5/wvdial.conf.5
67 uninstall: uninstall-bin uninstall-man
69 clean:
70 rm -f wvdial wvdialconf wvdialmon papchaptest pppmon
72 .PHONY: clean all install-bin install-man install uninstall-bin uninstall-man \
73 uninstall