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