Revision 22965,
941 bytes
checked in by andersk, 16 years ago
(diff) |
Use $(CC) for linktest.
|
Line | |
---|
1 | exec_prefix = / |
---|
2 | libdir = $(exec_prefix)/lib |
---|
3 | |
---|
4 | INSTALL = install |
---|
5 | CC = gcc |
---|
6 | CFLAGS = -O2 -Wall |
---|
7 | |
---|
8 | ALL_CFLAGS = $(CFLAGS) -fPIC |
---|
9 | ALL_LDFLAGS = $(LDFLAGS) -shared -Wl,-x |
---|
10 | |
---|
11 | all: libnss_nonlocal.so.2 linktest |
---|
12 | |
---|
13 | OBJS = nonlocal-passwd.o nonlocal-group.o nonlocal-shadow.o |
---|
14 | |
---|
15 | libnss_nonlocal.so.2: $(OBJS) libnss_nonlocal.map |
---|
16 | $(CC) -o $@ $(ALL_LDFLAGS) -Wl,-soname,$@ -Wl,--version-script=libnss_nonlocal.map $(OBJS) $(LOADLIBES) $(LDLIBS) |
---|
17 | |
---|
18 | %.o: %.c |
---|
19 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $< |
---|
20 | |
---|
21 | nonlocal-passwd.o: nonlocal-passwd.c nsswitch-internal.h nonlocal.h |
---|
22 | nonlocal-group.o: nonlocal-group.c nsswitch-internal.h nonlocal.h |
---|
23 | nonlocal-shadow.o: nonlocal-shadow.c nsswitch-internal.h nonlocal.h |
---|
24 | |
---|
25 | linktest: libnss_nonlocal.so.2 |
---|
26 | $(CC) $(LDFLAGS) -nostdlib -Wl,--entry=0 -o /dev/null $^ |
---|
27 | |
---|
28 | install: libnss_nonlocal.so.2 |
---|
29 | $(INSTALL) -d $(DESTDIR)$(libdir) |
---|
30 | $(INSTALL) -m a+r,u+w $< $(DESTDIR)$(libdir)/ |
---|
31 | |
---|
32 | clean: |
---|
33 | rm -f *.so.* *.o |
---|
34 | |
---|
35 | .PHONY: all linktest install clean |
---|
Note: See
TracBrowser
for help on using the repository browser.