]> git.sesse.net Git - betaftpd/blob - Makefile.in
Fixed a security problem where the custom snprintf() would always be used. Thanks...
[betaftpd] / Makefile.in
1 VERSION=0.0.8pre18
2
3 # main target
4 all: betaftpd
5
6 # various defines
7 CC = @CC@
8 VPATH = @srcdir@
9 prefix = @prefix@
10
11 CFLAGS      = @CFLAGS@
12 CPPFLAGS    = @DEFS@ -I@srcdir@ -I. -DVERSION=\"$(VERSION)\"
13 LIBS        = @LIBS@
14 OBJS        = disp.o ftpd.o cmds.o nonroot.o ascii.o dcache.o
15 ASSMS       = ${OBJS:.o=.s}
16 CPPS        = ${OBJS:.o=.i}
17
18 # Since we use VPATH, override .c.o rule
19 .c.o:   $*.c config.h
20         $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/$*.c
21 .c.s:   $*.c config.h
22         $(CC) $(CFLAGS) $(CPPFLAGS) -S @srcdir@/$*.c
23
24 # deps
25 cmds.o:         @srcdir@/cmds.c @srcdir@/ftpd.h @srcdir@/cmds.h @srcdir@/nonroot.h @srcdir@/dcache.h config.h
26 ftpd.o:         @srcdir@/ftpd.c @srcdir@/ftpd.h @srcdir@/cmds.h @srcdir@/dcache.h config.h
27 disp.o:         @srcdir@/disp.c @srcdir@/ftpd.h config.h
28 nonroot.o:      @srcdir@/nonroot.c @srcdir@/nonroot.h config.h
29 ascii.o:        @srcdir@/ascii.c @srcdir@/ascii.h config.h
30 dcache.o:       @srcdir@/dcache.c @srcdir@/dcache.h config.h
31
32 betaftpd: $(OBJS)
33         $(CC) $(CFLAGS) -o betaftpd $(OBJS) $(LIBS)
34 assembly-files: $(ASSMS)
35 betaftpd-from-assembly-files: $(ASSMS)
36         $(CC) $(LIBS) -o betaftpd -Wl,--sort-common $(ASSMS)
37
38 clean:
39         rm -f $(OBJS) $(ASSMS) $(CPPS)
40         rm -f core
41         rm -f betaftpd
42
43 distclean: clean
44         rm -f config.log config.cache config.status Makefile config.h
45
46 install: betaftpd
47         install betaftpd $(prefix)/sbin/betaftpd
48
49 #
50 # NOTE: This is not intended for end users, and should be run from a
51 # configured BetaFTPD in the source directory only.
52 #
53 package:
54 #       strip-exec
55         rm -rf betaftpd-$(VERSION)
56         mkdir betaftpd-$(VERSION)
57         mkdir betaftpd-$(VERSION)/doc
58         mkdir betaftpd-$(VERSION)/debian
59 #       cp betaftpd betaftpd-$(VERSION)
60         make distclean
61         autoconf
62         autoheader configure.in > config.h.in
63         @echo "The user packaging this package didn't have cvs2cl.pl available," > ChangeLog
64         @echo "or he/she was offline during packaging. No ChangeLog is available." >> ChangeLog
65         -cvs2cl.pl -U users
66         cp ChangeLog README Makefile.in acconfig.h cmds.c cmds.h betaftpd-$(VERSION)
67         cp config.h.in configure configure.in disp.c ftpd.c betaftpd-$(VERSION)
68         cp nonroot.c ascii.c ascii.h nonroot.h ftpd.h betaftpd-$(VERSION)
69         cp dcache.c dcache.h strip-exec betaftpd.lsm betaftpd-$(VERSION)
70         cp doc/CREDITS doc/CHANGES doc/CHANGES-0.0.8 doc/COPYING betaftpd-$(VERSION)/doc
71         cp doc/KNOWN-BUGS doc/RFC-COMPLIANCE doc/README.nonroot betaftpd-$(VERSION)/doc
72         cp doc/README.rights doc/README.platforms betaftpd-$(VERSION)/doc
73         cp debian/README.debian debian/betaftpd.7 debian/changelog betaftpd-$(VERSION)/debian
74         cp debian/control debian/copyright debian/dirs betaftpd-$(VERSION)/debian
75         cp debian/init.d debian/rules debian/watch.ex betaftpd-$(VERSION)/debian
76         tar cf - betaftpd-$(VERSION)/ | gzip -9vv > betaftpd-$(VERSION).tar.gz
77         tar cf - betaftpd-$(VERSION)/ | bzip2 -4vv > betaftpd-$(VERSION).tar.bz2