X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/0c736f6fe826c7fd17dd6cee106c205c06a93916..e98737a1683046b634692bd9e5406e53b89a65c9:/Makefile?ds=inline diff --git a/Makefile b/Makefile index 76fcd80..18be310 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ etcdir = $(PREFIX)/etc/l2tpns libdir = $(PREFIX)/usr/lib/l2tpns CC = gcc -CFLAGS=-Wall -g -O2 +CFLAGS=-Wall -g -O3 -funroll-loops -fomit-frame-pointer -finline-functions LDFLAGS = LIBS = -lm -ldl -lcli INSTALL = /usr/bin/install -c @@ -26,7 +26,7 @@ OBJS= md5.o \ control.o \ util.o \ -PLUGINS=garden.so +PLUGINS=garden.so autothrottle.so autosnoop.so all: l2tpns cluster_master nsctl $(PLUGINS) @@ -49,14 +49,16 @@ install: all $(INSTALL) -D -o root -g root -m 0600 etc/l2tpns.cfg.default $(etcdir)/l2tpns.cfg $(INSTALL) -D -o root -g root -m 0644 etc/ip_pool.default $(etcdir)/l2tpns.ip_pool $(INSTALL) -D -o root -g root -m 0600 etc/users.default $(etcdir)/l2tpns.users - for PLUGIN in $(PLUGINS); do - $(INSTALL) -o root -g root -m 0755 $(PLUGIN) $(libdir)/$(PLUGIN) + for PLUGIN in $(PLUGINS); do \ + $(INSTALL) -D -o root -g root -m 0755 $(PLUGIN) $(libdir)/$(PLUGIN); \ done - if [ ! -e /dev/net/tun ]; then - mkdir /dev/net - mknod /dev/net/tun c 10 200 + if [ ! -e /dev/net/tun ]; then \ + mkdir /dev/net; \ + mknod /dev/net/tun c 10 200; \ fi %.so: %.c $(CC) -fPIC -shared -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBPATH) +%.o: %.c l2tpns.h + $(CC) -c -o $@ $< $(CFLAGS)