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 distclean dist install
32 INSTALL_PROGRAM
:=@INSTALL_PROGRAM@
34 # Use -DHACKY_PARALLEL if you are compiling secnet for an extremely
36 #CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ -DHACKY_PARALLEL
37 CFLAGS
:=-Wall @WRITESTRINGS@ @CFLAGS@
38 ALL_CFLAGS
:=@DEFS@
-I
$(srcdir) -I.
$(CFLAGS
)
44 exec_prefix:=@
exec_prefix@
46 sysconfdir
:=@sysconfdir@
47 transform
:=@program_transform_name@
51 OBJECTS
:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \
52 resolver.o random.o udp.o site.o transform.o netlink.o rsa.o dh.o \
53 serpent.o md5.o version.o tun.o slip.o sha1.o ipaddr.o log.o \
58 DISTFILES
:=BUGS COPYING CREDITS INSTALL LICENSE.txt Makefile.in \
59 NEWS NOTES README TODO \
60 ac_prog_cc_no_writeable_strings.m4 \
61 conffile.c conffile.fl conffile.h conffile.y \
63 config.h.in configure \
64 configure.in depend.sh dh.c \
66 getopt.c getopt1.c getopt.h \
67 install-sh ipaddr.c ipaddr.h ipaddr.py linux log.c \
70 modules.c netlink.c netlink.h process.c process.h \
71 random.c resolver.c rsa.c \
72 secnet.c secnet.h serpent.c serpent.h serpentsboxes.h \
73 snprintf.c snprintf.h \
74 sha1.c site.c slip.c stamp-h.in transform.c tun.c udp.c \
75 unaligned.h util.c util.h \
77 DISTSUBDIRS
:=debian
/copyright debian
/changelog debian
/control \
78 debian
/init debian
/rules debian
/compat debian
/default
89 $(CC
) $(CPPFLAGS
) $(ALL_CFLAGS
) -c
$< -o
$@
93 # Automatic remaking of configuration files, from autoconf documentation
94 ${srcdir}/configure
: configure.in
95 cd
${srcdir} && autoconf
97 # autoheader might not change config.h.in, so touch a stamp file.
98 ${srcdir}/config.h.in
: stamp-h.in
99 ${srcdir}/stamp-h.in
: configure.in
100 cd
${srcdir} && autoheader
101 echo timestamp
> ${srcdir}/stamp-h.in
104 stamp-h
: config.h.in config.status
107 Makefile
: Makefile.in config.status
110 config.status
: configure
111 .
/config.status
--recheck
112 # End of config file remaking rules
114 # C and header file dependency rules
115 SOURCES
:=$(OBJECTS
:.o
=.c
)
116 DEPENDS
:=$(OBJECTS
:.o
=.d
)
118 $(DEPENDS
): ${srcdir}/depend.sh
121 ${srcdir}/depend.sh
$(srcdir) $(CPPFLAGS
) $(ALL_CFLAGS
) $< > $@
125 # Manual dependencies section
126 conffile.yy.c
: conffile.fl conffile.tab.c
127 conffile.tab.c
: conffile.y
128 # End of manual dependencies section
131 $(CC
) $(LDFLAGS
) $(ALL_CFLAGS
) -o
$@
$(OBJECTS
) $(LDLIBS
)
134 echo
"char version[]=\"secnet $(VERSION)\";" >version.c
137 $(INSTALL
) -d
$(prefix)/share
/secnet
$(sbindir
)
138 $(INSTALL_PROGRAM
) secnet
$(sbindir
)/`echo secnet|sed '$(transform)'`
139 $(INSTALL_PROGRAM
) ${srcdir}/make-secnet-sites
$(sbindir
)/`echo make-secnet-sites|sed '$(transform)'`
140 $(INSTALL
) ${srcdir}/ipaddr.py
$(prefix)/share
/secnet
/ipaddr.py
143 $(RM
) -f
*.o
*.yy.c
*.tab.
[ch
] $(TARGETS
) core version.c
146 $(RM
) -f
*~ Makefile config.h
*.d \
147 config.log config.status config.cache \
152 pfname
:=$(PACKAGE
)-$(VERSION
)
156 for i in
$(DISTDIRS
) ; do mkdir
$(pfname
)/$$i ; done
157 for i in
$(DISTFILES
) ; do ln
-s ..
/$(srcdir)/$$i $(pfname
)/ ; done
158 for i in
$(DISTSUBDIRS
) ; do ln
-s ..
/..
/$(srcdir)/$$i $(pfname
)/$$i ; done
159 tar hcf ..
/$(pfname
).
tar --exclude
=.git
--exclude
=.cvsignore
$(pfname
)
160 gzip
-9f ..
/$(pfname
).
tar
164 # 1. Check that the tree has what you want
166 # 2. Update VERSION above but DO NOT COMMIT
172 # and check that the resulting tarball looks OK.
173 # Eg, untar it and build it, or have it reviewed.
175 # 3. Commit the update to VERSION
181 # 6. rsync -v ../secnet-$VERSION.tar.gz \
182 # chiark:/home/ianmdlvl/public-html/secnet/download/
184 # 7. write and post a release announcement