Bump version for development.
[pwmd.git] / src / Makefile.am
blobbaf472251068ac9f2e9bb91a01ec45386233c5be
1 AM_CPPFLAGS = -I. -I$(top_builddir)
2 BUILT_SOURCES = version.h
3 DISTCLEANFILES = $(top_builddir)/src/version.h
5 .DELETE_ON_ERROR:
7 bin_PROGRAMS = pwmd pwmd-dump
9 pwmd_dump_SOURCES = pwmd-dump.c util-string.c util-string.h version.h
10 pwmd_dump_LDADD = @PTHREAD_LIBS@ @GPG_ERROR_MT_LIBS@ @LIBGCRYPT_LIBS@ \
11                   @LIBASSUAN_LIBS@ @XML_LIBS@ @LIBINTL@
12 pwmd_dump_CFLAGS = @PTHREAD_CFLAGS@ @GPG_ERROR_MT_CFLAGS@ @LIBGCRYPT_CFLAGS@ \
13                    @LIBASSUAN_CFLAGS@ @XML_CPPFLAGS@
15 pwmd_SOURCES = pwmd.c xml.c xml.h pwmd-error.c pwmd-error.h commands.c \
16                commands.h common.h cache.c cache.h status.c status.h \
17                mutex.h rcfile.c rcfile.h util-slist.c util-slist.h \
18                util-string.c util-string.h util-misc.c util-misc.h gettext.h \
19                crypto.c crypto.h agent.c agent.h acl.c acl.h bulk.c bulk.h \
20                version.h command-opt.h
21 pwmd_LDADD = @PTHREAD_LIBS@ @GPG_ERROR_MT_LIBS@ @LIBGCRYPT_LIBS@ \
22              @GPGME_LIBS@ @XML_LIBS@ @LIBASSUAN_LIBS@ @LIBINTL@
23 pwmd_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\" @PTHREAD_CFLAGS@ \
24                @XML_CPPFLAGS@ @GPG_ERROR_MT_CFLAGS@ @GPGME_CFLAGS@ \
25                @LIBGCRYPT_CFLAGS@ @LIBASSUAN_CFLAGS@
27 if NEED_GETOPT_LONG
28 pwmd_SOURCES += getopt_long.c getopt_long.h
29 pwmd_dump_SOURCES += getopt_long.c getopt_long.h
30 endif
32 if WITH_GNUTLS
33 pwmd_SOURCES += tls.c tls.h
34 pwmd_CFLAGS += @GNUTLS_CFLAGS@
35 pwmd_LDADD += @GNUTLS_LIBS@
36 endif
38 if WITH_DEBUG
39 CPPFLAGS += -DDEBUG
40 endif
42 if MEM_DEBUG
43 CPPFLAGS += -DMEM_DEBUG
44 endif
45 pwmd_SOURCES += mem.c mem.h
46 pwmd_dump_SOURCES += mem.c mem.h
48 if WITH_MUTEX_DEBUG
49 CPPFLAGS += -DMUTEX_DEBUG
50 endif
52 if IS_GIT_REPO
53 version.h: $(top_builddir)/.git/refs/heads/@GIT_BRANCH@
54         test $(BUILDING_PKG) && echo '#define PWMD_GIT_HASH ""' >version.h || \
55             echo '#define PWMD_GIT_HASH "-'`git log -1 --format="%h"`'"' >version.h
56 else
57 version.h:
58         echo '#define PWMD_GIT_HASH ""' >version.h
59 endif