3 # Makefile for systems with GNU tools
7 IFLAGS
= -idirafter dummyinc
9 CFLAGS
= -O2
-Wall
$(EXTRACFLAGS
) -ffunction-sections
-fdata-sections
-W
-Wshadow
#-pedantic -Werror -Wconversion
10 LDFLAGS
= -ffunction-sections
-fdata-sections
-Wl
,--gc-sections
12 #LIBS = `./vsf_findlibs.sh`
17 CFLAGS
+= -I
$(TOP
)/shared
19 ifeq ($(TCONFIG_FTP_SSL
),y
)
20 OPENSSLDIR
= $(TOP
)/openssl
21 OPENSSLINC
= $(OPENSSLDIR
)/include
22 LIBS
+= -L
$(OPENSSLDIR
)/ -lssl
-lcrypto
23 CFLAGS
+= -I
$(OPENSSLINC
)
27 OBJS
= main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
28 tunables.o ftpdataio.o secbuf.o ls.o \
29 postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o \
30 banner.o filestr.o parseconf.o secutil.o \
31 ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o \
32 tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o \
33 ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o
37 $(CC
) -c
$*.c
$(CFLAGS
) $(IFLAGS
)
40 $(CC
) -o vsftpd
$(OBJS
) $(LINK
) $(LIBS
) $(LDFLAGS
)
43 if
[ -x
/usr
/local
/sbin
]; then \
44 $(INSTALL
) -m
755 vsftpd
/usr
/local
/sbin
/vsftpd
; \
46 $(INSTALL
) -m
755 vsftpd
/usr
/sbin
/vsftpd
; fi
47 if
[ -x
/usr
/local
/man
]; then \
48 $(INSTALL
) -m
644 vsftpd
.8 /usr
/local
/man
/man8
/vsftpd
.8; \
49 $(INSTALL
) -m
644 vsftpd.conf
.5 /usr
/local
/man
/man5
/vsftpd.conf
.5; \
50 elif
[ -x
/usr
/share
/man
]; then \
51 $(INSTALL
) -m
644 vsftpd
.8 /usr
/share
/man
/man8
/vsftpd
.8; \
52 $(INSTALL
) -m
644 vsftpd.conf
.5 /usr
/share
/man
/man5
/vsftpd.conf
.5; \
54 $(INSTALL
) -m
644 vsftpd
.8 /usr
/man
/man8
/vsftpd
.8; \
55 $(INSTALL
) -m
644 vsftpd.conf
.5 /usr
/man
/man5
/vsftpd.conf
.5; fi
56 if
[ -x
/etc
/xinetd.d
]; then \
57 $(INSTALL
) -m
644 xinetd.d
/vsftpd
/etc
/xinetd.d
/vsftpd
; fi
60 rm -f
*.o
*.swp vsftpd