aboutsummaryrefslogtreecommitdiff
path: root/sftp_server/Makefile
blob: 116fd20b93d25a5e27d0e9a8d3f7503be8ac7c0e (plain)
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
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}
bindir = $(exec_prefix)/bin
incldir= $(prefix)/include
infodir = $(prefix)/info
libdir = $(prefix)/lib/
mandir = $(prefix)/man/man1

CC = gcc
CFLAGS = -g -O2 -Wall -I../include/ -Ilibconfig/
LDFLAGS = 
LIBS = -lz -lgcrypt  -lpam
INSTALL = /usr/bin/install -c
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBSSH_LDFLAGS = 

all: sftp_server

main.o: server.h libconfig/libconfig.h
list.o: server.h libconfig/libconfig.h
protocol.o: server.h libconfig/libconfig.h
userauth.o: server.h libconfig/libconfig.h
config.o: server.h libconfig/libconfig.h

libconfig/libconfig.a: libconfig/libconfig.h
	make -C libconfig/
../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.la
	$(LIBTOOL) --mode=link $(CC) -o sftp_server $(OBJECTS) $(LIBS) $(LDFLAGS)
install: all
	$(top_srcdir)/mkinstalldirs $(incldir)
	$(top_srcdir)/mkinstalldirs $(libdir)
	$(LIBTOOL) --mode=install $(INSTALL) sftp_server  $(bindir)
clean:
	$(LIBTOOL) --mode=clean rm -f *~ sftp_server *.o
distclean: clean
	rm -f Makefile