404a715769cc2ac7c06a942d420409efa26683d4
[l2tpns.git] / Makefile.in
1 subdirs = @subdirs@
2 top_srcdir = @top_srcdir@
3 srcdir = @srcdir@
4 prefix = @prefix@
5 exec_prefix = @exec_prefix@
6 bindir = @bindir@
7 infodir = @infodir@
8 etcdir = @sysconfdir@
9 libdir = @prefix@/lib/l2tpns
10
11 CC = @CC@
12 CFLAGS=-Wall @CFLAGS@
13 LDFLAGS = @LDFLAGS@
14 LIBS = @LIBS@
15 INSTALL = @INSTALL@
16 DEFS = @DEFS@
17
18 OBJS= md5.o \
19 cli.o \
20 l2tpns.o \
21 ppp.o \
22 radius.o \
23 throttle.o \
24 rl.o \
25 ll.o \
26 cluster.o \
27 cluster_slave.o \
28 arp.o \
29 constants.o \
30 ll.o \
31 control.o \
32 util.o \
33
34 PLUGINS=garden.so
35
36 all: l2tpns cluster_master nsctl $(PLUGINS)
37
38 l2tpns: $(OBJS)
39 $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(DEFS)
40
41 cluster_master: cluster_master.o ll.o cluster.o util.o
42 $(CC) $(CFLAGS) -o $@ $^ $(DEFS)
43
44 nsctl: nsctl.o control.o
45 $(CC) $(CFLAGS) -o $@ $^ $(DEFS)
46
47 clean:
48 /bin/rm -f *.o *.so l2tpns cluster_master nsctl
49
50 distclean:
51 /bin/rm -f Makefile config.h config.status config.cache config.log
52
53 install: all
54 $(INSTALL) -D -o root -g root -m 0755 l2tpns $(bindir)/l2tpns
55 $(INSTALL) -D -o root -g root -m 0755 cluster_master $(bindir)/cluster_master
56 $(INSTALL) -D -o root -g root -m 0755 nsctl $(bindir)/nsctl
57 $(INSTALL) -D -o root -g root -m 0600 etc/l2tpns.cfg.default $(etcdir)/l2tpns.cfg
58 $(INSTALL) -D -o root -g root -m 0644 etc/ip_pool.default $(etcdir)/l2tpns.ip_pool
59 $(INSTALL) -D -o root -g root -m 0600 etc/users.default $(etcdir)/l2tpns.users
60 for PLUGIN in $(PLUGINS); do
61 $(INSTALL) -o root -g root -m 0755 $(PLUGIN) $(libdir)/$(PLUGIN)
62 done
63 if [ ! -e /dev/net/tun ]; then
64 mkdir /dev/net
65 mknod /dev/net/tun c 10 200
66 fi
67
68 %.so: %.c
69 $(CC) -fPIC -shared -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBPATH)
70