Starting now, we use automake and libtool for the build.
This commit is contained in:
parent
3b1b45e644
commit
82424d6735
15
Makefile.am
Normal file
15
Makefile.am
Normal file
@ -0,0 +1,15 @@
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
include_HEADERS = include/libssh2.h include/libssh2_publickey.h \
|
||||
include/libssh2_sftp.h
|
||||
|
||||
# and a sample tool
|
||||
noinst_PROGRAMS = ssh2_sample
|
||||
|
||||
ssh2_sample_SOURCES = ssh2_sample.c
|
||||
|
||||
ssh2_sample_LDADD = src/libssh2.la
|
||||
|
||||
EXTRA_DIST = LICENSE win32
|
55
Makefile.in
55
Makefile.in
@ -1,55 +0,0 @@
|
||||
subdirs = src/
|
||||
top_srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @exec_prefix@/lib
|
||||
incldir = @prefix@/include
|
||||
distdir = @top_srcdir@/dist
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = -c @CFLAGS@ -Iinclude/ -Wall
|
||||
LIBS = -lssh2 -Lsrc/
|
||||
INSTALL = @INSTALL@
|
||||
VERSION=@PACKAGE_VERSION@
|
||||
DISTLIB=libssh2-$(VERSION)
|
||||
|
||||
all:
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) all) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
sample:
|
||||
$(CC) -o ssh2_sample.o ssh2_sample.c $(CFLAGS)
|
||||
$(CC) -o ssh2_sample ssh2_sample.o $(LIBS)
|
||||
install: all
|
||||
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(incldir)
|
||||
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) install) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
$(INSTALL) -m 644 include/libssh2.h $(DESTDIR)$(incldir)/
|
||||
$(INSTALL) -m 644 include/libssh2_sftp.h $(DESTDIR)$(incldir)/
|
||||
$(INSTALL) -m 644 include/libssh2_publickey.h $(DESTDIR)$(incldir)/
|
||||
clean:
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) clean) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
rm -f ssh2_sample.o ssh2_sample
|
||||
dist:
|
||||
autoheader
|
||||
autoconf
|
||||
rm -f $(DISTLIB)
|
||||
ln -s . $(DISTLIB)
|
||||
tar -zcf $(DISTLIB).tar.gz \
|
||||
$(DISTLIB)/configure $(DISTLIB)/Makefile.in $(DISTLIB)/ssh2_sample.c \
|
||||
$(DISTLIB)/NMakefile \
|
||||
$(DISTLIB)/LICENSE $(DISTLIB)/README $(DISTLIB)/INSTALL \
|
||||
$(DISTLIB)/mkinstalldirs $(DISTLIB)/install-sh $(DISTLIB)/config.sub $(DISTLIB)/config.guess \
|
||||
$(DISTLIB)/src/libssh2_config.h.in \
|
||||
$(DISTLIB)/src/*.[ch] $(DISTLIB)/src/Makefile.in \
|
||||
$(DISTLIB)/include/*.h \
|
||||
$(DISTLIB)/win32/config.mk $(DISTLIB)/win32/libssh2_config.h $(DISTLIB)/win32/rules.mk \
|
||||
$(DISTLIB)/win32/libssh2.dsp $(DISTLIB)/win32/libssh2.dsw $(DISTLIB)/win32/ssh2_sample.dsp
|
||||
rm -f $(DISTLIB)
|
7
buildconf
Executable file
7
buildconf
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
${LIBTOOLIZE:-libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOMAKE:-automake} --add-missing
|
1415
config.guess
vendored
1415
config.guess
vendored
File diff suppressed because it is too large
Load Diff
1510
config.sub
vendored
1510
config.sub
vendored
File diff suppressed because it is too large
Load Diff
18
configure.in
18
configure.in
@ -1,32 +1,23 @@
|
||||
# AC_PREREQ(2.57)
|
||||
AC_INIT(libssh2, 0.15, libssh2-devel@lists.sourceforge.net)
|
||||
AM_INIT_AUTOMAKE(libssh2, 0.15)
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
AC_CONFIG_HEADER([src/libssh2_config.h])
|
||||
|
||||
# Default to the same as CC
|
||||
LDCC="\$(CC)"
|
||||
|
||||
# Check for the OS.
|
||||
# Daniel's note: this should not be necessary and we need to work to
|
||||
# get this removed.
|
||||
AC_CANONICAL_HOST
|
||||
case "$host" in
|
||||
*-cygwin)
|
||||
SHLIB_SUFFIX_NAME="dll"
|
||||
SHLIB_LDFLAGS="-shared"
|
||||
CFLAGS="$CFLAGS -DLIBSSH2_WIN32"
|
||||
;;
|
||||
*darwin*)
|
||||
SHLIB_SUFFIX_NAME="dylib"
|
||||
SHLIB_LDFLAGS="-dynamiclib -flat_namespace"
|
||||
CFLAGS="$CFLAGS -DLIBSSH2_DARWIN"
|
||||
;;
|
||||
*hpux*)
|
||||
SHLIB_SUFFIX_NAME="sl"
|
||||
SHLIB_LDFLAGS="-b +vnocompatwarnings -L/lib/pa20_64"
|
||||
LDCC="ld"
|
||||
;;
|
||||
*)
|
||||
SHLIB_SUFFIX_NAME="so"
|
||||
SHLIB_LDFLAGS="-shared"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -39,14 +30,13 @@ AC_CHECK_LIB(m, ceil, [ SHLIB_LDFLAGS="$SHLIB_LDFLAGS -lm" ])
|
||||
|
||||
AC_SUBST(SHLIB_SUFFIX_NAME)
|
||||
AC_SUBST(SHLIB_LDFLAGS)
|
||||
AC_SUBST(LDCC)
|
||||
AC_SUBST(LIBS)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_LIBTOOL
|
||||
AC_C_BIGENDIAN
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
43
src/Makefile.am
Normal file
43
src/Makefile.am
Normal file
@ -0,0 +1,43 @@
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
libssh2_la_SOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c \
|
||||
misc.c packet.c publickey.c scp.c session.c sftp.c userauth.c \
|
||||
libssh2_priv.h
|
||||
|
||||
EXTRA_DIST = libssh2_config.h.in
|
||||
|
||||
lib_LTLIBRARIES = libssh2.la
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
VERSION=-version-info 0:0:0
|
||||
|
||||
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
||||
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
||||
# 1.
|
||||
#
|
||||
# If either revision or age are omitted, they default to 0. Also note that age
|
||||
# must be less than or equal to the current interface number.
|
||||
#
|
||||
# Here are a set of rules to help you update your library version information:
|
||||
#
|
||||
# 1.Start with version information of 0:0:0 for each libtool library.
|
||||
#
|
||||
# 2.Update the version information only immediately before a public release of
|
||||
# your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
#
|
||||
# 3.If the library source code has changed at all since the last update, then
|
||||
# increment revision (c:r+1:a)
|
||||
#
|
||||
# 4.If any interfaces have been added, removed, or changed since the last
|
||||
# update, increment current, and set revision to 0. (c+1:r=0:a)
|
||||
#
|
||||
# 5.If any interfaces have been added since the last public release, then
|
||||
# increment age. (c:r:a+1)
|
||||
#
|
||||
# 6.If any interfaces have been removed since the last public release, then
|
||||
# set age to 0. (c:r:a=0)
|
||||
#
|
||||
|
||||
libssh2_la_LDFLAGS = $(VERSION)
|
@ -1,68 +0,0 @@
|
||||
OBJECTS = channel.o comp.o crypt.o hostkey.o kex.o mac.o misc.o packet.o publickey.o scp.o session.o sftp.o userauth.o
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @exec_prefix@/lib
|
||||
incldir = @prefix@/include
|
||||
|
||||
CC = @CC@
|
||||
LDCC = @LDCC@
|
||||
CFLAGS = -c @CFLAGS@ -Wall -I../include/ -fPIC
|
||||
LDFLAGS = @LDFLAGS@
|
||||
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
|
||||
all: libssh2.@SHLIB_SUFFIX_NAME@
|
||||
|
||||
channel.o: channel.c
|
||||
$(CC) -o channel.o channel.c $(CFLAGS) $(LIBS)
|
||||
|
||||
comp.o: comp.c
|
||||
$(CC) -o comp.o comp.c $(CFLAGS) $(LIBS)
|
||||
|
||||
crypt.o: crypt.c
|
||||
$(CC) -o crypt.o crypt.c $(CFLAGS) $(LIBS)
|
||||
|
||||
hostkey.o: hostkey.c
|
||||
$(CC) -o hostkey.o hostkey.c $(CFLAGS) $(LIBS)
|
||||
|
||||
kex.o: kex.c
|
||||
$(CC) -o kex.o kex.c $(CFLAGS) $(LIBS)
|
||||
|
||||
mac.o: mac.c
|
||||
$(CC) -o mac.o mac.c $(CFLAGS) $(LIBS)
|
||||
|
||||
misc.o: misc.c
|
||||
$(CC) -o misc.o misc.c $(CFLAGS) $(LIBS)
|
||||
|
||||
packet.o: packet.c
|
||||
$(CC) -o packet.o packet.c $(CFLAGS) $(LIBS)
|
||||
|
||||
publickey.o: publickey.c
|
||||
$(CC) -o publickey.o publickey.c $(CFLAGS) $(LIBS)
|
||||
|
||||
scp.o: scp.c
|
||||
$(CC) -o scp.o scp.c $(CFLAGS) $(LIBS)
|
||||
|
||||
session.o: session.c
|
||||
$(CC) -o session.o session.c $(CFLAGS) $(LIBS)
|
||||
|
||||
sftp.o: sftp.c
|
||||
$(CC) -o sftp.o sftp.c $(CFLAGS) $(LIBS)
|
||||
|
||||
userauth.o: userauth.c
|
||||
$(CC) -o userauth.o userauth.c $(CFLAGS) $(LIBS)
|
||||
|
||||
libssh2.@SHLIB_SUFFIX_NAME@: $(OBJECTS)
|
||||
$(LDCC) -o libssh2.@SHLIB_SUFFIX_NAME@ $(SHLIB_LDFLAGS) $(OBJECTS) $(LIBS) $(LDFLAGS)
|
||||
libssh2.a: $(OBJECTS)
|
||||
rm -f libssh2.a
|
||||
ar q libssh2.a $(OBJECTS)
|
||||
@RANLIB@ libssh2.a
|
||||
install: all
|
||||
$(INSTALL) libssh2.@SHLIB_SUFFIX_NAME@ $(DESTDIR)$(libdir)
|
||||
clean:
|
||||
rm -f *~ libssh2.a libssh2.@SHLIB_SUFFIX_NAME@ *.o
|
||||
|
@ -1,113 +0,0 @@
|
||||
/* include/libssh2_config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#undef HAVE_SYS_UIO_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Enable "none" cipher -- NOT RECOMMENDED */
|
||||
#undef LIBSSH2_CRYPT_NONE
|
||||
|
||||
/* Output connection layer debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_CONNECTION
|
||||
|
||||
/* Output failure events to stderr */
|
||||
#undef LIBSSH2_DEBUG_ERRORS
|
||||
|
||||
/* Output Key Exchange debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_KEX
|
||||
|
||||
/* Output publickey subsystem debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_PUBLICKEY
|
||||
|
||||
/* Output scp subsystem debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_SCP
|
||||
|
||||
/* Output sftp subsystem debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_SFTP
|
||||
|
||||
/* Output transport layer debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_TRANSPORT
|
||||
|
||||
/* Output userauth layer debugging info to stderr */
|
||||
#undef LIBSSH2_DEBUG_USERAUTH
|
||||
|
||||
/* Enable newer diffie-hellman-group-exchange-sha1 syntax */
|
||||
#undef LIBSSH2_DH_GEX_NEW
|
||||
|
||||
/* Compile in zlib support */
|
||||
#undef LIBSSH2_HAVE_ZLIB
|
||||
|
||||
/* Enable "none" MAC -- NOT RECOMMENDED */
|
||||
#undef LIBSSH2_MAC_NONE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
Loading…
x
Reference in New Issue
Block a user