9a2683f183
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@40 7dcaeef0-15fb-0310-b436-a5af3365683c
82 строки
2.6 KiB
Makefile
82 строки
2.6 KiB
Makefile
SHELL = /bin/sh
|
|
VPATH = @srcdir@
|
|
|
|
subdirs = libssh/ sftp_server/
|
|
top_srcdir = @top_srcdir@
|
|
top_builddir = .
|
|
srcdir = @srcdir@
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = $(exec_prefix)/bin
|
|
incldir= $(prefix)/include
|
|
infodir = $(prefix)/info
|
|
libdir = $(prefix)/lib/
|
|
mandir = $(prefix)/man/man1
|
|
|
|
CC = @CC@
|
|
CFLAGS = @CFLAGS@ -Iinclude/ -Wall
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = -lssh -Llibssh/
|
|
INSTALL = @INSTALL@
|
|
LN= @LN_S@
|
|
LIBTOOL= @LIBTOOL@
|
|
OBJECTS= sample.o samplesshd.o
|
|
VERSION=0.12-dev
|
|
DISTLIB=libssh-$(VERSION)
|
|
CONFIG=include/libssh/config.h
|
|
all: $(CONFIG) $(OBJECTS)
|
|
@for dir in ${subdirs}; do \
|
|
(cd $$dir && $(MAKE) all) \
|
|
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
|
done && test -z "$$fail"
|
|
$(LIBTOOL) --mode=link $(CC) -o samplessh sample.o $(LDFLAGS) $(LIBS)
|
|
$(LN) -sf samplessh samplesftp
|
|
$(LIBTOOL) --mode=link $(CC) -o samplesshd samplesshd.o $(LDFLAGS) $(LIBS)
|
|
$(CONFIG):
|
|
$(LN) -f ../../config.h $(CONFIG)
|
|
dist:
|
|
rm -fr $(DISTLIB)
|
|
mkdir $(DISTLIB)
|
|
cp Makefile.in configure.in configure config.h.in install-sh \
|
|
ltmain.sh mkinstalldirs config.sub config.guess $(DISTLIB)
|
|
mkdir $(DISTLIB)/libssh
|
|
mkdir $(DISTLIB)/include
|
|
mkdir $(DISTLIB)/include/libssh
|
|
mkdir $(DISTLIB)/doc
|
|
cp libssh/Makefile.in $(DISTLIB)/libssh/
|
|
cp libssh/*.c $(DISTLIB)/libssh/
|
|
cp include/libssh/libssh.h include/libssh/sftp.h \
|
|
include/libssh/priv.h include/libssh/crypto.h \
|
|
include/libssh/ssh1.h include/libssh/ssh2.h \
|
|
include/libssh/server.h $(DISTLIB)/include/libssh/
|
|
cp *.c COPYING README AUTHORS CHANGELOG $(DISTLIB)/
|
|
cp doc/* $(DISTLIB)/doc/
|
|
tar czf $(DISTLIB).tgz $(DISTLIB)/
|
|
install: all
|
|
@for dir in ${subdirs}; do \
|
|
(cd $$dir && $(MAKE) install) \
|
|
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
|
done && test -z "$$fail"
|
|
$(top_srcdir)/mkinstalldirs $(incldir)/libssh
|
|
$(INSTALL) include/libssh/libssh.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/config.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/sftp.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/crypto.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/server.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/ssh2.h $(incldir)/libssh/
|
|
$(INSTALL) include/libssh/ssh1.h $(incldir)/libssh/
|
|
clean:
|
|
$(LIBTOOL) --mode=clean rm -f *~ *.o samplessh samplesftp samplesshd include/libssh/config.h
|
|
@for dir in ${subdirs}; do \
|
|
(cd $$dir && $(MAKE) clean) \
|
|
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
|
done && test -z "$$fail"
|
|
|
|
distclean: clean
|
|
@for dir in ${subdirs}; do \
|
|
(cd $$dir && $(MAKE) distclean) \
|
|
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
|
done && test -z "$$fail"
|
|
rm -f Makefile config.h config.status config.cache config.log libtool
|
|
|