chiark / gitweb /
Import release 0.07
[secnet.git] / Makefile.in
1 # Makefile for secnet
2 # Copyright (C) 1995-2001 Stephen Early <steve@greenend.org.uk>
3
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)
7 # any later version.
8
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.
13
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.
17
18 .PHONY: all clean realclean dist install
19
20 PACKAGE:=secnet
21 VERSION:=0.07
22
23 @SET_MAKE@
24
25 srcdir:=@srcdir@
26 VPATH:=@srcdir@
27
28 SHELL:=/bin/sh
29 RM:=@RM@
30 CC:=@CC@
31 INSTALL:=@INSTALL@
32 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
33
34 CFLAGS:=@CFLAGS@ @DEFS@ -Wall -I.
35 LDFLAGS:=@LDFLAGS@
36 LDLIBS:=@LIBS@
37
38 prefix:=@prefix@
39 exec_prefix:=@exec_prefix@
40 sbindir:=@sbindir@
41 sysconfdir:=@sysconfdir@
42 transform:=@program_transform_name@
43
44 TARGETS:=secnet
45
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
49
50 DISTFILES:=COPYING INSTALL Makefile.in NOTES README TODO conffile.c \
51         conffile.fl conffile.h conffile.y conffile_internal.h config.h.bot \
52         config.h.in config.h.top configure configure.in dh.c \
53         example-sites-file example.conf install.sh linux md5.c md5.h \
54         modules.c modules.h netlink.c random.c resolver.c rsa.c \
55         secnet.c secnet.h serpent.c serpent.h serpentsboxes.h \
56         site.c transform.c udp.c unaligned.h util.c util.h
57
58 %.c:    %.y
59
60 %.yy.c: %.fl
61         flex -o$@ $<
62
63 %.tab.c:        %.y
64         bison -d $<
65
66
67 all:    $(TARGETS)
68
69 Makefile: Makefile.in config.status
70         $(SHELL) config.status
71
72 config.status: configure
73         $(srcdir)/configure --no-create
74
75 config.h: config.h.in config.status
76         $(SHELL) config.status
77
78 $(OBJECTS): config.h secnet.h util.h
79 conffile.o conffile.tab.o conffile.yy.o: conffile.h conffile_internal.h
80 secnet.c: conffile.h
81 md5.o: md5.h
82 serpent.o transform.o: serpent.h
83 serpent.o: serpentsboxes.h
84 conffile.o: modules.h
85 site.c util.c: unaligned.h
86
87 secnet: $(OBJECTS)
88
89 version.c: Makefile
90         echo "char version[]=\"secnet-$(VERSION)\";" >version.c
91
92 install: all
93         $(INSTALL_PROGRAM) secnet $(sbindir)/`echo secnet|sed '$(transform)'`
94
95 clean:
96         $(RM) -f $(srcdir)/*.o $(srcdir)/*~ $(srcdir)/*.yy.c \
97                 $(srcdir)/*.tab.[ch]
98
99 realclean:      clean
100         $(RM) -f $(TARGETS) $(srcdir)/Makefile $(srcdir)/config.h \
101         $(srcdir)/config.log $(srcdir)/config.status $(srcdir)/config.cache \
102         $(srcdir)/Makefile.bak core
103
104 pfname:=$(PACKAGE)-$(VERSION)
105 dist:
106         $(RM) -rf $(pfname)
107         mkdir $(pfname)
108         for i in $(DISTFILES) ; do ln -s ../$$i $(pfname)/ ; done
109         tar hcf ../$(pfname).tar $(pfname)
110         gzip -9f ../$(pfname).tar
111         $(RM) -rf $(pfname)
112
113 conffile.yy.c:  conffile.fl conffile.tab.c
114 conffile.tab.c: conffile.y