File: Makefile.am

package info (click to toggle)
gesftpserver 1~ds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 896 kB
  • sloc: ansic: 7,887; python: 192; makefile: 60; sh: 4
file content (99 lines) | stat: -rw-r--r-- 3,189 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# This file is part of the Green End SFTP Server.
# Copyright (C) 2007, 2011, 2014 Richard Kettlewell
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA

# Programs
noinst_PROGRAMS=sftpclient pwtest
noinst_SCRIPTS=run-tests
libexec_PROGRAMS=gesftpserver
noinst_LIBRARIES=libsftp.a

gesftpserver_SOURCES=sftpserver.c readwrite.c
gesftpserver_LDADD=libsftp.a

sftpclient_SOURCES=sftpclient.c readwrite.c
sftpclient_LDADD=libsftp.a $(LIBREADLINE)

libsftp_a_SOURCES=alloc.c alloc.h debug.c debug.h globals.h handle.c	\
handle.h parse.c parse.h queue.c queue.h send.c send.h sftp.h		\
sftpclient.h sftpcommon.h sftpserver.h status.c thread.h types.h	\
users.c users.h utils.c utils.h v3.c xfns.c xfns.h stat.c charset.c	\
charset.h serialize.h serialize.c v4.c realpath.c readlink.c v5.c v6.c	\
stat.h getcwd.c globals.c dirname.c putword.h
libsftp_a_LIBADD=$(LIBOBJS)

pwtest_SOURCES=pwtest.c

# Documentation
man_MANS=gesftpserver.8

gesftpserver.8: gesftpserver.8.in config.status
	sed < ${srcdir}/gesftpserver.8.in > $@.new \
		-e "s,__libexecdir__,${libexecdir},g"
	mv $@.new $@

# Build and test
all: ${SEDOUTPUTS}

check: gesftpserver sftpclient pwtest aliases
	rm -f *.gcda *.gcov
	./pwtest
	srcdir=${srcdir} ${PYTHON24} ${srcdir}/run-tests --directory tests $(TESTS)
	srcdir=${srcdir} ${PYTHON24} ${srcdir}/run-tests --directory rotests --server ./gesftpserver-ro $(ROTESTS)
	${GCOV} ${srcdir}/*.c  | ${PYTHON24} ${srcdir}/format-gconv-report --html .

#${srcdir}/paramiko-test

check-valgrind: gesftpserver-valgrind sftpclient pwtest aliases
	rm -f ,valgrind*
	srcdir=${srcdir} ${PYTHON24} ${srcdir}/run-tests --directory tests --server ./gesftpserver-valgrind $(TESTS)

aliases: gesftpserver-ro gesftpserver-debug gesftpserver-ro-debug \
		gesftpserver-valgrind

gesftpserver-ro:
	rm -f $@
	ln -s gesftpserver $@

gesftpserver-debug:
	rm -f $@
	ln -s gesftpserver $@

gesftpserver-ro-debug:
	rm -f $@
	ln -s gesftpserver $@

gesftpserver-valgrind:
	echo "#! /bin/sh" > $@.new
	echo "set -e" >> $@.new
	echo "exec valgrind --leak-check=full -q --log-file=/dev/tty --num-callers=50 `pwd`/gesftpserver \"\$$@\"" >> $@.new
	chmod +x $@.new
	mv $@.new $@

# Cleaning
DISTCLEANFILES=${SEDOUTPUTS} gesftpserver.8
CLEANFILES=*.gcno *.gcda *.gcov gesftpserver-ro gesftpserver-debug gesftpserver-ro-debug gesftpserver-valgrind

# Distribution
EXTRA_DIST=gesftpserver.8.in testing.txt tests rotests README.md run-tests \
format-gconv-report getopt.c getopt1.c getopt.h CHANGES.md

%.s: %.c
	$(COMPILE) -o $@ -S $<

version:
	@echo $(VERSION)