separated out the make_backup code in preparation for some patches
[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@
95a38e86 12
c627d613
AT
13INSTALLCMD=@INSTALL@
14
d0390cd3 15srcdir=@srcdir@
4040be4d 16VPATH=$(srcdir)
c627d613
AT
17SHELL=/bin/sh
18
19
20.SUFFIXES:
21.SUFFIXES: .c .o
22
8de330a3 23LIBOBJ=lib/getopt.o lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o
5914bf15
PM
24ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
25 zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
8de330a3 26 zlib/zutil.o zlib/adler32.o
3d19b4c8 27OBJS1=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
4c36ddbe 28OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o
bcb7e502 29DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
5914bf15 30OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ)
c627d613 31
366bd905 32# note that the -I. is needed to handle config.h when using VPATH
c627d613 33.c.o:
692da0b5
DD
34@OBJ_SAVE@
35 $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
36@OBJ_RESTORE@
c627d613 37
a87b3b2a
AT
38all: rsync
39
40man: rsync.1 rsyncd.conf.5
c627d613
AT
41
42install: all
4040be4d
DD
43 -mkdir -p ${bindir}
44 ${INSTALLCMD} -m 755 rsync ${bindir}
45 -mkdir -p ${mandir}/man1
46 -mkdir -p ${mandir}/man5
47 ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${mandir}/man1
48 ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${mandir}/man5
49
50install-strip:
51 $(MAKE) INSTALLCMD='$(INSTALLCMD) -s' install
c627d613 52
95a38e86 53rsync: $(OBJS)
da81e215 54 $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
c627d613 55
41059f75 56rsync.1: rsync.yo
a87b3b2a 57 yodl2man -o rsync.1 rsync.yo
41059f75
AT
58
59rsyncd.conf.5: rsyncd.conf.yo
a87b3b2a 60 yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
41059f75 61
c627d613
AT
62proto:
63 cat *.c | awk -f mkproto.awk > proto.h
64
65clean:
8de330a3 66 rm -f *~ $(OBJS) rsync
c627d613 67
af21c12f
DD
68distclean: clean
69 rm -f config.h config.cache config.status Makefile
70
6e4fb64e
AT
71
72# this target is really just for my use. It only works on a limited
73# range of machines and is used to produce a list of potentially
74# dead (ie. unused) functions in the code. (tridge)
75finddead:
76 nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
77 nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
78 comm -13 nmused.txt nmfns.txt