2009-07-18 00:35:38 +02:00
|
|
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
|
|
|
|
2012-04-18 16:32:43 +02:00
|
|
|
SUBDIRS = src tests docs
|
|
|
|
if BUILD_EXAMPLES
|
|
|
|
SUBDIRS += example
|
|
|
|
endif
|
2006-11-20 09:58:29 +01:00
|
|
|
|
2009-09-01 10:04:13 +02:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA = libssh2.pc
|
|
|
|
|
2007-03-27 14:44:44 +02:00
|
|
|
include_HEADERS = \
|
|
|
|
include/libssh2.h \
|
|
|
|
include/libssh2_publickey.h \
|
|
|
|
include/libssh2_sftp.h
|
2006-11-20 09:58:29 +01:00
|
|
|
|
2007-06-25 22:48:07 +02:00
|
|
|
NETWAREFILES = nw/keepscreen.c \
|
2012-06-04 15:27:02 +02:00
|
|
|
nw/nwlib.c \
|
|
|
|
nw/GNUmakefile \
|
|
|
|
nw/test/GNUmakefile
|
2007-06-25 22:48:07 +02:00
|
|
|
|
2009-07-18 00:35:38 +02:00
|
|
|
DSP = win32/libssh2.dsp
|
|
|
|
VCPROJ = win32/libssh2.vcproj
|
|
|
|
|
2009-09-28 14:21:56 +02:00
|
|
|
DISTCLEANFILES = $(DSP)
|
2009-07-18 00:35:38 +02:00
|
|
|
|
2010-04-28 13:28:54 +02:00
|
|
|
VMSFILES = vms/libssh2_make_example.dcl vms/libssh2_make_help.dcl \
|
|
|
|
vms/libssh2_make_kit.dcl vms/libssh2_make_lib.dcl vms/man2help.c \
|
2010-04-29 20:28:56 +02:00
|
|
|
vms/readme.vms vms/libssh2_config.h
|
2010-04-28 13:28:54 +02:00
|
|
|
|
2011-09-10 14:10:45 +02:00
|
|
|
WIN32FILES = win32/GNUmakefile win32/test/GNUmakefile \
|
|
|
|
win32/libssh2_config.h win32/config.mk win32/rules.mk \
|
|
|
|
win32/Makefile.Watcom win32/libssh2.dsw win32/tests.dsp $(DSP) \
|
|
|
|
win32/msvcproj.head win32/msvcproj.foot win32/libssh2.rc
|
2007-11-08 16:14:13 +01:00
|
|
|
|
2015-03-07 11:32:22 +01:00
|
|
|
EXTRA_DIST = $(WIN32FILES) buildconf $(NETWAREFILES) get_ver.awk \
|
|
|
|
maketgz NMakefile RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath
|
2006-12-07 16:53:01 +01:00
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
2007-03-27 14:44:44 +02:00
|
|
|
|
2007-04-13 08:06:15 +02:00
|
|
|
.PHONY: ChangeLog
|
2007-03-27 14:44:44 +02:00
|
|
|
ChangeLog:
|
2009-05-23 23:03:31 +02:00
|
|
|
echo "see NEWS" > ./ChangeLog
|
2009-09-28 14:21:56 +02:00
|
|
|
DISTCLEANFILES += ChangeLog
|
2007-07-15 23:36:29 +02:00
|
|
|
|
|
|
|
dist-hook:
|
|
|
|
rm -rf $(top_builddir)/tests/log
|
|
|
|
find $(distdir) -name "*.dist" -exec rm {} \;
|
|
|
|
(distit=`find $(srcdir) -name "*.dist"`; \
|
|
|
|
for file in $$distit; do \
|
|
|
|
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
|
|
|
cp $$file $(distdir)$$strip; \
|
|
|
|
done)
|
2008-11-21 15:51:28 +01:00
|
|
|
|
|
|
|
# Code Coverage
|
|
|
|
|
|
|
|
init-coverage:
|
|
|
|
make clean
|
|
|
|
lcov --directory . --zerocounters
|
|
|
|
|
|
|
|
COVERAGE_CCOPTS ?= "-g --coverage"
|
|
|
|
COVERAGE_OUT ?= docs/coverage
|
|
|
|
|
|
|
|
build-coverage:
|
|
|
|
make CFLAGS=$(COVERAGE_CCOPTS) check
|
|
|
|
mkdir -p $(COVERAGE_OUT)
|
|
|
|
lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
|
|
|
|
--capture
|
|
|
|
|
|
|
|
gen-coverage:
|
|
|
|
genhtml --output-directory $(COVERAGE_OUT) \
|
|
|
|
$(COVERAGE_OUT)/$(PACKAGE).info \
|
|
|
|
--highlight --frames --legend \
|
|
|
|
--title "$(PACKAGE_NAME)"
|
|
|
|
|
|
|
|
coverage: init-coverage build-coverage gen-coverage
|
2009-07-18 00:35:38 +02:00
|
|
|
|
|
|
|
# DSP/VCPROJ generation adapted from libcurl
|
2014-05-18 00:07:59 +02:00
|
|
|
# only OpenSSL and WinCNG are supported with this build system
|
|
|
|
CRYPTO_CSOURCES = openssl.c wincng.c
|
|
|
|
CRYPTO_HHEADERS = openssl.h wincng.h
|
2009-07-18 00:35:38 +02:00
|
|
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
|
|
|
include Makefile.inc
|
|
|
|
|
|
|
|
WIN32SOURCES = $(CSOURCES)
|
|
|
|
WIN32HEADERS = $(HHEADERS) libssh2_config.h
|
|
|
|
|
|
|
|
$(DSP): win32/msvcproj.head win32/msvcproj.foot Makefile.am
|
|
|
|
echo "creating $(DSP)"
|
2009-10-17 02:58:53 +02:00
|
|
|
@( (cat $(srcdir)/win32/msvcproj.head; \
|
|
|
|
echo "# Begin Group \"Source Files\""; \
|
|
|
|
echo ""; \
|
|
|
|
echo "# PROP Default_Filter \"cpp;c;cxx\""; \
|
|
|
|
win32_srcs='$(WIN32SOURCES)'; \
|
|
|
|
sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
|
|
|
|
for file in $$sorted_srcs; do \
|
|
|
|
echo "# Begin Source File"; \
|
|
|
|
echo ""; \
|
|
|
|
echo "SOURCE=..\\src\\"$$file; \
|
|
|
|
echo "# End Source File"; \
|
2009-07-18 00:35:38 +02:00
|
|
|
done; \
|
2009-10-17 02:58:53 +02:00
|
|
|
echo "# End Group"; \
|
|
|
|
echo "# Begin Group \"Header Files\""; \
|
|
|
|
echo ""; \
|
|
|
|
echo "# PROP Default_Filter \"h;hpp;hxx\""; \
|
|
|
|
win32_hdrs='$(WIN32HEADERS)'; \
|
|
|
|
sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
|
|
|
|
for file in $$sorted_hdrs; do \
|
|
|
|
echo "# Begin Source File"; \
|
|
|
|
echo ""; \
|
|
|
|
if [ "$$file" == "libssh2_config.h" ]; \
|
|
|
|
then \
|
|
|
|
echo "SOURCE=.\\"$$file; \
|
|
|
|
else \
|
|
|
|
echo "SOURCE=..\\src\\"$$file; \
|
|
|
|
fi; \
|
|
|
|
echo "# End Source File"; \
|
2009-07-18 00:35:38 +02:00
|
|
|
done; \
|
2009-10-17 02:58:53 +02:00
|
|
|
echo "# End Group"; \
|
|
|
|
cat $(srcdir)/win32/msvcproj.foot) | \
|
|
|
|
awk '{printf("%s\r\n", gensub("\r", "", "g"))}' > $@ )
|
2009-07-18 00:35:38 +02:00
|
|
|
|
|
|
|
$(VCPROJ): win32/vc8proj.head win32/vc8proj.foot Makefile.am
|
|
|
|
echo "creating $(VCPROJ)"
|
2009-10-17 02:58:53 +02:00
|
|
|
@( (cat $(srcdir)/vc8proj.head; \
|
|
|
|
win32_srcs='$(WIN32SOURCES)'; \
|
|
|
|
sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
|
|
|
|
for file in $$sorted_srcs; do \
|
|
|
|
echo "<File RelativePath=\""..\src\$$file"\"></File>"; \
|
2009-07-18 00:35:38 +02:00
|
|
|
done; \
|
2009-10-17 02:58:53 +02:00
|
|
|
echo "</Filter><Filter Name=\"Header Files\">"; \
|
|
|
|
win32_hdrs='$(WIN32HEADERS)'; \
|
|
|
|
sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
|
|
|
|
for file in $$sorted_hdrs; do \
|
|
|
|
echo "<File RelativePath=\""..\src\$$file"\"></File>"; \
|
2009-07-18 00:35:38 +02:00
|
|
|
done; \
|
2009-10-17 02:58:53 +02:00
|
|
|
cat $(srcdir)/vc8proj.foot) | \
|
|
|
|
awk '{printf("%s\r\n", gensub("\r", "", "g"))}' > $@ )
|