7055f586301c089a65ed90cb1ef77b7d84256748
[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 icmp.o \
20 cli.o \
21 l2tpns.o \
22 ppp.o \
23 radius.o \
24 throttle.o \
25 rl.o \
26 ll.o \
27 cluster.o \
28 cluster_slave.o \
29 arp.o \
30 constants.o \
31 ll.o \
32 control.o \
33 util.o \
34
35 PLUGINS=garden.so
36
37 all: l2tpns cluster_master nsctl $(PLUGINS)
38
39 l2tpns: $(OBJS)
40 $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(DEFS)
41
42 cluster_master: cluster_master.o ll.o cluster.o util.o
43 $(CC) $(CFLAGS) -o $@ $^ $(DEFS)
44
45 nsctl: nsctl.o control.o
46 $(CC) $(CFLAGS) -o $@ $^ $(DEFS)
47
48 clean:
49 /bin/rm -f *.o *.so l2tpns cluster_master nsctl
50
51 distclean:
52 /bin/rm -f Makefile config.h config.status config.cache config.log
53
54 install: all
55 $(INSTALL) -D -o root -g root -m 0755 l2tpns $(bindir)/l2tpns
56 $(INSTALL) -D -o root -g root -m 0755 cluster_master $(bindir)/cluster_master
57 $(INSTALL) -D -o root -g root -m 0755 nsctl $(bindir)/nsctl
58 $(INSTALL) -D -o root -g root -m 0600 etc/l2tpns.cfg.default $(etcdir)/l2tpns.cfg
59 $(INSTALL) -D -o root -g root -m 0644 etc/ip_pool.default $(etcdir)/l2tpns.ip_pool
60 $(INSTALL) -D -o root -g root -m 0600 etc/users.default $(etcdir)/l2tpns.users
61 for PLUGIN in $(PLUGINS); do
62 $(INSTALL) -o root -g root -m 0755 $(PLUGIN) $(libdir)/$(PLUGIN)
63 done
64 if [ ! -e /dev/net/tun ]; then
65 mkdir /dev/net
66 mknod /dev/net/tun c 10 200
67 fi
68
69 %.so: %.c
70 $(CC) -fPIC -shared -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBPATH)
71