openbsd-ports/net/pptp/patches/patch-Makefile
2001-03-16 18:02:12 +00:00

49 lines
1.6 KiB
Plaintext

--- Makefile.orig Wed Feb 18 23:42:14 1998
+++ Makefile Fri Mar 16 15:57:18 2001
@@ -1,10 +1,9 @@
VERSION = 1.0.2
-VERSION_DEFINE = '-DPPTP_LINUX_VERSION="${VERSION}"'
+VERSION_DEFINE = '-DPPTP_LINUX_VERSION="${VERSION}"' -DPROGRAM_NAME='"pptp"'
-CC = gcc -Wall
-DEBUG = -g
+RM = rm
INCLUDE =
-CFLAGS = -O9 $(VERSION_DEFINE) $(DEBUG) $(INCLUDE)
+CFLAGS += $(VERSION_DEFINE) $(INCLUDE)
LIBS =
LDFLAGS =
@@ -24,7 +23,21 @@ CALLMGR_BIN = pptp_callmgr
CALLMGR_OBJS = pptp_callmgr.o pptp_ctrl.o dirutil.o util.o vector.o version.o
CALLMGR_DEPS = pptp_callmgr.h pptp_ctrl.h dirutil.h pptp_msg.h vector.h
-all: $(PPTP_BIN) $(CALLMGR_BIN)
+MANPAGE=pptp.8
+
+all: $(PPTP_BIN) $(CALLMGR_BIN) $(MANPAGE)
+
+install:
+ $(INSTALL) -c $(PPTP_BIN) ${PREFIX}/sbin/${PPTP_BIN}
+ $(INSTALL) -c $(CALLMGR_BIN) ${PREFIX}/sbin/${CALLMGR_BIN}
+ $(INSTALL) -c -m 755 pptp-reconnect ${PREFIX}/sbin/
+ $(INSTALL) -c -m 444 $(MANPAGE) ${PREFIX}/man/man8/$(MANPAGE)
+ mkdir -p ${PREFIX}/share/doc/pptp
+ $(INSTALL) -c -m 444 USING ${PREFIX}/share/doc/pptp/USING
+ $(INSTALL) -c -m 444 README ${PREFIX}/share/doc/pptp/README
+ $(INSTALL) -c -m 444 INSTALL ${PREFIX}/share/doc/pptp/INSTALL
+ $(INSTALL) -c -m 444 NEWS ${PREFIX}/share/doc/pptp/NEWS
+ tar cf - Reference Documentation |(cd ${PREFIX}/share/doc/pptp && tar xpBf -)
$(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS)
$(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS)
@@ -36,7 +49,7 @@ vector_test: vector_test.o vector.o
$(CC) -o vector_test vector_test.o vector.o
clean:
- $(RM) *.o *~
+ $(RM) -f *.o *~
clobber: clean
$(RM) $(PPTP_BIN) $(CALLMGR_BIN) vector_test