forked from kristapsdz/openrsync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
96 lines (81 loc) · 2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
include Makefile.configure
OBJS = batch.o \
blocks.o \
cleanup.o \
client.o \
compats.o \
copy.o \
daemon.o \
daemon_cfg.o \
daemon_misc.o \
downloader.o \
fargs.o \
flist.o \
hash.o \
ids.o \
io.o \
log.o \
md4.o \
misc.o \
mkpath.o \
mktemp.o \
platform.o \
receiver.o \
rmatch.o \
rules.o \
sender.o \
server.o \
session.o \
socket.o \
strmode.o \
symlinks.o \
uploader.o
ZLIBOBJS = zlib/adler32.o \
zlib/compress.o \
zlib/crc32.o \
zlib/deflate.o \
zlib/inffast.o \
zlib/inflate.o \
zlib/inftrees.o \
zlib/trees.o \
zlib/zutil.o
ALLOBJS = $(OBJS) $(ZLIBOBJS) \
main.o
AFLS = afl/test-blk_recv \
afl/test-flist_recv
all: openrsync
afl: $(AFLS)
openrsync: $(ALLOBJS)
$(CC) $(LDFLAGS) -o $@ $(ALLOBJS) -lm -lutil -lsbuf $(LDADD_LIB_SOCKET) $(LDADD_SCAN_SCALED)
$(AFLS): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $*.c $(OBJS)
install: all
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man1
mkdir -p $(DESTDIR)$(MANDIR)/man5
$(INSTALL_MAN) openrsync.1 $(DESTDIR)$(MANDIR)/man1
$(INSTALL_MAN) rsync.5 rsyncd.5 rsyncd.conf.5 $(DESTDIR)$(MANDIR)/man5
$(INSTALL_PROGRAM) openrsync $(DESTDIR)$(BINDIR)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/openrsync
rm -f $(DESTDIR)$(MANDIR)/man1/openrsync.1
rm -f $(DESTDIR)$(MANDIR)/man5/rsync.5
rm -f $(DESTDIR)$(MANDIR)/man5/rsyncd.5
rm -f $(DESTDIR)$(MANDIR)/man5/rsyncd.conf.5
clean:
rm -f $(ALLOBJS) openrsync $(AFLS)
distclean: clean
rm -f Makefile.configure config.h config.log
distcheck:
mandoc -Tlint -Werror *.[15]
rm -rf .distcheck
mkdir .distcheck
cp *.c extern.h md4.h *.[15] configure Makefile .distcheck
( cd .distcheck && ./configure PREFIX=prefix )
( cd .distcheck && $(MAKE) )
( cd .distcheck && $(MAKE) install )
rm -rf .distcheck
regress:
# Do nothing.
$(ALLOBJS) $(AFLS): extern.h config.h
blocks.o downloader.o hash.o md4.o: md4.h