Index: Makefile
--- Makefile.orig	2010-11-04 18:14:53.000000000 +0100
+++ Makefile	2012-07-29 10:05:17.000000000 +0200
@@ -27,7 +27,7 @@
 STATICLIB = lib$(PROJECT).a
 MAP = lib$(PROJECT).map
 
-TARGETS = $(PROJECT) $(SHAREDLIB) $(STATICLIB)
+TARGETS = $(PROJECT) $(STATICLIB)
 
 INSTALL = install
 libdir = /usr/lib
@@ -42,9 +42,9 @@
 	-Wmissing-format-attribute -Wmissing-noreturn \
 	-Wmissing-prototypes -Wpointer-arith -Wredundant-decls \
 	-Wshadow -Wstrict-prototypes -Wwrite-strings
-CPPFLAGS = -std=gnu99 $(WARNINGS) -DLIBEXECDIR=\"$(libexecdir)\"
+CPPFLAGS = -std=gnu99 -DLIBEXECDIR=\"$(libexecdir)\"
 CFLAGS = $(RPM_OPT_FLAGS)
-LDLIBS =
+LDFLAGS =
 
 all: $(TARGETS)
 
@@ -52,11 +52,11 @@
 	$(COMPILE.c) -fPIC $< $(OUTPUT_OPTION)
 
 $(PROJECT): utempter.c
-	$(LINK.c) -Wl,-z,now,-stats $(LDLIBS) $< $(OUTPUT_OPTION)
+	$(LINK.c) $(LDFLAGS) $< $(OUTPUT_OPTION) $(LIBS)
 
 $(SHAREDLIB): iface.os $(MAP)
 	$(LINK.o) -shared \
-		-Wl,-soname,$(SONAME),--version-script=$(MAP),-z,defs,-stats \
+		-Wl,-soname,$(SONAME),--version-script=$(MAP) \
 		-lc $< $(OUTPUT_OPTION)
 
 $(STATICLIB): iface.o
@@ -66,19 +66,12 @@
 iface.o: iface.c utempter.h
 
 install:
-	mkdir -p $(DESTDIR)$(libdir) $(DESTDIR)$(libexecdir)/$(PROJECT) \
+	$(MKDIR) -p $(DESTDIR)$(libdir) $(DESTDIR)$(libexecdir)/$(PROJECT) \
 		$(DESTDIR)$(includedir) $(DESTDIR)$(man3dir)
-	$(INSTALL) -p -m2711 $(PROJECT) $(DESTDIR)$(libexecdir)/$(PROJECT)/
-	$(INSTALL) -p -m644 $(PROJECT).h $(DESTDIR)$(includedir)/
-	$(INSTALL) -p -m755 $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SHAREDLIB).$(VERSION)
-	$(INSTALL) -p -m644 $(STATICLIB) $(DESTDIR)$(libdir)/
-	ln -s $(SHAREDLIB).$(VERSION) $(DESTDIR)$(libdir)/$(SONAME)
-	ln -s $(SONAME) $(DESTDIR)$(libdir)/$(SHAREDLIB)
-	$(INSTALL) -p -m644 $(PROJECT).3 $(DESTDIR)$(man3dir)/
-	for n in lib$(PROJECT) utempter_add_record utempter_remove_record \
-	    utempter_remove_added_record utempter_set_helper; do \
-		ln -s $(PROJECT).3 $(DESTDIR)$(man3dir)/$$n.3; \
-	done
+	$(INSTALL) -c -m711 $(PROJECT) $(DESTDIR)$(libexecdir)/$(PROJECT)/
+	$(INSTALL) -c -m644 $(PROJECT).h $(DESTDIR)$(includedir)/
+	$(INSTALL) -c -m644 $(STATICLIB) $(DESTDIR)$(libdir)/
+	$(INSTALL) -c -m644 $(PROJECT).3 $(DESTDIR)$(man3dir)/
 
 clean:
 	$(RM) $(TARGETS) iface.o iface.os core *~
