SUBDIRS = if BUILD_WWW SUBDIRS += www endif if USE_NLS SUBDIRS += po endif lib_LTLIBRARIES = libopenconnect.la sbin_PROGRAMS = openconnect man8_MANS = openconnect.8 AM_CPPFLAGS = -DLOCALEDIR="\"$(localedir)\"" openconnect_SOURCES = xml.c main.c dtls.c cstp.c mainloop.c tun.c openconnect_CFLAGS = $(OPENSSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) $(ZLIB_CFLAGS) openconnect_LDADD = libopenconnect.la $(OPENSSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(ZLIB_LIBS) $(LIBINTL) library_srcs = ssl.c http.c auth.c library.c compat.c libopenconnect_la_SOURCES = version.c $(library_srcs) libopenconnect_la_CFLAGS = $(OPENSSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) libopenconnect_la_LIBADD = $(OPENSSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(LIBINTL) libopenconnect_la_LDFLAGS = -version-number 1:2 noinst_HEADERS = openconnect-internal.h openconnect.h include_HEADERS = openconnect.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = openconnect.pc EXTRA_DIST = version.sh openconnect.8 COPYING.LGPL DISTCLEANFILES = $(pkgconfig_DATA) main.o: version.c version.c: $(library_srcs) $(openconnect_SOURCES) Makefile.am configure.ac \ openconnect.h openconnect-internal.h version.sh @GITVERSIONDEPS@ @cd $(srcdir) && ./version.sh $@ tmp-dist: uncommitted-check $(MAKE) $(AM_MAKEFLAGS) VERSION=$(patsubst v%,%,$(shell git describe --tags)) DISTHOOK=0 dist uncommitted-check: @if ! git update-index --refresh --unmerged || \ ! git diff-index --name-only --exit-code HEAD; then \ echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi DISTHOOK=1 dist-hook: uncommitted-check @if [ $(DISTHOOK) = 1 ]; then \ if ! git rev-parse --verify v$(VERSION) &> /dev/null; then \ echo "*** ERROR: Version v$(VERSION) is not tagged"; exit 1; fi ; \ if ! git diff --name-only --exit-code v$(VERSION) HEAD > /dev/null; then \ echo "*** ERROR: Git checkout not at version v$(VERSION)"; exit 1; fi ; \ fi sign-dist: dist @for a in $(DIST_ARCHIVES); do \ gpg --default-key 67E2F359 --detach-sign -a $$a ; \ done tag: uncommitted-check @if git rev-parse --verify v$(VERSION) &> /dev/null; then \ echo "*** ERROR: Version v$(VERSION) is already tagged"; exit 1; fi @sed 's/AC_INIT.*/AC_INIT(openconnect, $(VERSION))/' -i configure.ac @sed 's/^v=.*/v="v$(VERSION)"/' -i version.sh @( echo '1,//p' ;\ echo '//,$$p' ;\ echo '//a\' ;\ echo 'The latest release is OpenConnect v$(VERSION)\' ;\ echo '(PGP signature),\' ;\ echo 'released on $(shell date +%Y-%m-%d) with the following changelog:
\' ;\ sed '0,/OpenConnect HEAD/d;/<\/ul>