From 2404d301d7522f2b3f4a4f359259bf4e5ebd9778 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 28 Jul 2008 14:35:23 -0400 Subject: [PATCH] Automakefiscate and libtoolfiscate. Signed-off-by: Anders Kaseorg --- Makefile.am | 16 ++++++++++++++++ Makefile.in | 40 ---------------------------------------- configure.ac | 3 +++ libnss_nonlocal.map | 24 ------------------------ 4 files changed, 19 insertions(+), 64 deletions(-) create mode 100644 Makefile.am delete mode 100644 Makefile.in delete mode 100644 libnss_nonlocal.map diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e67c2d5 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,16 @@ +lib_LTLIBRARIES = libnss_nonlocal.la +libnss_nonlocal_la_SOURCES = \ + nonlocal-passwd.c nonlocal-group.c nonlocal-shadow.c \ + nonlocal.h nsswitch-internal.h +libnss_nonlocal_la_LDFLAGS = \ + -version-info 2:0:0 \ + -export-symbols-regex '^_nss_nonlocal_' + +noinst_PROGRAMS = .linktest +_linktest_SOURCES = +_linktest_LDADD = libnss_nonlocal.la +_linktest_LDFLAGS = -nostdlib -entry=0 + +install-exec-hook: + rm -f $(DESTDIR)$(libdir)/libnss_nonlocal.so + rm -f $(DESTDIR)$(libdir)/libnss_nonlocal.la diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 3d0a3fb..0000000 --- a/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ - -INSTALL = @INSTALL@ -CC = @CC@ - -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ - -ALL_CFLAGS = $(CFLAGS) -fPIC -ALL_LDFLAGS = $(LDFLAGS) -shared -Wl,-x - -all: libnss_nonlocal.so.2 linktest - -OBJS = nonlocal-passwd.o nonlocal-group.o nonlocal-shadow.o - -libnss_nonlocal.so.2: $(OBJS) libnss_nonlocal.map - $(CC) -o $@ $(CFLAGS) $(ALL_LDFLAGS) -Wl,-soname,$@ -Wl,--version-script=libnss_nonlocal.map $(OBJS) $(LIBS) - -%.o: %.c - $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $< - -nonlocal-passwd.o: nonlocal-passwd.c nsswitch-internal.h nonlocal.h -nonlocal-group.o: nonlocal-group.c nsswitch-internal.h nonlocal.h -nonlocal-shadow.o: nonlocal-shadow.c nsswitch-internal.h nonlocal.h - -linktest: libnss_nonlocal.so.2 - $(CC) $(CFLAGS) $(LDFLAGS) -nostdlib -Wl,--entry=0 -o /dev/null $^ - -install: libnss_nonlocal.so.2 - $(INSTALL) -d $(DESTDIR)$(libdir) - $(INSTALL) -m a+r,u+w $< $(DESTDIR)$(libdir)/ - -clean: - rm -f *.so.* *.o - -.PHONY: all linktest install clean diff --git a/configure.ac b/configure.ac index 241f2c4..28790a1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,11 @@ AC_INIT([nss_nonlocal], [1.7], [andersk@mit.edu]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PREFIX_DEFAULT([/]) +AC_DISABLE_STATIC AC_PROG_CC AC_PROG_INSTALL +AC_PROG_LIBTOOL AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) diff --git a/libnss_nonlocal.map b/libnss_nonlocal.map deleted file mode 100644 index 9082d5d..0000000 --- a/libnss_nonlocal.map +++ /dev/null @@ -1,24 +0,0 @@ -GLIBC_2.0 { - global: - _nss_nonlocal_setpwent; - _nss_nonlocal_endpwent; - _nss_nonlocal_getpwent_r; - _nss_nonlocal_getpwuid_r; - _nss_nonlocal_getpwnam_r; - - _nss_nonlocal_setspent; - _nss_nonlocal_endspent; - _nss_nonlocal_getspent_r; - _nss_nonlocal_getspnam_r; - - _nss_nonlocal_setgrent; - _nss_nonlocal_endgrent; - _nss_nonlocal_getgrent_r; - _nss_nonlocal_getgrgid_r; - _nss_nonlocal_getgrnam_r; - - _nss_nonlocal_initgroups_dyn; - - local: - *; -}; -- 2.45.0