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

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