]> andersk Git - nss_nonlocal.git/commitdiff
Automakefiscate and libtoolfiscate.
authorAnders Kaseorg <andersk@mit.edu>
Mon, 28 Jul 2008 18:35:23 +0000 (14:35 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Tue, 29 Jul 2008 10:07:27 +0000 (06:07 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Makefile.am [new file with mode: 0644]
Makefile.in [deleted file]
configure.ac
libnss_nonlocal.map [deleted file]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..e67c2d5
--- /dev/null
@@ -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 (file)
index 3d0a3fb..0000000
+++ /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
index 241f2c4cd266d94dd637befb6fe23c5d5a35b59e..28790a1fb964a67e0e9424b73206d3040290e296 100644 (file)
@@ -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 (file)
index 9082d5d..0000000
+++ /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:
-    *;
-};
This page took 0.155127 seconds and 5 git commands to generate.