summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-chat_Makefile_linux
blob: 07f1a31cb87490fd94b557f3abde7f91a6557b3f (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
51
--- ppp-2.4.5.orig/chat/Makefile.linux	2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/chat/Makefile.linux	2011-01-21 21:29:57.958658254 +0100
@@ -1,32 +1,27 @@
 #	$Id: Makefile.linux,v 1.15 2006/06/04 05:07:46 paulus Exp $
 
-DESTDIR = $(INSTROOT)@DESTDIR@
-BINDIR = $(DESTDIR)/sbin
-MANDIR = $(DESTDIR)/share/man/man8
-
-CDEF1=	-DTERMIOS			# Use the termios structure
-CDEF2=	-DSIGTYPE=void			# Standard definition
-CDEF3=	-UNO_SLEEP			# Use the usleep function
-CDEF4=	-DFNDELAY=O_NDELAY		# Old name value
-CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
+include ../Makedefs.com
 
-COPTS=	-O2 -g -pipe
-CFLAGS=	$(COPTS) $(CDEFS)
+CDEF1=-DTERMIOS			# Use the termios structure
+CDEF2=-DSIGTYPE=void		# Standard definition
+CDEF3=-UNO_SLEEP		# Use the usleep function
+CDEF4=-DFNDELAY=O_NDELA		# Old name value
+CDEFS=$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
 
-INSTALL= install
+CPPFLAGS += $(CDEFS)
 
-all:	chat
+PROG = chat
+OBJS = chat.o
 
-chat:	chat.o
-	$(CC) -o chat chat.o
+all:	$(PROG)
 
-chat.o:	chat.c
-	$(CC) -c $(CFLAGS) -o chat.o chat.c
+$(PROG): $(OBJS)
 
-install: chat
-	mkdir -p $(BINDIR) $(MANDIR)
-	$(INSTALL) -s -c chat $(BINDIR)
+install: $(PROG)
+	$(INSTALL) -d -m 755 $(BINDIR) 
+	$(INSTALL) -d -m 755 $(MANDIR)
+	$(INSTALL) $(STRIP) -c $(PROG) $(BINDIR)
 	$(INSTALL) -c -m 644 chat.8 $(MANDIR)
 
 clean:
-	rm -f chat.o chat *~
+	rm -f $(OBJS) $(PROG) *~