summaryrefslogtreecommitdiff
path: root/net/bandwidthd/files/patch-Makefile
blob: e066326b0d4061efb08c5f75a6e42b622df63014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- Makefile.orig	Wed Jan 14 21:38:17 2004
+++ Makefile	Fri Jan 16 01:39:20 2004
@@ -1,8 +1,8 @@
 #Possible optimizations -fomit-frame-pointer -ffast-math
 OBS= bandwidthd.o graph.o conf.tab.o conf.l.o
-LIBS= -L/usr/local/lib -lgd -lpng -lpcap 
-CFLAGS= -I/usr/local/include -O3 -Wall
-NONWALLCFLAGS= -O3 #-g -DDEBUG
+LIBS= -L${LOCALBASE}/lib -lgd -lpng -lpcap 
+CFLAGS+= -I${LOCALBASE}/include
+#NONWALLCFLAGS= -O3 #-g -DDEBUG
 
 # Debugging stuff
 #CFLAGS= -O3 -Wall -pg -DPROFILE
@@ -44,13 +44,13 @@
 	rm -f *.o bandwidthd *~ conf.tab.c conf.tab.h conf.l.c DEADJOE
 
 install: all
-	if [ ! -d $(DESTDIR)/usr/local/bandwidthd/etc ] ; then mkdir -p $(DESTDIR)/usr/local/bandwidthd/etc ; fi
-	if [ ! -d $(DESTDIR)/usr/local/bandwidthd/htdocs ] ; then mkdir -p $(DESTDIR)/usr/local/bandwidthd/htdocs ; fi
-	cp bandwidthd $(DESTDIR)/usr/local/bandwidthd	
-	if [ ! -f $(DESTDIR)/usr/local/bandwidthd/etc/bandwidthd.conf ] ; then cp etc/bandwidthd.conf $(DESTDIR)/usr/local/bandwidthd/etc/ ; fi
-	cp htdocs/legend.gif $(DESTDIR)/usr/local/bandwidthd/htdocs/
-	cp htdocs/logo.gif $(DESTDIR)/usr/local/bandwidthd/htdocs/
+	mkdir -p $(DESTDIR)${PREFIX}/bandwidthd/etc
+	mkdir -p $(DESTDIR)${PREFIX}/bandwidthd/htdocs
+	${BSD_INSTALL_PROGRAM} bandwidthd $(DESTDIR)${PREFIX}/bandwidthd
+	${BSD_INSTALL_DATA} etc/bandwidthd.conf $(DESTDIR)${PREFIX}/bandwidthd/etc/bandwidthd.conf-dist
+	${BSD_INSTALL_DATA} htdocs/legend.gif $(DESTDIR)${PREFIX}/bandwidthd/htdocs/
+	${BSD_INSTALL_DATA} htdocs/logo.gif $(DESTDIR)${PREFIX}/bandwidthd/htdocs/
 
 #**** Stuff where -WALL is turned off to reduce the noise in a compile so I can see my own errors *******************
 conf.l.o: conf.l.c
-	$(CC) $(NONWALLCFLAGS) -c -o conf.l.o conf.l.c	
+	$(CC) -c -o conf.l.o conf.l.c