3 lib_LTLIBRARIES = libopenconnect.la
4 bin_PROGRAMS = openconnect
5 man8_MANS = openconnect.8
7 openconnect_SOURCES = xml.c main.c dtls.c cstp.c mainloop.c tun.c
9 openconnect_CFLAGS = $(OPENSSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS)
10 openconnect_LDADD = libopenconnect.la $(OPENSSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS)
12 libopenconnect_la_SOURCES = ssl.c http.c version.c auth.c library.c
13 libopenconnect_la_CFLAGS = $(OPENSSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS)
14 libopenconnect_la_LIBADD = $(OPENSSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS)
15 libopenconnect_la_LDFLAGS = -version-number 1:2
16 noinst_HEADERS = openconnect-internal.h openconnect.h
17 include_HEADERS = openconnect.h
19 pkgconfigdir = $(libdir)/pkgconfig
20 pkgconfig_DATA = openconnect.pc
22 EXTRA_DIST = version.sh openconnect.html openconnect.8 COPYING.LGPL
24 DISTCLEANFILES = $(pkgconfig_DATA) version.c
26 version.c: $(filter-out version.c, $(libopenconnect_la_SOURCES)) \
27 $(openconnect_SOURCES) Makefile.am configure.ac \
28 openconnect.h openconnect-internal.h version.sh \
29 $(wildcard .git/index .git/refs/tags)
33 @if ! git rev-parse --verify v$(VERSION) > /dev/null; then \
34 echo "*** ERROR: Version v$(VERSION) is not tagged"; exit 1; fi
35 @if ! git diff --name-only --exit-code v$(VERSION) HEAD > /dev/null; then \
36 echo "*** ERROR: Git checkout not at version v$(VERSION)"; exit 1; fi
37 @git update-index --refresh --unmerged
38 @if ! git diff-index --name-only --exit-code HEAD; then \
39 echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi
42 @git update-index --refresh --unmerged
43 @if ! git diff-index --name-only --exit-code HEAD; then \
44 echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi
45 @if git rev-parse --verify v$(VERSION) > /dev/null; then \
46 echo "*** ERROR: Version v$(VERSION) is already tagged"; exit 1; fi
47 @sed 's/AC_INIT.*/AC_INIT(openconnect, $(VERSION))/' -i configure.ac
48 @sed 's/^v=.*/v="v$(VERSION)"/' -i version.sh
49 @( echo "s/Last modified: .*/Last modified: $(shell date)/" ;\
50 echo '/ <LI><B>OpenConnect HEAD/a\' ;\
52 echo ' <LI><I>No changelog entries yet</I></LI>\';\
53 echo ' </UL><BR>\' ; echo ' </LI>\' ;\
54 echo ' <LI><B><A HREF="ftp://ftp.infradead.org/pub/openconnect/openconnect-$(VERSION).tar.gz">OpenConnect v$(VERSION)</a></B> — $(shell date +%Y-%m-%d)<BR>' ) | \
55 sed -f - -i openconnect.html
56 # stupid syntax highlighting '
57 @git commit -s -m "Tag version $(VERSION)" configure.ac version.sh openconnect.html