-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathMakefile
49 lines (36 loc) · 1.36 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
# Makefile for libnss-ato
#### Start of system configuration section. ####
CC = gcc
INSTALL = /usr/bin/install
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
DESTDIR = ""
prefix = "/usr"
exec_prefix = ${prefix}
# Where the installed binary goes.
bindir = ${exec_prefix}/bin
binprefix =
sysconfdir = /etc
# mandir = /usr/local/src/less-394/debian/less/usr/share/man
manext = 1
manprefix = ${prefix}/share/man
#### End of system configuration section. ####
all: libnss_ato libnss_ato_test
libnss_ato: libnss_ato.c
${CC} ${CFLAGS} ${LDFLAGS} -fPIC -Wall -shared -o libnss_ato.so.2 -Wl,-soname,libnss_ato.so.2 libnss_ato.c
test: libnss_ato_test.c
${CC} ${CFLAGS} ${LDFLAGS} -fPIC -Wall -o libnss_ato_test libnss_ato_test.c
install:
# remeber /lib/libnss_compat.so.2 -> libnss_compat-2.3.6.so
${INSTALL_DATA} -D libnss_ato.so.2 ${DESTDIR}/${prefix}/lib/libnss_ato-2.3.6.so
${INSTALL_DATA} -D libnss-ato.3 ${DESTDIR}/${manprefix}/man3/libnss-ato.3
cd ${DESTDIR}/${prefix}/lib && ln -fs libnss_ato-2.3.6.so libnss_ato.so.2
${INSTALL_DATA} -D libnss-ato.conf ${DESTDIR}/${sysconfdir}/libnss-ato.conf
clean:
rm -f libnss_ato.so.2 libnss_ato_test
rm -rf debian/libnss-ato
rm -f build-stamp
rm -rf BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
rpm: libnss_ato
rm -rf BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
rpmbuild -ba rpm/libnss-ato.spec --define "_topdir $$(pwd)"