source: trunk/debathena/debathena/libnss-nonlocal/Makefile @ 22964

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