-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
104 lines (83 loc) · 3.21 KB
/
Makefile.in
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
#
# VTun - Virtual Tunnel over TCP/IP network.
#
# Copyright (C) 1998-2008 Maxim Krasnyansky <[email protected]>
#
# VTun has been derived from VPPP package by Maxim Krasnyansky.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# $Id$
#
CC = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@
LDFLAGS = @LDFLAGS@ @LIBS@
YACC = @YACC@
YACCFLAGS = -d
LEX = @LEX@
LEXFLAGS = -t
INSTALL = @INSTALL@
INSTALL_OWNER = -o root -g 0
prefix = @prefix@
exec_prefix = @exec_prefix@
SBIN_DIR = @sbindir@
BIN_DIR = @bindir@
MAN_DIR = @mandir@
ETC_DIR = @sysconfdir@
VAR_DIR = @localstatedir@
PID_FILE = ${VAR_DIR}/run/vtund.pid
CFG_FILE = ${ETC_DIR}/vtund.conf
STAT_DIR = ${VAR_DIR}/log/vtund
LOCK_DIR = ${VAR_DIR}/lock/vtund
DEFS = -DVTUN_CONFIG_FILE=\"$(CFG_FILE)\" -DVTUN_PID_FILE=\"$(PID_FILE)\" \
-DVTUN_STAT_DIR=\"$(STAT_DIR)\" -DVTUN_LOCK_DIR=\"$(LOCK_DIR)\"
OBJS = main.o cfg_file.tab.o cfg_file.lex.o server.o client.o lib.o \
llist.o auth.o tunnel.o lock.o netlib.o \
tun_dev.o tap_dev.o pty_dev.o pipe_dev.o \
tcp_proto.o udp_proto.o \
linkfd.o lfd_shaper.o lfd_zlib.o lfd_lzo.o lfd_encrypt.o lfd_legacy_encrypt.o
CONFIGURE_FILES = Makefile config.status config.cache config.h config.log
%.o: %.c vtun.h lib.h
$(CC) $(CFLAGS) $(DEFS) -c $<
vtund: $(OBJS)
$(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS)
cfg_file.tab.h:
$(YACC) $(YACCFLAGS) -b cfg_file cfg_file.y
cfg_file.tab.c: cfg_file.y cfg_kwords.h config.h cfg_file.tab.h
cfg_file.lex.c: cfg_file.l cfg_kwords.h config.h cfg_file.tab.h
$(LEX) $(LEXFLAGS) cfg_file.l > cfg_file.lex.c
depend:
makedepend -- $(CFLAGS) -- *.c
clean:
rm -f core cfg_file.tab.* cfg_file.lex.* *.o *~ .#* *.bak vtund
distclean: clean
rm -f $(CONFIGURE_FILES)
rm -f `cat vtun.drivers`
install_man:
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(MAN_DIR)/man8
$(INSTALL) -m 644 $(INSTALL_OWNER) vtund.8 $(DESTDIR)$(MAN_DIR)/man8
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(MAN_DIR)/man5
$(INSTALL) -m 644 $(INSTALL_OWNER) vtund.conf.5 $(DESTDIR)$(MAN_DIR)/man5
rm -f $(DESTDIR)$(MAN_DIR)/man8/vtun.8
ln -s vtund.8 $(DESTDIR)$(MAN_DIR)/man8/vtun.8
install_config:
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
$(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
fi
install: vtund install_config install_man
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR)
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR)
$(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR)
$(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR)
$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund
# DO NOT DELETE THIS LINE -- make depend depends on it.