# Generated automatically from Makefile.in by configure.
#
# Project    : ipv6calc
# File       : Makefile[.in]
# Version    : $Id: Makefile.in,v 1.9 2002/02/25 21:40:18 peter Exp $
# Copyright  : 2001-2002 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
#  Makefile for ipv6calc
#

# Compiler and Linker Options
COPTS = -O2 -Wall -g -ansi	# ANSI compatible

CFLAGS	= $(COPTS) -Igetopt/

CC	= gcc

OBJS = ipv6calc.o addr_to_compressed.o addr_to_uncompressed.o addr_to_fulluncompressed.o addr_to_ifinet6.o addr_to_ip6int.o addr_to_bitstring.o ifinet6_to_compressed.o  libipv6calc.o addr_to_base85.o librfc1924.o base85_to_addr.o librfc1884.o libmac.o libeui64.o mac_to_eui64.o eui64_to_privacy.o librfc3041.o showinfo.o libipv6addr.o librfc2874.o libhelp.o librfc1886.o

GETOBJS = getopt/getopt.o getopt/getopt1.o

all:		ipv6calc

.c.o:
		$(CC) $(CFLAGS) -c $<

$(OBJS):	ipv6calc.h libipv6addr.h librfc1884.h librfc2874.h addr_to_fulluncompressed.h base85_to_addr.h addr_to_base85.h addr_to_ifinet6.h libeui64.h libmac.h librfc3041.h addr_to_bitstring.h addr_to_ip6int.h eui64_to_privacy.h libhelp.h mac_to_eui64.h addr_to_compressed.h addr_to_uncompressed.h ifinet6_to_compressed.h libipv6addr.h librfc1924.h showinfo.h librfc1886.h

ipv6calc:	$(OBJS) getopt-make
		$(CC) -o ipv6calc $(OBJS) $(GETOBJS) -lcrypto
		$(CC) -o ipv6calc-static $(OBJS) $(GETOBJS) -lcrypto -static

distclean:
		make clean
		rm -f config.cache config.status config.log

autoclean:
		make distclean
		rm -f Makefile
		rm -f ipv6calc.h
		rm -f contrib/ipv6calc.spec
		rm config.h

clean:
		rm -f ipv6calc ipv6calc-static *.o
		cd getopt/ && make clean

install:
		make test
		mkdir -p $(root)/bin/
		install -m 755 -o root -g root ipv6calc $(root)/bin/

installonly:
		mkdir -p $(root)/bin/
		install -m 755 -o root -g root ipv6calc $(root)/bin/

getopt-make:
		cd getopt/ && make

test:
		make
		./test_ipv6calc.sh || exit 1
