# Project    : ipv6calc/ipv6calcweb
# File       : Makefile
# Version    : $Id: d6003db21f5b7a224abe64cc453e59fae6fd7f9f $
# Copyright  : 2002-2022 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
#  Makefile for ipv6calcweb
#

all:		ipv6calcweb

ipv6calcweb:	ipv6calcweb.cgi.in
		./create_ipv6calcweb-cgi.sh

update:

install:

distclean:
		${MAKE} clean

autoclean:
		${MAKE} distclean

clean:
		rm -f ipv6calcweb.cgi

test:
		${MAKE} ipv6calcweb
		# Test script (no sleeps and no Anti-DoS)
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ HTTP_IPV6CALCWEB_DEBUG="0x5000" ./ipv6calcweb.cgi >/dev/null
		# Pseudo random selected
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ ./test_ipv6calcweb.sh 2001:200:1:ea::1 || exit 1
		# www.hp.com
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ ./test_ipv6calcweb.sh 15.200.30.23 || exit 1
		# Pseudo random
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ ./test_ipv6calcweb.sh 3ffe:831f:ce49:7601:8000:efff:af4a:86BF || exit 1
		# RFC
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ ./test_ipv6calcweb.sh :: || exit 1
		# Form mode
		LD_LIBRARY_PATH=@LD_LIBRARY_PATH@ ./test_ipv6calcweb_form.sh || exit 1

test-minimal:
		${MAKE} test

test-ldlibpath:
		${MAKE} ipv6calcweb
		# Pseudo random selected
		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@LD_LIBRARY_PATH_BASIC@ ./test_ipv6calcweb.sh 2001:200:1:ea::1 || exit 1
		# www.hp.com
		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@LD_LIBRARY_PATH_BASIC@ ./test_ipv6calcweb.sh 15.200.30.23 || exit 1
		# Pseudo random
		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@LD_LIBRARY_PATH_BASIC@ ./test_ipv6calcweb.sh 3ffe:831f:ce49:7601:8000:efff:af4a:86BF || exit 1
		# RFC
		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@LD_LIBRARY_PATH_BASIC@ ./test_ipv6calcweb.sh :: || exit 1
		# Form mode
		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@LD_LIBRARY_PATH_BASIC@ ./test_ipv6calcweb_form.sh || exit 1
