aboutsummaryrefslogtreecommitdiff
path: root/sftp_server
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2005-10-25 23:11:41 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2005-10-25 23:11:41 +0000
commit9a2683f183338da7c82261d502cdeff0855c210c (patch)
tree7a3f8ba8b1b754a1dd49c28bd175403d96d6ec2d /sftp_server
parentd86f0017545f0076a1136b5c6f8b0a7a58366342 (diff)
downloadlibssh-9a2683f183338da7c82261d502cdeff0855c210c.tar.gz
libssh-9a2683f183338da7c82261d502cdeff0855c210c.tar.xz
libssh-9a2683f183338da7c82261d502cdeff0855c210c.zip
added Jean-Philippe's patch for libtools. it doesn't compile on my computer.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@40 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'sftp_server')
-rw-r--r--sftp_server/Makefile23
-rw-r--r--sftp_server/Makefile.in21
-rw-r--r--sftp_server/main.c2
-rw-r--r--sftp_server/protocol.c1
-rw-r--r--sftp_server/userauth.c2
5 files changed, 28 insertions, 21 deletions
diff --git a/sftp_server/Makefile b/sftp_server/Makefile
index 325e2bb4..116fd20b 100644
--- a/sftp_server/Makefile
+++ b/sftp_server/Makefile
@@ -1,10 +1,11 @@
-OBJECTS= main.o config.o list.o protocol.o userauth.o file.o acl.o \
- libconfig/libconfig.a ../libssh/libssh.a
+OBJECTS= main.o config.o list.o protocol.o userauth.o acl.o \
+ libconfig/libconfig.a ../libssh/libssh.la
SHELL = /bin/sh
subdirs = @subdirs@
top_srcdir = ..
+top_builddir = ../
srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
@@ -17,10 +18,10 @@ mandir = $(prefix)/man/man1
CC = gcc
CFLAGS = -g -O2 -Wall -I../include/ -Ilibconfig/
LDFLAGS =
-LIBS = -lz -lcrypto -lpam -lcrypto
+LIBS = -lz -lgcrypt -lpam
INSTALL = /usr/bin/install -c
-DYLIB_EXTENSION = so
-LIBSSH_LDFLAGS = -shared
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBSSH_LDFLAGS =
all: sftp_server
@@ -32,20 +33,20 @@ config.o: server.h libconfig/libconfig.h
libconfig/libconfig.a: libconfig/libconfig.h
make -C libconfig/
-../libssh/libssh.a:
- make -C ../libssh/ libssh.a
+../libssh/libssh.la:
+ make -C ../libssh/ libssh.la
libconfig/libconfig.h:
cd libconfig ; ./configure ; cd ..
make -C libconfig/
sftp_server: $(OBJECTS)
- make -C ../libssh libssh.a
- $(CC) -o sftp_server $(OBJECTS) $(LIBS) $(LDFLAGS)
+# make -C ../libssh libssh.la
+ $(LIBTOOL) --mode=link $(CC) -o sftp_server $(OBJECTS) $(LIBS) $(LDFLAGS)
install: all
$(top_srcdir)/mkinstalldirs $(incldir)
$(top_srcdir)/mkinstalldirs $(libdir)
- $(INSTALL) sftp_server $(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL) sftp_server $(bindir)
clean:
- rm -f *~ sftp_server *.o
+ $(LIBTOOL) --mode=clean rm -f *~ sftp_server *.o
distclean: clean
rm -f Makefile
diff --git a/sftp_server/Makefile.in b/sftp_server/Makefile.in
index 55c9f3cf..957974c7 100644
--- a/sftp_server/Makefile.in
+++ b/sftp_server/Makefile.in
@@ -1,10 +1,11 @@
-OBJECTS= main.o config.o list.o protocol.o userauth.o file.o acl.o \
- libconfig/libconfig.a ../libssh/libssh.a
+OBJECTS= main.o config.o list.o protocol.o userauth.o acl.o \
+ libconfig/libconfig.a ../libssh/libssh.la
SHELL = /bin/sh
VPATH = @srcdir@
subdirs = @subdirs@
top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -17,9 +18,9 @@ mandir = $(prefix)/man/man1
CC = @CC@
CFLAGS = @CFLAGS@ -Wall -I../include/ -Ilibconfig/
LDFLAGS =
-LIBS = @LIBS@ -lpam -lcrypto
+LIBS = @LIBS@ -lpam
INSTALL = @INSTALL@
-DYLIB_EXTENSION = @DYLIB_EXTENSION@
+LIBTOOL = @LIBTOOL@
LIBSSH_LDFLAGS = @LIBSSH_LDFLAGS@
all: sftp_server
@@ -32,20 +33,20 @@ config.o: server.h libconfig/libconfig.h
libconfig/libconfig.a: libconfig/libconfig.h
make -C libconfig/
-../libssh/libssh.a:
- make -C ../libssh/ libssh.a
+../libssh/libssh.la:
+ make -C ../libssh/ libssh.la
libconfig/libconfig.h:
cd libconfig ; ./configure ; cd ..
make -C libconfig/
sftp_server: $(OBJECTS)
- make -C ../libssh libssh.a
- $(CC) -o sftp_server $(OBJECTS) $(LIBS) $(LDFLAGS)
+# make -C ../libssh libssh.la
+ $(LIBTOOL) --mode=link $(CC) -o sftp_server $(OBJECTS) $(LIBS) $(LDFLAGS)
install: all
$(top_srcdir)/mkinstalldirs $(incldir)
$(top_srcdir)/mkinstalldirs $(libdir)
- $(INSTALL) sftp_server $(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL) sftp_server $(bindir)
clean:
- rm -f *~ sftp_server *.o
+ $(LIBTOOL) --mode=clean rm -f *~ sftp_server *.o
distclean: clean
rm -f Makefile
diff --git a/sftp_server/main.c b/sftp_server/main.c
index b9811f9c..8e1d8f60 100644
--- a/sftp_server/main.c
+++ b/sftp_server/main.c
@@ -26,6 +26,8 @@ MA 02111-1307, USA. */
#include <unistd.h>
#include <string.h>
#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "server.h"
diff --git a/sftp_server/protocol.c b/sftp_server/protocol.c
index 31eaf803..306afed4 100644
--- a/sftp_server/protocol.c
+++ b/sftp_server/protocol.c
@@ -33,6 +33,7 @@ MA 02111-1307, USA. */
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "server.h"
#define TYPE_DIR 1
diff --git a/sftp_server/userauth.c b/sftp_server/userauth.c
index e978ed02..1ae6d0c0 100644
--- a/sftp_server/userauth.c
+++ b/sftp_server/userauth.c
@@ -36,6 +36,8 @@ MA 02111-1307, USA. */
#include <pwd.h>
#include <errno.h>
#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "server.h"
#define SERVICE "sftp"