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