-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.in
118 lines (93 loc) · 3.16 KB
/
Makefile.in
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#
# Makefile.in Makefile for the liblockfile package
#
MAJOR = 1
SOVER = 1.0
NFSVER = 0.1
CFLAGS = @CFLAGS@ -I.
LDFLAGS = @LDFLAGS@
CC = @CC@
prefix = $(DESTDIR)@prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
mandir = @mandir@
nfslockdir = @nfslockdir@
includedir = @includedir@
datarootdir = @datarootdir@
MAILGROUP = @MAILGROUP@
VERSION = $(shell sed -ne "1s/^liblockfile (\(.*\))/\1/p" < Changelog)
all: @TARGETS@
install: @INSTALL_TARGETS@
static: liblockfile.a dotlockfile
shared: liblockfile.so liblockfile.a dotlockfile
nfslib: nfslock.so.$(NFSVER)
liblockfile.a: lockfile.o
$(AR) rv liblockfile.a lockfile.o
liblockfile.so: solockfile.o
$(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,liblockfile.so.1 \
-o liblockfile.so solockfile.o -lc
nfslock.so.$(NFSVER): nfslock.o
$(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,nfslock.so.0 \
-o nfslock.so.$(NFSVER) nfslock.o
dotlockfile: dotlockfile.o dlockfile.o
$(CC) $(LDFLAGS) -o dotlockfile dotlockfile.o dlockfile.o
dotlockfile.o: dotlockfile.c
$(CC) $(CFLAGS) -DLOCKPROG=\"$(bindir)/dotlockfile\" \
-c dotlockfile.c
lockfile.o: lockfile.c
$(CC) $(CFLAGS) -DLIB -DLOCKPROG=\"$(bindir)/dotlockfile\" \
-DSTATIC -c lockfile.c
solockfile.o: lockfile.c
$(CC) $(CFLAGS) -DLIB -DLOCKPROG=\"$(bindir)/dotlockfile\" \
-c lockfile.c -o solockfile.o
dlockfile.o: lockfile.c
$(CC) $(CFLAGS) -DLOCKPROG=\"$(bindir)/dotlockfile\" \
-c lockfile.c -o dlockfile.o
install_static: static install_common
install -d -m 755 -g root -p $(libdir)
install -m 644 liblockfile.a $(libdir)
install_shared: shared install_static install_common
install -d -m 755 -g root -p $(libdir)
install -m 755 liblockfile.so \
$(libdir)/liblockfile.so.$(SOVER)
ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so.$(MAJOR)
ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so
if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi
install_common:
install -d -m 755 -g root -p $(includedir)
install -d -m 755 -g root -p $(bindir)
install -d -m 755 -g root -p $(mandir)/man1
install -d -m 755 -g root -p $(mandir)/man3
install -m 644 lockfile.h maillock.h $(includedir)
if [ "$(MAILGROUP)" != "" ]; then\
install -g $(MAILGROUP) -m 2755 dotlockfile $(bindir);\
else \
install -g root -m 755 dotlockfile $(bindir); \
fi
install -m 644 *.1 $(mandir)/man1
install -m 644 *.3 $(mandir)/man3
install_nfslib: nfslib
install -d -m 755 -g root -p $(nfslockdir)
install -m 755 nfslock.so.$(NFSVER) $(nfslockdir)
if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi
test: test-stamp
@:
test-stamp: dotlockfile
./run-tests.sh
touch test-stamp
tar: tarball
@:
tarball: clean
(tar --xform "s/^liblockfile/liblockfile-$(VERSION)/" \
--exclude Makefile --exclude autoconf.h --exclude maillock.h \
--exclude config.cache --exclude config.log --exclude config.status \
--exclude autom4te.cache \
--exclude-vcs --exclude-vcs-ignores \
-C .. -czf ../liblockfile-$(VERSION).tar.gz liblockfile )
clean:
rm -f *.a *.o *.so *.so.* dotlockfile test-stamp
distclean: clean
rm -f Makefile autoconf.h maillock.h \
config.cache config.log config.status; \
rm -rf autom4te.cache