]> andersk Git - nss_nonlocal.git/blame - Makefile
Link with pthread to be safe.
[nss_nonlocal.git] / Makefile
CommitLineData
f6903667
AK
1exec_prefix = /
2libdir = $(exec_prefix)/lib
3
4INSTALL = install
5CC = gcc
6CFLAGS = -O2 -Wall
7LD = ld
8
9ALL_CFLAGS = $(CFLAGS) -fPIC
7761ce99 10ALL_LDFLAGS = $(LDFLAGS) -shared -pthread -Wl,-x
f6903667
AK
11
12all: libnss_nonlocal.so.2 linktest
13
14libnss_nonlocal.so.2: nonlocal-passwd.o nonlocal-group.o nonlocal-shadow.o
15 $(CC) -o $@ $(ALL_LDFLAGS) -Wl,-soname,$@ $^ $(LOADLIBES) $(LDLIBS)
16
17%.o: %.c
18 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $<
19
20nonlocal-passwd.o: nonlocal-passwd.c nsswitch-internal.h nonlocal.h
21nonlocal-group.o: nonlocal-group.c nsswitch-internal.h nonlocal.h
22nonlocal-shadow.o: nonlocal-shadow.c nsswitch-internal.h nonlocal.h
23
24linktest: libnss_nonlocal.so.2
25 $(LD) --entry=0 -o /dev/null $^
26
27install: libnss_nonlocal.so.2
28 $(INSTALL) -d $(DESTDIR)$(libdir)
29 $(INSTALL) -m a+r,u+w $< $(DESTDIR)$(libdir)/
30
31clean:
32 rm -f *.so.* *.o test-nonlocal
33
34.PHONY: all linktest install clean
This page took 0.105182 seconds and 5 git commands to generate.