1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
######################################################################
# Makefile for fake October 1998
# Horms horms@verge.net.au
#
# Fake
# Script to spoof an ip
# Designed to create redundant servers
# Copyright (C) 1998 Horms <horms@verge.net.au>
#
# 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 of the License, 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., 59 Temple Place, Suite 330,
######################################################################
ROOT_DIR=
BIN_DIR=$(ROOT_DIR)/usr/sbin
BIN=fake
CONFIG_DIR=$(ROOT_DIR)/etc/fake
CONFIG=.fakerc clear_routers
INSTANCE_CONFIG_DIR=$(ROOT_DIR)/etc/fake/instance_config
INSTANCE_CONFIG=instance_config/203.12.97.7.cfg \
instance_config/192.168.89.19.cfg
MAN8=fake.8 send_arp.8
MAN8_DIR=$(ROOT_DIR)/usr/man/man8
DOC_DIR=$(ROOT_DIR)/usr/doc/fake-1.1.10
DOCS=README AUTHORS COPYING ChangeLog
SUBDIR=send_arp heartbeat
.PHONY: all install clean patch
all: patch
for i in $(SUBDIR); do make -C $$i all; done
clean: patch
for i in $(SUBDIR); do make -C $$i clean; done
make unpatch
rm -f core send_arp/send_arp.c.orig
install: all
for i in $(SUBDIR); do make -C $$i install; done
test -d $(BIN_DIR) || mkdir -p $(BIN_DIR)
install -c -m 755 $(BIN) $(BIN_DIR)
test -d $(CONFIG_DIR) || mkdir -p $(CONFIG_DIR)
install -c -m 644 $(CONFIG) $(CONFIG_DIR)
test -d $(INSTANCE_CONFIG_DIR) || mkdir -p $(INSTANCE_CONFIG_DIR)
install -c -m 644 $(INSTANCE_CONFIG) $(INSTANCE_CONFIG_DIR)
test -d $(DOC_DIR) || mkdir -p $(DOC_DIR)
install -c -m 644 $(DOCS) $(DOC_DIR)
test -d $(MAN8_DIR) || mkdir -p $(MAN8_DIR)
install -c -m 644 $(MAN8) $(MAN8_DIR)
patch:
cd send_arp ; test -f Makefile || \
( patch -p 1 < ../send_arp.patch ; \
patch -p 1 < ../send_arp.dev.patch ; \
patch -p 1 < ../send_arp.l2.patch ; \
patch -p 1 < ../send_arp.request_reply.patch ; )
unpatch:
cd send_arp ; test -f Makefile && \
( patch -p 1 -R < ../send_arp.request_reply.patch ; \
patch -p 1 -R < ../send_arp.l2.patch ; \
patch -p 1 -R < ../send_arp.dev.patch ; \
patch -p 1 -R < ../send_arp.patch )
cd send_arp ; rm -f Makefile
|