Try to get IPv6 support, unless --disable-ipv6 is explicitly specified.
[rsync/rsync.git] / Makefile.in
CommitLineData
c627d613
AT
1# Makefile for rsync. This is processed by configure to produce the final
2# Makefile
3
6dd1782c
AT
4prefix=@prefix@
5exec_prefix=@exec_prefix@
4040be4d
DD
6bindir=@bindir@
7mandir=@mandir@
c627d613 8
c627d613 9LIBS=@LIBS@
95a38e86 10CC=@CC@
ce2ac5ac 11CFLAGS=@CFLAGS@
6a48ca56 12LDFLAGS=@LDFLAGS@
95a38e86 13
c627d613
AT
14INSTALLCMD=@INSTALL@
15
d0390cd3 16srcdir=@srcdir@
4040be4d 17VPATH=$(srcdir)
c627d613
AT
18SHELL=/bin/sh
19
c627d613
AT
20.SUFFIXES:
21.SUFFIXES: .c .o
22
c485a357 23LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o
06963d0f 24 @LIBOBJS@
5914bf15
PM
25ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
26 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
8de330a3 27 zlib/zutil.o zlib/adler32.o
3d19b4c8 28OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o main.o checksum.o match.o syscall.o log.o backup.o
6902ed17 29OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o batch.o
bcb7e502 30DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
1ac15cd8
MP
31popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
32 popt/popthelp.o popt/poptparse.o
33OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
c627d613 34
7df0935a
MP
35tls_OBJ = tls.o syscall.o
36
37# Programs we must have to run the test cases
38CHECK_PROGS = rsync tls
39
366bd905 40# note that the -I. is needed to handle config.h when using VPATH
c627d613 41.c.o:
692da0b5
DD
42@OBJ_SAVE@
43 $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
44@OBJ_RESTORE@
c627d613 45
a87b3b2a
AT
46all: rsync
47
48man: rsync.1 rsyncd.conf.5
c627d613
AT
49
50install: all
4040be4d
DD
51 -mkdir -p ${bindir}
52 ${INSTALLCMD} -m 755 rsync ${bindir}
53 -mkdir -p ${mandir}/man1
54 -mkdir -p ${mandir}/man5
55 ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${mandir}/man1
56 ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${mandir}/man5
57
58install-strip:
59 $(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
c627d613 60
95a38e86 61rsync: $(OBJS)
4ff3d9d6
MP
62 $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
63
7df0935a
MP
64tls: $(tls_OBJ)
65 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(tls_OBJ) $(LIBS)
66
4ff3d9d6 67Makefile: Makefile.in configure config.status
82ed9106 68 echo "WARNING: You need to run ./config.status --recheck"
4ff3d9d6 69
f62c17e3 70# don't actually run autoconf, just issue a warning
4ff3d9d6 71configure: configure.in
f62c17e3 72 echo "WARNING: you need to rerun autoconf"
c627d613 73
41059f75 74rsync.1: rsync.yo
a87b3b2a 75 yodl2man -o rsync.1 rsync.yo
41059f75
AT
76
77rsyncd.conf.5: rsyncd.conf.yo
a87b3b2a 78 yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
41059f75 79
c627d613 80proto:
3060d4aa 81 cat *.c lib/compat.c | awk -f mkproto.awk > proto.h
c627d613
AT
82
83clean:
8de330a3 84 rm -f *~ $(OBJS) rsync
42be5918 85 rm -rf ./testtmp
c627d613 86
af21c12f
DD
87distclean: clean
88 rm -f config.h config.cache config.status Makefile
89
06963d0f
MP
90# missing functions
91getaddrinfo.o: lib/getaddrinfo.c
92 $(CC) -I. -I$(srcdir) -I$(srcdir)/lib $(CFLAGS) -c lib/getaddrinfo.c
93getnameinfo.o: lib/getnameinfo.c
94 $(CC) -I. -I$(srcdir) -I$(srcdir)/lib $(CFLAGS) -c lib/getnameinfo.c
6e4fb64e
AT
95
96# this target is really just for my use. It only works on a limited
97# range of machines and is used to produce a list of potentially
98# dead (ie. unused) functions in the code. (tridge)
99finddead:
100 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
101 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
102 comm -13 nmused.txt nmfns.txt
a4772a4d
MP
103
104# 'check' is the GNU name, 'test' is the name for everybody else :-)
105.PHONY: check test
106
107test: check
108
e7d29902
MP
109
110# There seems to be no standard way to specify some variables as
111# exported from a Makefile apart from listing them like this.
112
7df0935a
MP
113# TODO: Tests that depend on built test aide programs like tls need to
114# know where the build directory is.
e7d29902 115
3a4c683f
MP
116# This depends on building rsync; if we need any helper programs it
117# should depend on them too.
118
42be5918
MP
119# We try to run the scripts with POSIX mode on, in the hope that will
120# catch Bash-isms earlier even if we're running on GNU. Of course, we
121# might lose in the future where POSIX diverges from old sh.
122
7df0935a 123check: all $(CHECK_PROGS)
a4b4af88 124 POSIXLY_CORRECT=1 rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 125
3a4c683f
MP
126# This does *not* depend on building or installing: you can use it to
127# check a version installed from a binary or some other source tree,
128# if you want.
129
7df0935a 130installcheck: $(CHECK_PROGS)
42be5918 131 POSIXLY_CORRECT=1 rsync_bin="$(bindir)/rsync" srcdir="$(srcdir)" $(srcdir)/runtests.sh
e7d29902 132
7ad1d4fd
MP
133$(OBJS): config.h *.h */*.h
134