Use set -x until this script works properly.
[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
20
21.SUFFIXES:
22.SUFFIXES: .c .o
23
c485a357 24LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o
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
366bd905 35# note that the -I. is needed to handle config.h when using VPATH
c627d613 36.c.o:
692da0b5
DD
37@OBJ_SAVE@
38 $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
39@OBJ_RESTORE@
c627d613 40
a87b3b2a
AT
41all: rsync
42
43man: rsync.1 rsyncd.conf.5
c627d613
AT
44
45install: all
4040be4d
DD
46 -mkdir -p ${bindir}
47 ${INSTALLCMD} -m 755 rsync ${bindir}
48 -mkdir -p ${mandir}/man1
49 -mkdir -p ${mandir}/man5
50 ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${mandir}/man1
51 ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${mandir}/man5
52
53install-strip:
54 $(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
c627d613 55
95a38e86 56rsync: $(OBJS)
4ff3d9d6
MP
57 $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
58
59Makefile: Makefile.in configure config.status
82ed9106 60 echo "WARNING: You need to run ./config.status --recheck"
4ff3d9d6 61
f62c17e3 62# don't actually run autoconf, just issue a warning
4ff3d9d6 63configure: configure.in
f62c17e3 64 echo "WARNING: you need to rerun autoconf"
c627d613 65
41059f75 66rsync.1: rsync.yo
a87b3b2a 67 yodl2man -o rsync.1 rsync.yo
41059f75
AT
68
69rsyncd.conf.5: rsyncd.conf.yo
a87b3b2a 70 yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
41059f75 71
c627d613 72proto:
3060d4aa 73 cat *.c lib/compat.c | awk -f mkproto.awk > proto.h
c627d613
AT
74
75clean:
8de330a3 76 rm -f *~ $(OBJS) rsync
c627d613 77
af21c12f
DD
78distclean: clean
79 rm -f config.h config.cache config.status Makefile
80
6e4fb64e
AT
81
82# this target is really just for my use. It only works on a limited
83# range of machines and is used to produce a list of potentially
84# dead (ie. unused) functions in the code. (tridge)
85finddead:
86 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
87 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
88 comm -13 nmused.txt nmfns.txt