--- Makefile.orig	Wed Oct  8 13:54:08 2003
+++ Makefile	Sat Oct 11 15:38:37 2003
@@ -1,26 +1,21 @@
 VERSION = 0.2
-#PCRE=-lpcre
-#GNUTLS=-lggz -lgnutls
-
-CC = gcc
-CFLAGS = -Wall -O3 -ggdb3
 
 OBJECTS = main.o conf.o sys.o magic.o server.o ipban.o filter.o
 
 all: morebalance
 
 morebalance: $(OBJECTS)
-	$(CC) -o $@ $(OBJECTS) -lpthread $(PCRE) $(GNUTLS)
+	$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
 
 clean:
 	rm -f *.o
 	rm -f morebalance
 
 install: morebalance
-	install -d -m755 $(DESTDIR)$(prefix)/usr/bin
-	install -d -m755 $(DESTDIR)$(prefix)/etc
-	cp morebalance $(DESTDIR)$(prefix)/usr/bin
-	cp morebalance.conf $(DESTDIR)$(prefix)/etc
+	install -d -m755 $(DESTDIR)$(PREFIX)/bin
+	install -d -m755 $(DESTDIR)$(PREFIX)/etc
+	cp morebalance $(DESTDIR)$(PREFIX)/bin
+	cp morebalance.conf $(DESTDIR)$(PREFIX)/etc
 
 distclean: clean
 	rm -f configure-stamp
