--- Makefile.orig	Mon Nov 29 16:45:38 2004
+++ Makefile	Sun Oct 30 14:48:01 2005
@@ -1,7 +1,5 @@
  
-PREFIX   = /usr/local
 LIBDIR	 = lib/nntpswitch
-PERL	 = /usr/bin/perl
 
 PROG     = nntpswitchd
 INSTUTILS= nsstats.pl nsstats.sh updategroups
@@ -50,10 +48,8 @@
 
 DISTNAME = nntpswitch
 VERSION  = `/bin/sh version.sh`
-CC       = gcc
-CFLAGS   = -pipe -g -O3 -Wall -DVERSION=\"$(VERSION)\"
-LDFLAGS  = 
-LIBS     = -lm -ldl 
+CFLAGS   += -DVERSION=\"$(VERSION)\"
+LIBS     += -lm 
 _DIRNAME = $(DISTNAME)
 
 all:		protos config aconfig.o $(PROG) $(MODULES) updategroups
@@ -70,6 +66,10 @@
 updategroups:	$(UGOBJS)
 		$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) $(UGOBJS) -o updategroups
 
+$(OBJS):	\
+%.o:		%.c
+		$(CC) $(LDFLAGS) $(CFLAGS) -fPIC $< -c -o $@
+
 $(PROG):	$(OBJS)
 		$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) aconfig.o $(LIBS) -o $(PROG) 
 
@@ -140,8 +140,7 @@
 		install -b $(INSTUTILS) $(PREFIX)/sbin/
 		@echo "Installing modules in $(PREFIX)/$(LIBDIR)"
 		@if [ ! -d $(PREFIX)/$(LIBDIR) ]; then mkdir $(PREFIX)/$(LIBDIR); fi
-		@for f in $(MODULES) $(CONDMODS); do if [ -f $$f ]; then cp $$f $(PREFIX)/$(LIBDIR)/$$f.$(VERSION); fi; done
-		ldconfig
+		@for f in $(MODULES) $(CONDMODS); do if [ -f $$f ]; then cp $$f $(PREFIX)/$(LIBDIR)/$$f; fi; done
 
 help:
 		@echo "Choose one of the following targets:"


syntax highlighted by Code2HTML, v. 0.9.1