X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=blobdiff_plain;f=Makefile.in;h=85a770b34ed9f4bf9ec71ec85f06621b75b26a06;hp=8ec05ce23cea004c55d249862b1368b5c99dabcb;hb=refs%2Ftags%2Fv0.1.6;hpb=4efd681a66c15bc6f81eefc69396669e165e5e0f diff --git a/Makefile.in b/Makefile.in index 8ec05ce..85a770b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,24 +1,65 @@ -.DUMMY: all clean realclean dist install +# Makefile for secnet +# Copyright (C) 1995-2001 Stephen Early + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +.PHONY: all clean realclean dist install PACKAGE:=secnet -VERSION:=0.04 +VERSION:=0.1.6 @SET_MAKE@ srcdir:=@srcdir@ VPATH:=@srcdir@ -CFLAGS:=@CFLAGS@ @DEFS@ -DVERSION=\"$(VERSION)\" -Wall -I. +SHELL:=/bin/sh +RM:=@RM@ +CC:=@CC@ +INSTALL:=@INSTALL@ +INSTALL_PROGRAM:=@INSTALL_PROGRAM@ +CFLAGS:=@CFLAGS@ @DEFS@ -Wall -I$(srcdir) -I. LDFLAGS:=@LDFLAGS@ - LDLIBS:=@LIBS@ +prefix:=@prefix@ +exec_prefix:=@exec_prefix@ +sbindir:=@sbindir@ +sysconfdir:=@sysconfdir@ +transform:=@program_transform_name@ + TARGETS:=secnet OBJECTS:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \ resolver.o random.o udp.o site.o transform.o netlink.o rsa.o dh.o \ - serpent.o md5.o + serpent.o md5.o version.o tun.o slip.o sha1.o ipaddr.o log.o \ + process.o + +DISTFILES:=COPYING CREDITS INSTALL Makefile.in NOTES README TODO \ + conffile.c conffile.fl conffile.h conffile.y \ + conffile_internal.h config.h.bot \ + config.h.in config.h.top configure \ + configure.in debian dh.c \ + example-sites-file example.conf make-secnet-sites.py \ + install.sh ipaddr.c ipaddr.h ipaddr.py linux log.c md5.c md5.h \ + modules.c netlink.c netlink.h process.c process.h \ + random.c resolver.c rsa.c \ + secnet.c secnet.h serpent.c serpent.h serpentsboxes.h \ + sha1.c site.c slip.c stamp-h.in transform.c tun.c udp.c \ + unaligned.h util.c util.h %.c: %.y @@ -26,27 +67,67 @@ OBJECTS:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \ flex -o$@ $< %.tab.c: %.y - bison -d $< + bison -d -o $@ $< -RM:=@RM@ all: $(TARGETS) +# Automatic remaking of configuration files, from autoconf documentation +${srcdir}/configure: configure.in + cd ${srcdir} && autoconf + +# autoheader might not change config.h.in, so touch a stamp file. +${srcdir}/config.h.in: stamp-h.in +${srcdir}/stamp-h.in: configure.in config.h.top config.h.bot + cd ${srcdir} && autoheader + echo timestamp > ${srcdir}/stamp-h.in + +config.h: stamp-h +stamp-h: config.h.in config.status + ./config.status + +Makefile: Makefile.in config.status + ./config.status + +config.status: configure + ./config.status --recheck +# End of config file remaking rules + +# Manual dependencies section - XXX use autodep eventually +$(OBJECTS): config.h secnet.h util.h +conffile.o conffile.tab.o conffile.yy.o: conffile.h conffile_internal.h +secnet.c: conffile.h +md5.o: md5.h +serpent.o transform.o: serpent.h +serpent.o: serpentsboxes.h +conffile.o: ipaddr.h +site.c util.c: unaligned.h +conffile.yy.c: conffile.fl conffile.tab.c +conffile.tab.c: conffile.y +netlink.o tun.o slip.o: netlink.h +# End of manual dependencies section + secnet: $(OBJECTS) -clean: - $(RM) -f $(srcdir)/*.o $(srcdir)/*~ $(srcdir)/*.yy.c \ - $(srcdir)/*.tab.[ch] +version.c: Makefile + echo "char version[]=\"secnet-$(VERSION)\";" >version.c -realclean: clean - $(RM) -f $(TARGETS) $(srcdir)/Makefile $(srcdir)/config.h \ - $(srcdir)/config.log $(srcdir)/config.status $(srcdir)/config.cache \ - $(srcdir)/Makefile.bak core +install: all + $(INSTALL_PROGRAM) -D secnet $(sbindir)/`echo secnet|sed '$(transform)'` -dist: realclean - (cd .. ; ln -s $(PACKAGE) $(PACKAGE)-$(VERSION) ; tar hcf - \ - $(PACKAGE)-$(VERSION) | \ - gzip -9 > $(PACKAGE)-$(VERSION).tar.gz ; rm $(PACKAGE)-$(VERSION) ) +clean: + $(RM) -f *.o *.yy.c *.tab.[ch] $(TARGETS) core version.c -conffile.yy.c: conffile.fl conffile.tab.c -conffile.tab.c: conffile.y +realclean: clean + $(RM) -f *~ Makefile config.h \ + config.log config.status config.cache \ + stamp-h Makefile.bak + +pfname:=$(PACKAGE)-$(VERSION) +dist: + $(RM) -rf $(pfname) + mkdir $(pfname) + for i in $(DISTFILES) ; do ln -s ../$(srcdir)/$$i $(pfname)/ ; done + tar hcf ../$(pfname).tar $(pfname) + gzip -9f ../$(pfname).tar + $(RM) -rf $(pfname)