1 #***********************************************************************
5 # Makefile for L2TP code.
7 # Copyright (C) 2002 Roaring Penguin Software Inc.
9 # This software may be distributed under the terms of the GNU General
10 # Public License, Version 2, or (at your option) any later version.
14 # $Id: Makefile,v 1.3.18.1 2005/08/08 12:05:25 honor Exp $
15 #***********************************************************************
23 docdir
=/usr
/doc
/l2tp-
$(VERSION
)
24 install=/usr
/bin
/install -c
25 install_dir
=/usr
/bin
/install -c
-d
26 sbindir
=${exec_prefix}/sbin
28 OBJS
=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o
29 EXTRA_LIBS
=libevent
/*.o
-ldl
32 #CFLAGS=-g -I.. -Ilibevent -Wall -Wstrict-prototypes -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -I$(SRCBASE)/include
33 CFLAGS
=-g
-I..
-Ilibevent
-Wall
-Wstrict-prototypes
-D_GNU_SOURCE
-DVERSION
=\"$(VERSION
)\" -DPREFIX
=\"$(prefix)\" -I
$(SRCBASE
)/include
35 TARGETS
=l2tpd libl2tp.a handlers
44 l2tpd
: libl2tp.a libevent
/libevent.a
46 $(CC
) -o l2tpd
-rdynamic
$(OBJS
) $(EXTRA_LIBS
)
49 test -d libevent || ln
-s ..
/libevent .
53 $(CC
) -c
-o
$@
$(CFLAGS
) $<
58 $(CC
) -M
$(CFLAGS
) $^
> .depend
63 # Release requires GNU tar!!
65 rm -f rp-l2tp-
$(VERSION
).
tar.gz
67 .
/make-release.sh
$(VERSION
)
68 tar cvhf rp-l2tp-
$(VERSION
).
tar rp-l2tp-
$(VERSION
)
69 gzip
-v
-9 rp-l2tp-
$(VERSION
).
tar
72 rm -f
*.o
*.a
*~ .depend
74 $(MAKE
) -C handlers
clean
75 rm -f libevent
/*.o libevent
/*.a
78 rm -f Makefile config.cache
79 $(MAKE
) -C handlers
distclean
84 -mkdir
-p
$(RPM_INSTALL_ROOT
)$(DESTDIR
)$(sbindir
)
85 $(install) -m
755 -s l2tpd
$(RPM_INSTALL_ROOT
)$(DESTDIR
)$(sbindir
)
86 -mkdir
-p
$(RPM_INSTALL_ROOT
)$(DESTDIR
)/etc
/l2tp
87 $(install) -m
644 l2tp.conf
$(RPM_INSTALL_ROOT
)$(DESTDIR
)/etc
/l2tp
/l2tp.conf.example
88 -mkdir
-p
$(RPM_INSTALL_ROOT
)$(DESTDIR
)$(mandir)/man8
89 -mkdir
-p
$(RPM_INSTALL_ROOT
)$(DESTDIR
)$(mandir)/man5
90 $(install) -m
644 man
/l2tpd
.8 $(RPM_INSTALL_ROOT
)$(DESTDIR
)$(mandir)/man8
91 $(install) -m
644 man
/l2tp.conf
.5 $(RPM_INSTALL_ROOT
)$(DESTDIR
)$(mandir)/man5
93 $(MAKE
) -C handlers
install