summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-pppstats_Makefile_linux
blob: d08bab07a46df2d5f35c1cc6d0992f3c89a75bad (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- ppp-2.4.5.orig/pppstats/Makefile.linux	2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppstats/Makefile.linux	2011-01-21 21:29:58.437408223 +0100
@@ -2,35 +2,26 @@
 # pppstats makefile
 # $Id: Makefile.linux,v 1.9 2006/06/04 05:07:46 paulus Exp $
 #
-DESTDIR = $(INSTROOT)@DESTDIR@
-BINDIR = $(DESTDIR)/sbin
-MANDIR = $(DESTDIR)/share/man/man8
 
-PPPSTATSRCS = pppstats.c
-PPPSTATOBJS = pppstats.o
+include ../Makedefs.com
 
-#CC = gcc
-COPTS = -O
-COMPILE_FLAGS = -I../include
-LIBS =
+CPPFLAGS += -I../include
 
-INSTALL= install
+PROG = pppstats
+OBJS = pppstats.o
+SRCS = pppstats.c
 
-CFLAGS = $(COPTS) $(COMPILE_FLAGS)
+all: $(PROG)
 
-all: pppstats
+$(PROG): $(OBJS)
 
-install: pppstats
-	-mkdir -p $(MANDIR)
-	$(INSTALL) -s -c pppstats $(BINDIR)
+install: $(PROG)
+	$(INSTALL) -d -m 755 $(MANDIR) $(BINDIR)
+	$(INSTALL) $(STRIP) -c $(PROG) $(BINDIR)
 	$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
 
-pppstats: $(PPPSTATSRCS)
-	$(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
-
 clean:
-	rm -f pppstats *~ #* core
+	rm -f $(PROG) $(OBJS) *~ #* core
 
 depend:
-	cpp -M $(CFLAGS) $(PPPSTATSRCS) >.depend
-#	makedepend $(CFLAGS) $(PPPSTATSRCS)
+	$(CPP) -M $(CPPFLAGS) $(CFLAGS) $(SRCS) >.depend