rsync.c was getting a bit unwieldy so I split the code into 3 modules,
[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 INSTALL_BIN=$(exec_prefix)/bin
7 INSTALL_MAN=$(prefix)/man
8
9 LIBS=@LIBS@
10 CC=@CC@
11 CFLAGS=@CFLAGS@
12
13 INSTALLCMD=@INSTALL@
14
15 VPATH=@srcdir@
16 srcdir=@srcdir@
17 SHELL=/bin/sh
18
19
20 .SUFFIXES:
21 .SUFFIXES: .c .o
22
23 LIBOBJ=lib/getopt.o lib/fnmatch.o lib/compat.o
24 ZLIBOBJ=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 \
26         zlib/zutil.o zlib/adler32.o
27 OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o md4.o main.o checksum.o match.o syscall.o log.o
28 OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o
29 DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
30 OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ)
31
32 # note that the -I. is needed to handle config.h when using VPATH
33 .c.o:
34         $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@
35
36 all: rsync
37
38 man: rsync.1 rsyncd.conf.5
39
40 install: all
41         -mkdir -p ${INSTALL_BIN}
42         ${INSTALLCMD} -m 755 rsync ${INSTALL_BIN}
43         -mkdir -p ${INSTALL_MAN}/man1
44         -mkdir -p ${INSTALL_MAN}/man5
45         ${INSTALLCMD} -m 644 $(srcdir)/rsync.1 ${INSTALL_MAN}/man1
46         ${INSTALLCMD} -m 644 $(srcdir)/rsyncd.conf.5 ${INSTALL_MAN}/man5
47
48 rsync: $(OBJS)
49         $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS)
50
51 rsync.1: rsync.yo
52         yodl2man -o rsync.1 rsync.yo
53
54 rsyncd.conf.5: rsyncd.conf.yo
55         yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
56
57 proto:
58         cat *.c | awk -f mkproto.awk > proto.h
59
60 clean:
61         rm -f *~ $(OBJS) rsync config.cache config.log config.status
62