# =============================================================================
# 
# @(#) Makefile,v SS7preBetaRelease(0.8.2.10) 2002/04/14 19:59:38
#
# -----------------------------------------------------------------------------
#
# Copyright (c) 2001-2002  OpenSS7 Corporation <http://www.openss7.com>
# Copyright (c) 1997-2000  Brian F. G. Bidulock <bidulock@dallas.net>
#
# All Rights Reserved.
#
# 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., 675 Mass
# Ave, Cambridge, MA 02139, USA.
#
# -----------------------------------------------------------------------------
#
# U.S. GOVERNMENT RESTRICTED RIGHTS.  If you are licensing this Software on
# behalf of the U.S. Government ("Government"), the following provisions apply
# to you.  If the Software is supplied by the Department of Defense ("DoD"), it
# is classified as "Commercial Computer Software" under paragraph 252.227-7014
# of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any
# successor regulations) and the Government is acquiring only the license rights
# granted herein (the license rights customarily provided to non-Government
# users).  If the Software is supplied to any unit or agency of the Government
# other than DoD, it is classified as "Restricted Computer Software" and the
# Government's rights in the Software are defined in paragraph 52.227-19 of the
# Federal Acquisition Regulations ("FAR") (or any success regulations) or, in
# the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR
# (or any successor regulations).
#
# -----------------------------------------------------------------------------
#
# Commercial licensing and support of this software is available from OpenSS7
# Corporation at a fee.  See http://www.openss7.com/
#
# -----------------------------------------------------------------------------
#
# Last Modified 2002/04/14 19:59:38 by brian
#
# =============================================================================

TOPDIR = ../..

INET_CMAJOR	?= 30
IP_CMINOR	?= 32
ICMP_CMINOR	?= 33
GGP_CMINOR	?= 34
IPIP_CMINOR	?= 35
TCP_CMINOR	?= 36
EGP_CMINOR	?= 37
PUP_CMINOR	?= 38
UDP_CMINOR	?= 39
IDP_CMINOR	?= 40
RAWIP_CMINOR	?= 41
FREE_CMINOR	?= 50

TGTS = inet

inet_bins = inet.o
inet_srcs = inet.c
inet_incs = 
inet_hdrs = npi.h npi_ip.h tpi.h tpi_ip.h xti.h xti_inet.h
inet_cmaj = INET_CMAJOR
inet_cmin = IP_CMINOR ICMP_CMINOR GGP_CMINOR IPIP_CMINOR TCP_CMINOR \
		EGP_CMINOR PUP_CMINOR UDP_CMINOR IDP_CMINOR RAWIP_CMINOR \
		FREE_CMINOR

define install_devices_rule
	rm -fr /dev/inet
	mkdir -m 0755 /dev/inet
	mknod -m 0666 /dev/inet/ip	c $(INET_CMAJOR) $(IP_CMINOR)
	mknod -m 0666 /dev/inet/icmp	c $(INET_CMAJOR) $(ICMP_CMINOR)
	mknod -m 0666 /dev/inet/ggp	c $(INET_CMAJOR) $(GGP_CMINOR)
	mknod -m 0666 /dev/inet/ipip	c $(INET_CMAJOR) $(IPIP_CMINOR)
	mknod -m 0666 /dev/inet/tcp	c $(INET_CMAJOR) $(TCP_CMINOR)
	mknod -m 0666 /dev/inet/egp	c $(INET_CMAJOR) $(EGP_CMINOR)
	mknod -m 0666 /dev/inet/pup	c $(INET_CMAJOR) $(PUP_CMINOR)
	mknod -m 0666 /dev/inet/udp	c $(INET_CMAJOR) $(UDP_CMINOR)
	mknod -m 0666 /dev/inet/idp	c $(INET_CMAJOR) $(IDP_CMINOR)
	mknod -m 0666 /dev/inet/rawip	c $(INET_CMAJOR) $(RAWIP_CMINOR)
	ln /dev/inet/udp /dev/inet/arp
	ln /dev/inet/udp /dev/inet/rip
	for i in ip icmp ggp ipip tcp egp pup udp idp rawip arp rip; do rm -f /dev/$$i; ln /dev/inet/$$i /dev/$$i; done
endef

HDIR := sys
HDIR_INST = $(LIS_INCL)

XCCP =
XPRG =
CTST =
TSTS =

RULEFILE = $(TOPDIR)/Makefile.rules

include $(RULEFILE)


