2 # Copyright (C) 1995-2001 Stephen Early <steve@greenend.org.uk>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 .PHONY
: all clean realclean dist install distclean
32 INSTALL_PROGRAM
:=@INSTALL_PROGRAM@
34 CFLAGS
:=@CFLAGS@ @DEFS@
-Wall
-I
$(srcdir) -I.
39 exec_prefix:=@
exec_prefix@
41 sysconfdir
:=@sysconfdir@
42 transform
:=@program_transform_name@
46 OBJECTS
:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \
47 resolver.o random.o udp.o site.o transform.o netlink.o rsa.o dh.o \
48 serpent.o md5.o version.o tun.o slip.o sha1.o ipaddr.o log.o \
51 DISTFILES
:=BUGS COPYING CREDITS INSTALL LICENSE.txt Makefile.in \
52 NEWS NOTES README TODO \
54 conffile.c conffile.fl conffile.h conffile.y \
55 conffile_internal.h config.h.bot \
56 config.h.in config.h.top configure \
57 configure.in debian dh.c \
59 getopt.c getopt1.c getopt.h \
60 install.sh ipaddr.c ipaddr.h ipaddr.py linux log.c md5.c md5.h \
62 modules.c netlink.c netlink.h process.c process.h \
63 random.c resolver.c rsa.c \
64 secnet.c secnet.h serpent.c serpent.h serpentsboxes.h \
65 snprintf.c snprintf.h \
66 sha1.c site.c slip.c stamp-h.in transform.c tun.c udp.c \
67 unaligned.h util.c util.h
80 # Automatic remaking of configuration files, from autoconf documentation
81 ${srcdir}/configure
: configure.in
82 cd
${srcdir} && autoconf
84 # autoheader might not change config.h.in, so touch a stamp file.
85 ${srcdir}/config.h.in
: stamp-h.in
86 ${srcdir}/stamp-h.in
: configure.in config.h.top config.h.bot
87 cd
${srcdir} && autoheader
88 echo timestamp
> ${srcdir}/stamp-h.in
91 stamp-h
: config.h.in config.status
94 Makefile
: Makefile.in config.status
97 config.status
: configure
98 .
/config.status
--recheck
99 # End of config file remaking rules
101 # Manual dependencies section - XXX use autodep eventually
102 $(OBJECTS
): config.h secnet.h util.h
103 conffile.o conffile.tab.o conffile.yy.o
: conffile.h conffile_internal.h
104 secnet.o
: conffile.h process.h
108 serpent.o transform.o
: serpent.h
109 serpent.o
: serpentsboxes.h
111 site.c util.c
: unaligned.h
112 conffile.yy.c
: conffile.fl conffile.tab.c
113 conffile.tab.c
: conffile.y
114 netlink.o tun.o slip.o
: netlink.h
115 # End of manual dependencies section
120 echo
"char version[]=\"secnet-$(VERSION)\";" >version.c
123 $(INSTALL_PROGRAM
) -D secnet
$(sbindir
)/`echo secnet|sed '$(transform)'`
124 $(INSTALL_PROGRAM
) -D make-secnet-sites
$(sbindir
)/`echo make-secnet-sites|sed '$(transform)'`
125 $(INSTALL
) -D ipaddr.py
$(prefix)/share
/secnet
/ipaddr.py
128 $(RM
) -f
*.o
*.yy.c
*.tab.
[ch
] $(TARGETS
) core version.c
131 $(RM
) -f
*~ Makefile config.h \
132 config.log config.status config.cache \
137 pfname
:=$(PACKAGE
)-$(VERSION
)
141 for i in
$(DISTFILES
) ; do ln
-s ..
/$(srcdir)/$$i $(pfname
)/ ; done
142 tar hcf ..
/$(pfname
).
tar $(pfname
)
143 gzip
-9f ..
/$(pfname
).
tar