-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
177 lines (154 loc) · 4.35 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# $Id: Makefile,v 1.51 2011/11/29 22:05:07 quozl Exp $
VERSION=1.10.0
RELEASE=
#################################################################
# CHANGE THIS LINE to point to the location of binaries
PPPD = /usr/sbin/pppd
# Solaris
# PPPD = /usr/bin/pppd
IP = /bin/ip
#################################################################
BINDIR=$(DESTDIR)/usr/sbin
MANDIR=$(DESTDIR)/usr/share/man/man8
PPPDIR=$(DESTDIR)/etc/ppp
CC = gcc
RM = rm -f
OPTIMIZE= -O -Wuninitialized
DEBUG = -g
INCLUDE =
# CFLAGS = -Wall $(OPTIMIZE) $(DEBUG) $(INCLUDE)
# Solaris
# CFLAGS += -D_XPG4_2 -D__EXTENSIONS__
LIBS = -lutil
# Solaris 10
# LIBS = -lnsl -lsocket -lresolv
# Solaris Nevada build 14 or above
# LIBS = -lnsl -lsocket
# LDFLAGS =
PPTP_BIN = pptp
PPTP_OBJS = pptp.o pptp_gre.o ppp_fcs.o \
pptp_ctrl.o dirutil.o vector.o \
util.o version.o test-redirections.o \
pptp_quirks.o orckit_quirks.o pqueue.o pptp_callmgr.o routing.o \
pptp_compat.o
PPTP_DEPS = pptp_callmgr.h pptp_gre.h ppp_fcs.h util.h test-redirections.h \
pptp_quirks.h orckit_quirks.h config.h pqueue.h routing.h
all: config.h $(PPTP_BIN) pptpsetup.8
$(PPTP_OBJS): config.h
$(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS)
$(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS)
pptpsetup.8: pptpsetup
pod2man --section=8 $? > $@
config.h:
( \
echo "/* text added by Makefile target config.h */"; \
echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\""; \
echo "#define PPPD_BINARY \"$(PPPD)\""; \
echo "#define IP_BINARY \"$(IP)\"" \
) > config.h
vector_test: vector_test.o vector.o
$(CC) -o vector_test vector_test.o vector.o
./vector_test
clean:
$(RM) *.o config.h pptpsetup.8
clobber: clean
$(RM) $(PPTP_BIN) vector_test
distclean: clobber
test: vector_test
install:
mkdir -p $(BINDIR)
install -o root -m 555 pptp $(BINDIR)
install -o root -m 555 pptpsetup $(BINDIR)
mkdir -p $(MANDIR)
install -m 644 pptp.8 $(MANDIR)
install -m 644 pptpsetup.8 $(MANDIR)
mkdir -p $(PPPDIR)
install -m 644 options.pptp $(PPPDIR)
uninstall:
$(RM) $(BINDIR)/pptp $(MANDIR)/pptp.8
dist: clobber
$(RM) pptp-$(VERSION)$(RELEASE).tar.gz
$(RM) -r pptp-$(VERSION)
mkdir pptp-$(VERSION)
cp --recursive ChangeLog Makefile *.c *.h options.pptp pptp.8 \
pptpsetup Documentation AUTHORS COPYING INSTALL NEWS \
README DEVELOPERS TODO USING PROTOCOL-SECURITY \
pptp-$(VERSION)/
$(RM) -r pptp-$(VERSION)/CVS pptp-$(VERSION)/*/CVS
tar czf pptp-$(VERSION)$(RELEASE).tar.gz pptp-$(VERSION)
$(RM) -r pptp-$(VERSION)
md5sum pptp-$(VERSION)$(RELEASE).tar.gz
deb:
chmod +x debian/rules
fakeroot dpkg-buildpackage -us -uc
mv ../pptp_$(VERSION)-0_i386.deb .
WEB=~/public_html/external/mine/pptp/pptpconfig
release:
cp pptp_$(VERSION)-0_i386.deb $(WEB)
cd $(WEB);make
# The following include file dependencies were generated using
# "makedepend -w0 *.c", then manually removing out of tree entries.
# DO NOT DELETE
dirutil.o: dirutil.h
orckit_quirks.o: pptp_msg.h
orckit_quirks.o: pptp_compat.h
orckit_quirks.o: pptp_options.h
orckit_quirks.o: pptp_ctrl.h
orckit_quirks.o: util.h
ppp_fcs.o: ppp_fcs.h
ppp_fcs.o: pptp_compat.h
pptp.o: config.h
pptp.o: pptp_callmgr.h
pptp.o: pptp_gre.h
pptp.o: pptp_compat.h
pptp.o: version.h
pptp.o: util.h
pptp.o: pptp_quirks.h
pptp.o: pptp_msg.h
pptp.o: pptp_ctrl.h
pptp.o: pqueue.h
pptp.o: pptp_options.h
pptp_callmgr.o: pptp_callmgr.h
pptp_callmgr.o: pptp_ctrl.h
pptp_callmgr.o: pptp_compat.h
pptp_callmgr.o: pptp_msg.h
pptp_callmgr.o: dirutil.h
pptp_callmgr.o: vector.h
pptp_callmgr.o: util.h
pptp_callmgr.o: routing.h
pptp_compat.o: pptp_compat.h
pptp_compat.o: util.h
pptp_ctrl.o: pptp_msg.h
pptp_ctrl.o: pptp_compat.h
pptp_ctrl.o: pptp_ctrl.h
pptp_ctrl.o: pptp_options.h
pptp_ctrl.o: vector.h
pptp_ctrl.o: util.h
pptp_ctrl.o: pptp_quirks.h
pptp_gre.o: ppp_fcs.h
pptp_gre.o: pptp_compat.h
pptp_gre.o: pptp_msg.h
pptp_gre.o: pptp_gre.h
pptp_gre.o: util.h
pptp_gre.o: pqueue.h
pptp_gre.o: test-redirections.h
pptp_quirks.o: orckit_quirks.h
pptp_quirks.o: pptp_options.h
pptp_quirks.o: pptp_ctrl.h
pptp_quirks.o: pptp_compat.h
pptp_quirks.o: pptp_msg.h
pptp_quirks.o: pptp_quirks.h
pqueue.o: util.h
pqueue.o: pqueue.h
routing.o: routing.h
routing.o: config.h
test-redirections.o: util.h
test-redirections.o: test-redirections.h
util.o: util.h
vector.o: pptp_ctrl.h
vector.o: pptp_compat.h
vector.o: vector.h
vector_test.o: vector.h
vector_test.o: pptp_ctrl.h
vector_test.o: pptp_compat.h
version.o: config.h