2004-12-07 21:17:20 +00:00
|
|
|
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@
|
2006-04-07 20:44:26 +00:00
|
|
|
CFLAGS = -c @CFLAGS@ -Iinclude/ -Wall
|
2004-12-07 21:17:20 +00:00
|
|
|
LIBS = -lssh2 -Lsrc/
|
|
|
|
INSTALL = @INSTALL@
|
2004-12-31 20:40:40 +00:00
|
|
|
VERSION=@PACKAGE_VERSION@
|
2004-12-07 21:17:20 +00:00
|
|
|
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"
|
2006-02-23 23:14:35 +00:00
|
|
|
sample:
|
2004-12-07 21:17:20 +00:00
|
|
|
$(CC) -o ssh2_sample.o ssh2_sample.c $(CFLAGS)
|
|
|
|
$(CC) -o ssh2_sample ssh2_sample.o $(LIBS)
|
2006-01-06 17:34:03 +00:00
|
|
|
install: all
|
2004-12-26 21:54:19 +00:00
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(incldir)
|
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
2004-12-07 21:17:20 +00:00
|
|
|
@for dir in ${subdirs}; do \
|
|
|
|
(cd $$dir && $(MAKE) install) \
|
|
|
|
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
|
|
|
done && test -z "$$fail"
|
2004-12-26 21:54:19 +00:00
|
|
|
$(INSTALL) -m 644 include/libssh2.h $(DESTDIR)$(incldir)/
|
|
|
|
$(INSTALL) -m 644 include/libssh2_sftp.h $(DESTDIR)$(incldir)/
|
2005-07-21 20:28:07 +00:00
|
|
|
$(INSTALL) -m 644 include/libssh2_publickey.h $(DESTDIR)$(incldir)/
|
2004-12-07 21:17:20 +00:00
|
|
|
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 \
|
2004-12-08 04:12:31 +00:00
|
|
|
$(DISTLIB)/configure $(DISTLIB)/Makefile.in $(DISTLIB)/ssh2_sample.c \
|
2005-02-09 19:26:42 +00:00
|
|
|
$(DISTLIB)/LICENSE $(DISTLIB)/README $(DISTLIB)/INSTALL \
|
2005-01-01 23:38:34 +00:00
|
|
|
$(DISTLIB)/mkinstalldirs $(DISTLIB)/install-sh $(DISTLIB)/config.sub $(DISTLIB)/config.guess \
|
2004-12-07 21:17:20 +00:00
|
|
|
$(DISTLIB)/src/*.c $(DISTLIB)/src/Makefile.in \
|
2004-12-22 00:20:02 +00:00
|
|
|
$(DISTLIB)/include/libssh2.h $(DISTLIB)/include/libssh2_priv.h $(DISTLIB)/include/libssh2_sftp.h \
|
2005-07-21 20:28:07 +00:00
|
|
|
$(DISTLIB)/include/libssh2_publickey.h $(DISTLIB)/include/libssh2_config.h.in \
|
2005-02-18 16:15:24 +00:00
|
|
|
$(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
|
2004-12-07 21:17:20 +00:00
|
|
|
rm -f $(DISTLIB)
|
2005-01-10 19:58:23 +00:00
|
|
|
dist_nmake:
|
|
|
|
autoheader
|
|
|
|
autoconf
|
|
|
|
rm -f $(DISTLIB)
|
|
|
|
ln -s . $(DISTLIB)
|
|
|
|
tar -zcf $(DISTLIB)-win32.tar.gz \
|
|
|
|
$(DISTLIB)/NMakefile $(DISTLIB)/ssh2_sample.c $(DISTLIB)/src/*.c \
|
|
|
|
$(DISTLIB)/LICENSE $(DISTLIB)/README $(DISTLIB)/TODO $(DISTLIB)/INSTALL \
|
|
|
|
$(DISTLIB)/include/libssh2.h $(DISTLIB)/include/libssh2_priv.h $(DISTLIB)/include/libssh2_sftp.h \
|
2005-07-21 20:28:07 +00:00
|
|
|
$(DISTLIB)/include/libssh2_publickey.h \
|
2005-01-10 19:58:23 +00:00
|
|
|
$(DISTLIB)/win32/config.mk $(DISTLIB)/win32/libssh2_config.h $(DISTLIB)/win32/rules.mk
|
|
|
|
rm -f $(DISTLIB)
|
|
|
|
|