Re-add pwmd.1.in to Makefile.am.
[libpwmd.git] / Makefile.am
blobdc1b8f56300fc1207ed6863d11048025d94f4600
1 EXTRA_DIST = TODO ChangeLog ChangeLog.old INSTALL KnownBugs NEWS debian \
2              ABOUT-NLS
3 dist_man3_MANS = libpwmd.3
4 dist_man1_MANS = pwmc.1
5 SUBDIRS = po
6 ACLOCAL_AMFLAGS = -I m4 -I/usr/local/share/aclocal
8 lib_LTLIBRARIES = libpwmd.la
9 AM_CC = @PTHREAD_CC@
10 libpwmd_ladir = $(includedir)
11 libpwmd_la_SOURCES = libpwmd.c libpwmd.h types.h gettext.h mem.h
12 libpwmd_la_HEADERS = libpwmd.h
13 libpwmd_la_LDFLAGS = -version-info @VER_MAJOR@:@VER_PATCH@:@VER_COMPAT@ \
14     @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ @PTHREAD_LIBS@ @LTLIBINTL@
15 libpwmd_la_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\" @LIBASSUAN_CFLAGS@ \
16                     @GPG_ERROR_CFLAGS@ @PTHREAD_CFLAGS@
18 if WITH_LIBPTH
19 lib_LTLIBRARIES += libpwmd-pth.la
20 libpwmd_pth_ladir = $(includedir)
21 libpwmd_pth_la_SOURCES = libpwmd.c libpwmd.h types.h gettext.h mem.h
22 libpwmd_pth_la_HEADERS = libpwmd.h
23 libpwmd_pth_la_LDFLAGS = -version-info @VER_MAJOR@:@VER_PATCH@:@VER_COMPAT@ \
24     @GPG_ERROR_LIBS@ @PTH_LDFLAGS@ @PTH_LIBS@ @LIBASSUAN_LIBS@ @LTLIBINTL@
25 libpwmd_pth_la_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\" \
26                         @GPG_ERROR_CFLAGS@ @PTH_CFLAGS@ \
27                         -DWITH_LIBPTH @LIBASSUAN_CFLAGS@
28 endif
30 bin_PROGRAMS = pwmc
31 pwmc_SOURCES = pwmc.c mem.h
32 pwmc_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\"
33 pwmc_LDADD= -lpwmd
35 if MEM_DEBUG
36 CPPFLAGS += -DMEM_DEBUG
37 else
38 libpwmd_la_SOURCES += mem.c
39 pwmc_SOURCES += mem.c
40 if WITH_LIBPTH
41 libpwmd_pth_la_SOURCES += mem.c
42 endif
43 endif
45 install-data-hook:
46         install -m 0755 -d $(DESTDIR)${libdir}/pkgconfig
47         chmod u+w $(DESTDIR)${libdir}/pkgconfig
48         install -p -m 0644 ${top_builddir}/libpwmd.pc $(DESTDIR)${libdir}/pkgconfig
49 if WITH_LIBPTH
50         install -p -m 0644 ${top_builddir}/libpwmd-pth.pc $(DESTDIR)${libdir}/pkgconfig
51 endif
53 uninstall-hook:
54         rm -f $(DESTDIR)${libdir}/pkgconfig/libpwmd.pc
55         rm -f $(DESTDIR)${libdir}/pkgconfig/libpwmd-pth.pc
57 changelog:
58         git log --no-color > ChangeLog || exit 1
60 deb: changelog
61         dpkg-buildpackage -B -uc -rfakeroot && dh_clean
63 version: changelog
64         $(MAKE) $(AM_MAKEFLAGS) distcheck
65         $(MAKE) $(AM_MAKEFLAGS) deb