# $USAGI: Makefile.in,v 1.1 2001/06/20 09:58:05 yoshfuji Exp $

# Copyright (C) 2000-2001 USAGI/WIDE Project.
# All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither the name of the project nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.

CC = @CC@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBRARY = @INSTALL_LIBRARY@
INSTALL_DIR = @INSTALL_DIR@
LN_S = @LN_S@
PERL = @perl@
LORDER = @lorder@
CFLAGS = -D_USAGI

prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
slibdir = @libdir@
mandir = @mandir@

MODE=0644

HWOBJS   = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o
AFOBJS   = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.o
AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o rose_gr.o getroute.o x25_gr.o
AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o
ACTOBJS  = slip_ac.o ppp_ac.o activate.o
VARIA    = getargs.o masq_info.o proc.o util.o nstrcmp.o interface.o sockets.o util-ank.o

LIBS = libnet-tools.a
OBJS = $(HWOBJS) $(AFOBJS) $(AFGROBJS) $(AFSROBJS) $(ACTOBJS) $(VARIA)

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

.PHONY: all install clean distclean

all: $(LIBS)
install: all
	$(INSTALL_DIR) $(libdir)
	$(INSTALL_LIBRARY) $(LIBS) $(libdir)
clean:
	-rm -f $(LIBS) $(OBJS) $(LIBOBJS)
distclean: clean
	-rm -f include
	-rm -f *.a *.o
	-rm -f config.status config.cache config.log config.h Makefile

libnet-tools.a: $(OBJS) $(LIBOBJS)
	$(AR) r $@ $^

