head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.44
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.42
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.40
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.38
	pgoyette-compat-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.36
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.34
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.32
	pgoyette-localcount-base:1.2
	netbsd-5-2-3-RELEASE:1.2
	netbsd-5-1-5-RELEASE:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	tls-earlyentropy:1.2.0.28
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	agc-symver:1.2.0.30
	agc-symver-base:1.2
	tls-maxphys-base:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.2.0.26
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	yamt-pagecache-base6:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.24
	yamt-pagecache-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.22
	bouyer-quota2-base:1.2
	matt-nb5-pq3:1.2.0.20
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.18
	netbsd-5-1-RELEASE:1.2
	netbsd-5-1-RC4:1.2
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	netbsd-5-0-1-RELEASE:1.2
	jym-xensuspend-nbase:1.2
	netbsd-5-0:1.2.0.16
	netbsd-5-0-RELEASE:1.2
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.2.0.14
	jym-xensuspend-base:1.2
	netbsd-5-0-RC1:1.2
	netbsd-5:1.2.0.12
	netbsd-5-base:1.2
	mjf-devfs2:1.2.0.10
	mjf-devfs2-base:1.2
	yamt-pf42-base4:1.2
	yamt-pf42-base3:1.2
	hpcarm-cleanup-nbase:1.2
	v4-1-29:1.1.1.16
	yamt-pf42-base2:1.2
	yamt-pf42:1.2.0.8
	yamt-pf42-base:1.2
	keiichi-mipv6:1.2.0.6
	keiichi-mipv6-base:1.2
	cube-autoconf:1.2.0.4
	cube-autoconf-base:1.2
	hpcarm-cleanup:1.2.0.2
	hpcarm-cleanup-base:1.2
	v4-1-23:1.1.1.15
	v4-1-22:1.1.1.15
	v4-1-20:1.1.1.14
	v4-1-19:1.1.1.14
	v4-1-13:1.1.1.13
	v4-1-8:1.1.1.12
	v4-1-6:1.1.1.12
	v4-1-5:1.1.1.11
	v4-1-3:1.1.1.10
	v4-1-1:1.1.1.9
	v3-4-29:1.1.1.8
	v3-4-27:1.1.1.7
	v3-4-25:1.1.1.6
	v3-4-23:1.1.1.5
	v3-4-16:1.1.1.4
	v3-4-9:1.1.1.3
	v3-4-6:1.1.1.3
	v3-4-4:1.1.1.3
	v3-4-3:1.1.1.2
	v3-4-2:1.1.1.2
	v3-4-1:1.1.1.2
	v3-3-8:1.1.1.1
	v3-3-6:1.1.1.1
	v3-3-5:1.1.1.1
	DARRENR:1.1.1;
locks; strict;
comment	@# @;


1.2
date	99.12.11.22.49.37;	author veego;	state dead;
branches;
next	1.1;

1.1
date	99.12.11.22.23.59;	author veego;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	99.12.11.22.23.59;	author veego;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2000.05.03.10.55.59;	author veego;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2000.05.23.06.11.31;	author veego;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2001.03.26.03.53.33;	author mike;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2002.01.24.08.18.31;	author martti;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2002.03.14.12.30.10;	author martti;	state Exp;
branches;
next	1.1.1.7;

1.1.1.7
date	2002.05.02.16.51.30;	author martti;	state Exp;
branches;
next	1.1.1.8;

1.1.1.8
date	2002.09.19.07.56.06;	author martti;	state Exp;
branches;
next	1.1.1.9;

1.1.1.9
date	2004.03.28.08.55.50;	author martti;	state Exp;
branches;
next	1.1.1.10;

1.1.1.10
date	2004.07.23.05.34.07;	author martti;	state Exp;
branches;
next	1.1.1.11;

1.1.1.11
date	2005.02.08.06.53.04;	author martti;	state Exp;
branches;
next	1.1.1.12;

1.1.1.12
date	2005.02.19.21.26.14;	author martti;	state Exp;
branches;
next	1.1.1.13;

1.1.1.13
date	2006.04.04.16.08.50;	author martti;	state Exp;
branches;
next	1.1.1.14;

1.1.1.14
date	2007.04.14.20.17.25;	author martin;	state Exp;
branches;
next	1.1.1.15;

1.1.1.15
date	2007.05.15.22.26.03;	author martin;	state Exp;
branches;
next	1.1.1.16;

1.1.1.16
date	2008.05.20.06.44.30;	author darrenr;	state Exp;
branches;
next	;


desc
@@


1.2
log
@We don't need these files.
@
text
@#
# Copyright (C) 1993-1998 by Darren Reed.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and due credit is given
# to the original author and the contributors.
#
BINDEST=/usr/sbin
SBINDEST=/sbin
MANDIR=/usr/share/man
CC=cc -Wall -Wuninitialized -Wstrict-prototypes -Werror -O
CFLAGS=-g -I$(TOP)
#
# For NetBSD/FreeBSD
#
DEVFS!=/usr/bin/lsvfs 2>&1 | sed -n 's/.*devfs.*/-DDEVFS/p'
CPU!=uname -m
INC=-I/usr/include -I/sys -I/sys/sys -I/sys/arch
DEF=-D$(CPU) -D__$(CPU)__ -DINET -DKERNEL -D_KERNEL $(INC) $(DEVFS)
IPDEF=$(DEF) -DGATEWAY -DDIRECTED_BROADCAST
VNODESHDIR=/sys/kern
MLD=$(ML) vnode_if.h
ML=mln_ipl.c
IPFILC=ip_fil.c
LKM=if_ipl.o
DLKM=
MFLAGS="BINDEST=$(BINDEST)" "SBINDEST=$(SBINDEST)" "MANDIR=$(MANDIR)" \
	'CFLAGS=$(CFLAGS) $(SOLARIS2)' "IPFLKM=$(IPFLKM)" \
	"IPFLOG=$(IPFLOG)" "LOGFAC=$(LOGFAC)" "POLICY=$(POLICY)" \
	"SOLARIS2=$(SOLARIS2)" "DEBUG=$(DEBUG)" "DCPU=$(CPU)" \
	"CPUDIR=$(CPUDIR)"
#
########## ########## ########## ########## ########## ########## ##########
#
CP=/bin/cp
RM=/bin/rm
CHMOD=/bin/chmod
INSTALL=install
#
MODOBJS=ip_fil.o fil_k.o ml_ipl.o ip_nat.o ip_frag.o ip_state.o ip_proxy.o \
	ip_auth.o ip_log.o
DFLAGS=$(IPFLKM) $(IPFLOG) $(DEF) $(DLKM)
IPF=ipf.o parse.o opt.o facpri.o
IPT=ipt.o parse.o fil.o ipft_sn.o ipft_ef.o ipft_td.o ipft_pc.o opt.o \
    ipft_tx.o misc.o ip_frag_u.o ip_state_u.o ip_nat_u.o ip_proxy_u.o \
    ip_auth_u.o ipft_hx.o ip_fil_u.o natparse.o facpri.o
FILS=fils.o parse.o kmem.o opt.o facpri.o

build all: ipf ipfstat ipftest ipmon ipnat $(LKM)

ipfstat: $(FILS)
	$(CC) $(DEBUG) $(CFLAGS) $(FILS) -o $@@ $(LIBS)

ipf: $(IPF)
	$(CC) $(DEBUG) $(CFLAGS) $(IPF) -o $@@ $(LIBS)
	/bin/rm -f $(TOP)/ipf
	ln -s `pwd`/ipf $(TOP)

ipftest: $(IPT)
	$(CC) $(DEBUG) $(CFLAGS) $(IPT) -o $@@ $(LIBS)
	/bin/rm -f $(TOP)/ipftest
	ln -s `pwd`/ipftest $(TOP)

ipnat: ipnat.o kmem.o natparse.o
	$(CC) $(DEBUG) $(CFLAGS) ipnat.o kmem.o natparse.o -o $@@ $(LIBS)

tests:
	(cd test; make )

fils.o: $(TOP)/fils.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_frag.h \
	$(TOP)/ip_compat.h $(TOP)/ip_state.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/fils.c -o $@@

fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/fil.c -o $@@

fil_k.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h
	$(CC) $(DEBUG) $(CFLAGS) $(POLICY) $(DFLAGS) -c $(TOP)/fil.c -o $@@

ipf.o: $(TOP)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipf.c -o $@@

ipt.o: $(TOP)/ipt.c $(TOP)/ip_fil.h $(TOP)/ipt.h $(TOP)/ipf.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipt.c -o $@@

misc.o: $(TOP)/misc.c $(TOP)/ip_fil.h $(TOP)/ipt.h $(TOP)/ipf.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/misc.c -o $@@

opt.o: $(TOP)/opt.c $(TOP)/ip_fil.h $(TOP)/ipf.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/opt.c -o $@@

ipnat.o: $(TOP)/ipnat.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipnat.c -o $@@

natparse.o: $(TOP)/natparse.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/natparse.c -o $@@

ipft_sn.o: $(TOP)/ipft_sn.c $(TOP)/ipt.h $(TOP)/ipf.h $(TOP)/ip_fil.h \
	$(TOP)/snoop.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_sn.c -o $@@

ipft_ef.o: $(TOP)/ipft_ef.c $(TOP)/ipf.h $(TOP)/ip_fil.h $(TOP)/ipt.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_ef.c -o $@@

ipft_td.o: $(TOP)/ipft_td.c $(TOP)/ipf.h $(TOP)/ip_fil.h $(TOP)/ipt.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_td.c -o $@@

ipft_pc.o: $(TOP)/ipft_pc.c $(TOP)/ipf.h $(TOP)/ip_fil.h $(TOP)/ipt.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_pc.c -o $@@

ipft_tx.o: $(TOP)/ipft_tx.c $(TOP)/ipf.h $(TOP)/ip_fil.h $(TOP)/ipt.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_tx.c -o $@@

ipft_hx.o: $(TOP)/ipft_hx.c $(TOP)/ipf.h $(TOP)/ip_fil.h $(TOP)/ipt.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipft_hx.c -o $@@

ip_nat_u.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_nat.c -o $@@

ip_proxy_u.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h $(TOP)/ip_ftp_pxy.c  $(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_proxy.c -o $@@

ip_frag_u.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_frag.c -o $@@

ip_state_u.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_state.c -o $@@

ip_auth_u.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_auth.c -o $@@

ip_fil_u.o: $(TOP)/$(IPFILC) $(TOP)/ip_fil.h $(TOP)/ip_compat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/$(IPFILC) -o $@@

if_ipl.o: $(MODOBJS) 
	ld -r $(MODOBJS) -o $(LKM)
	${RM} -f if_ipl

ip_nat.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@@

ip_frag.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@@

ip_state.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@@

ip_proxy.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h $(TOP)/ip_ftp_pxy.c $(TOP)/ip_raudio_pxy.c \
	$(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@@

ip_auth.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h \
	$(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@@

ip_fil.o: $(TOP)/$(IPFILC) $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/$(IPFILC) -o $@@

ip_log.o: $(TOP)/ip_log.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@@

vnode_if.h: $(VNODESHDIR)/vnode_if.sh $(VNODESHDIR)/vnode_if.src
	mkdir -p ../sys
	sh $(VNODESHDIR)/vnode_if.sh $(VNODESHDIR)/vnode_if.src
	if [ -f ../sys/vnode_if.h ] ; then mv ../sys/vnode_if.h .; fi
	rmdir ../sys

ml_ipl.o: $(TOP)/$(MLD) $(TOP)/ipl.h
	-/bin/rm -f vnode_if.c
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/$(ML) -o $@@

kmem.o: $(TOP)/kmem.c
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/kmem.c -o $@@

parse.o: $(TOP)/parse.c $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/parse.c -o $@@

facpri.o: $(TOP)/facpri.c $(TOP)/facpri.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/facpri.c -o $@@

ipmon: $(TOP)/ipmon.c
	$(CC) $(DEBUG) $(CFLAGS) $(LOGFAC) $(TOP)/ipmon.c -o $@@ $(LIBS)

clean:
	${RM} -f *.core *.o ipt fils ipf ipfstat ipftest ipmon if_ipl ipnat \
	vnode_if.h $(LKM) ioconf.h
	${MAKE} -f Makefile.ipsend ${MFLAGS} clean
	-(for i in *; do \
		if [ -d $${i} -a -f $${i}/Makefile ] ; then \
			cd $${i}; (make clean); cd ..; \
			rm $${i}/Makefile $${i}/Makefile.ipsend; \
			rmdir $${i}; \
		fi \
	done)

install:
	-$(CP) $(TOP)/ip_fil.h /usr/include/netinet/ip_fil.h
	-$(CHMOD) 444 /usr/include/netinet/ip_fil.h
	-if [ -d /lkm -a -f if_ipl.o ] ; then \
		cp if_ipl.o /lkm; \
	fi
	-$(INSTALL) -cs -g wheel -m 755 -o root ipfstat ipf ipnat $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipmon ipftest $(BINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipftest ipftest $(BINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipf ipftest $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipnat ipftest $(SBINDEST)
	(cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP))
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Inital import of IP Filter 3.3.5 under the dist directory.
@
text
@@


1.1.1.2
log
@Import IP Filter 3.4.1
@
text
@d43 3
a45 3
IPF=ipf.o parse.o common.o opt.o facpri.o
IPT=ipt.o parse.o common.o fil.o ipft_sn.o ipft_ef.o ipft_td.o ipft_pc.o \
    opt.o ipft_tx.o misc.o ip_frag_u.o ip_state_u.o ip_nat_u.o ip_proxy_u.o \
d47 1
a47 2
IPNAT=ipnat.o kmem.o natparse.o common.o
FILS=fils.o parse.o kmem.o opt.o facpri.o common.o
d49 1
a49 1
build all: ipf ipfs ipfstat ipftest ipmon ipnat $(LKM)
d52 1
a52 2
	$(CC) $(DEBUG) $(CFLAGS) $(STATETOP_CFLAGS) $(STATETOP_INC) $(FILS) \
	-o $@@ $(LIBS) $(STATETOP_LIB)
d64 2
a65 5
ipnat: $(IPNAT)
	$(CC) $(DEBUG) $(CFLAGS) $(IPNAT) -o $@@ $(LIBS)

ipfs: ipfs.o
	$(CC) $(DEBUG) $(CFLAGS) ipfs.o -o $@@ $(LIBS)
d71 2
a72 7
	$(TOP)/ip_compat.h $(TOP)/ip_state.h $(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) $(STATETOP_CFLAGS) $(STATETOP_INC) \
	-c $(TOP)/fils.c -o $@@

ipfs.o: $(TOP)/ipfs.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_state.h \
	$(TOP)/ip_nat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipfs.c -o $@@
d95 1
a95 2
natparse.o: $(TOP)/natparse.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h \
	$(TOP)/ip_compat.h
d129 1
a129 1
	$(TOP)/ip_fil.h $(TOP)/ip_nat.h
a142 6
ipf.ko ipl.ko: $(MODOBJS) 
	gensetdefs $(MODOBJS)
	$(CC) $(DEBUG) $(CFLAGS) -c setdef0.c
	$(CC) $(DEBUG) $(CFLAGS) -c setdef1.c
	ld -Bshareable -o $(LKM) setdef0.o $(MODOBJS) setdef1.o

d150 1
a150 1
	$(TOP)/ip_fil.h $(TOP)/ip_nat.h
a183 3
common.o: $(TOP)/common.c $(TOP)/ip_fil.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/common.c -o $@@

d192 1
a192 3
	vnode_if.h $(LKM) ioconf.h *.ko setdef1.c setdef0.c setdefs.h \
	y.tab.? lex.yy.c ipfs

d208 5
a212 6
	-$(INSTALL) -cs -g wheel -m 755 -o root ipf $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipfs $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipnat $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipfstat $(SBINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipmon $(BINDEST)
	-$(INSTALL) -cs -g wheel -m 755 -o root ipftest $(BINDEST)
@


1.1.1.3
log
@Import IP Filter 3.4.4
@
text
@d87 1
a87 2
fil_k.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h \
	 $(TOP)/ipl.h
@


1.1.1.4
log
@Import IP Filter 3.4.16
@
text
@a230 3
	-if [ -d /modules -a -f ipf.ko ] ; then \
		cp ipf.ko /modules; \
	fi
@


1.1.1.5
log
@Import IPFilter 3.4.23
@
text
@d11 1
a11 1
CC=cc -Wall -Wstrict-prototypes -Wuninitialized -O
d46 3
a48 4
    ip_auth_u.o ipft_hx.o ip_fil_u.o natparse.o facpri.o printnat.o \
    printstate.o
IPNAT=ipnat.o kmem.o natparse.o common.o printnat.o
FILS=fils.o parse.o kmem.o opt.o facpri.o common.o printstate.o
d53 2
a54 2
	$(CC) -static $(DEBUG) $(CFLAGS) $(STATETOP_CFLAGS) $(STATETOP_INC) \
		$(FILS) -o $@@ $(LIBS) $(STATETOP_LIB) -lkvm
d57 1
a57 1
	$(CC) -static $(DEBUG) $(CFLAGS) $(IPF) -o $@@ $(LIBS)
d67 1
a67 1
	$(CC) -static $(DEBUG) $(CFLAGS) $(IPNAT) -o $@@ $(LIBS) -lkvm
d70 1
a70 1
	$(CC) -static $(DEBUG) $(CFLAGS) ipfs.o -o $@@ $(LIBS)
a109 8
printnat.o: $(TOP)/printnat.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h \
	$(TOP)/ip_compat.h $(TOP)/ip_proxy.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/printnat.c -o $@@

printstate.o: $(TOP)/printstate.c $(TOP)/ip_fil.h $(TOP)/ipf.h \
	$(TOP)/ip_state.h $(TOP)/ip_compat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/printstate.c -o $@@

d133 1
a133 2
	$(TOP)/ip_fil.h $(TOP)/ip_ftp_pxy.c $(TOP)/ip_rcmd_pxy.c \
	$(TOP)/ip_raudio_pxy.c $(TOP)/ip_ipsec_pxy.c $(TOP)/ip_nat.h
d173 1
a173 1
	$(TOP)/ip_rcmd_pxy.c $(TOP)/ip_ipsec_pxy.c $(TOP)/ip_nat.h
@


1.1.1.6
log
@Import IPFilter 3.4.25
@
text
@d42 1
a42 1
DFLAGS=$(IPFLKM) $(DEF) $(DLKM)
d46 2
a47 2
    ip_auth_u.o ipft_hx.o ip_fil_u.o ip_log_u.o natparse.o facpri.o \
    printnat.o printstate.o
a160 3
ip_log_u.o: $(TOP)/ip_log.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h
	$(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ip_log.c -o $@@

a219 2
	/bin/rm -f $(TOP)/ipmon
	ln -s `pwd`/ipmon $(TOP)
d244 6
a249 16
	@@for i in ipf:$(SBINDEST) ipfs:$(SBINDEST) ipnat:$(SBINDEST) \
	    ipfstat:$(SBINDEST) ipftest:$(SBINDEST) ipmon:$(BINDEST); do \
		def="`expr $$i : '[^:]*:\(.*\)'`"; \
		p="`expr $$i : '\([^:]*\):.*'`"; \
		for d in $(BINDEST) $(SBINDEST); do \
			if [ -f $$d/$$i ] ; then \
				echo "$(INSTALL) -cs -g wheel -m 755 -o root $$p $$d"; \
				$(INSTALL) -cs -g wheel -m 755 -o root $$p $$d; \
				dd=$$d; \
			fi; \
		done; \
		if [ -z "$$dd" ] ; then \
			echo $(INSTALL) -cs -g wheel -m 755 -o root $$p $$def; \
			$(INSTALL) -cs -g wheel -m 755 -o root $$p $$def; \
		fi \
	done
@


1.1.1.7
log
@Import IPFilter 3.4.27
@
text
@a9 2
SEARCHDIRS=$(BINDEST) $(SBINDEST) /bin /usr/bin /sbin /usr/sbin \
	/usr/local/bin /usr/local/sbin
a51 8
	/bin/rm -f $(TOP)/ipf
	ln -s `pwd`/ipf $(TOP)
	/bin/rm -f $(TOP)/ipftest
	ln -s `pwd`/ipftest $(TOP)
	/bin/rm -f $(TOP)/ipmon
	ln -s `pwd`/ipmon $(TOP)
	/bin/rm -f $(TOP)/ipnat
	ln -s `pwd`/ipnat $(TOP)
d59 2
d64 2
d223 2
d253 2
a254 2
		for d in $(SEARCHDIRS); do \
			if [ -f $$d/$$p ] ; then \
@


1.1.1.8
log
@Import IPFilter 3.4.29
@
text
@a233 1
	${RM} -f ../opt_inet6.h ../ipftest ../ipmon ../ipf ../ipnat
d245 2
a246 5
	for i in ip_compat.h ip_fil.h ip_nat.h ip_state.h ip_proxy.h \
		ip_frag.h ip_auth.h; do \
		/bin/cp $(TOP)/$$i /usr/include/netinet/; \
		-$(CHMOD) 444 /usr/include/netinet/$$i; \
	done
@


1.1.1.9
log
@Import IPFilter 4.1.1
@
text
@d4 3
a6 1
# See the IPFILTER.LICENCE file for details on licencing.
d10 2
d13 1
a13 3
SEARCHDIRS!=echo $(BINDEST) $(SBINDEST) /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin | awk '{for(i=1;i<NF;i++){print $$i;}}' - | sort -u

CC=cc -Wall -Wuninitialized -Wstrict-prototypes -O
d20 1
a20 1
INC=-I/sys -I/sys/sys -I/sys/arch
d24 1
a24 1
MLD=$(ML)
d26 1
a27 1
LKMR=ipfrule.o
a28 2
OBJ=.
DEST=$(OBJ)
d33 1
a33 2
	"CPUDIR=$(CPUDIR)" "LOOKUP=$(LOOKUP)" "SYNC=$(SYNC)"
LIBS=-L. -lipf $(LIBBPF)
d42 24
a65 31
MODOBJS=ip_fil.o fil.o ml_ipl.o ip_nat.o ip_frag.o ip_state.o ip_proxy.o \
	ip_auth.o ip_log.o ip_pool.o ip_htable.o ip_lookup.o ip_rules.o \
	ip_scan.o ip_sync.o
#	ip_trafcon.o
DFLAGS=$(IPFLKM) $(IPFLOG) $(LOOKUP) $(SYNC) $(DEF) $(DLKM) $(IPFBPF)
IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter_u.o
IPT=ipftest.o fil_u.o ip_frag_u.o ip_state_u.o ip_nat_u.o \
    ip_proxy_u.o ip_auth_u.o ip_htable_u.o ip_lookup_u.o ip_pool_u.o \
    ip_scan_u.o ip_sync_u.o ip_rules_u.o ip_fil_u.o ip_log_u.o \
    ippool_y.o ippool_l.o ipf_y.o ipf_l.o ipnat_y.o ipnat_l.o \
    md5_u.o radix_u.o bpf_filter_u.o
#   ip_syn_u.o
#ip_trafcon_u.o
TOOL=$(TOP)/tools
IPNAT=ipnat.o ipnat_y.o ipnat_l.o
IPMON=ipmon.o ipmon_y.o ipmon_l.o
IPPOOL=ippool_y.o ippool_l.o kmem.o ippool.o
IPTRAFCON=iptrafcon.o
PROXYLIST=$(TOP)/ip_ftp_pxy.c $(TOP)/ip_ipsec_pxy.c $(TOP)/ip_irc_pxy.c \
	  $(TOP)/ip_netbios_pxy.c $(TOP)/ip_raudio_pxy.c $(TOP)/ip_rcmd_pxy.c \
	  $(TOP)/ip_rpcb_pxy.c
FILS=ipfstat.o
LIBSRC=$(TOP)/lib
RANLIB=ranlib
AROPTS=cq
HERE!=pwd
CCARGS=-I. $(DEBUG) $(CFLAGS)
#
# Extra is option kernel things we always want in user space.
#
EXTRA=$(ALLOPTS)
d67 2
a68 1
include $(TOP)/lib/Makefile
d70 2
a71 3
build all: $(OBJ)/libipf.a ipf ipfs ipfstat ipftest ipmon ipnat ippool \
	   ipscan ipsyncm ipsyncs $(LKM) $(LKMR)
	-sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done'
d73 2
a74 3
ipfstat: $(FILS) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(STATETOP_CFLAGS) $(STATETOP_INC) $(FILS) \
	-o $@@ $(LIBS) $(STATETOP_LIB) -lkvm
d76 2
a77 2
ipf: $(IPF) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(IPF) -o $@@ $(LIBS) -ll $(LIBBPF)
d79 2
a80 5
ipftest: $(IPT) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(IPT) -o $@@ $(LIBS) -ll $(LIBBPF)

ipnat: $(IPNAT) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(IPNAT) -o $@@ $(LIBS) -lkvm -ll
d82 4
a85 5
ipfs: ipfs.o
	$(CC) $(CCARGS) ipfs.o -o $@@

ipsyncm: ipsyncm.o $(OBJ)/libipf.a
	$(CC) $(CCARGS) ipsyncm.o -o $@@ $(LIBS)
d87 3
a89 2
ipsyncs: ipsyncs.o $(OBJ)/libipf.a
	$(CC) $(CCARGS) ipsyncs.o -o $@@ $(LIBS)
d91 2
a92 2
ipsyncm.o: $(TOOL)/ipsyncm.c $(TOP)/ip_sync.h
	$(CC) $(CCARGS) -c $(TOOL)/ipsyncm.c -o $@@
d94 3
a96 2
ipsyncs.o: $(TOOL)/ipsyncs.c $(TOP)/ip_sync.h
	$(CC) $(CCARGS) -c $(TOOL)/ipsyncs.c -o $@@
d98 2
a99 2
tests:
	(cd test; make )
d101 2
a102 4
ipfstat.o: $(TOOL)/ipfstat.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_frag.h \
	$(TOP)/ip_compat.h $(TOP)/ip_state.h $(TOP)/ip_nat.h $(TOP)/opts.h
	$(CC) $(CCARGS) $(STATETOP_CFLAGS) $(STATETOP_INC) \
	-c $(TOOL)/ipfstat.c -o $@@
d104 2
a105 3
ipfs.o: $(TOOL)/ipfs.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_state.h \
	$(TOP)/ip_nat.h $(TOP)/opts.h
	$(CC) $(CCARGS) -c $(TOOL)/ipfs.c -o $@@
d107 2
a108 3
fil_u.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h \
	    $(TOP)/opts.h
	$(CC) $(CCARGS) $(EXTRA) $(IPFBPF) -D_RADIX_H_ -c $(TOP)/fil.c -o $@@
d110 2
a111 2
fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ipl.h
	$(CC) $(CCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) -c $(TOP)/fil.c -o $@@
d113 3
a115 2
ipf.o: $(TOOL)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/opts.h
	$(CC) $(CCARGS) -c $(TOOL)/ipf.c -o $@@
d117 3
a119 2
ipfcomp.o: $(TOOL)/ipfcomp.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/opts.h
	$(CC) $(CCARGS) -c $(TOOL)/ipfcomp.c -o $@@
d121 3
a123 3
ipftest.o: $(TOOL)/ipftest.c $(TOP)/ip_fil.h $(TOP)/ipt.h $(TOP)/ipf.h \
	    $(TOP)/opts.h
	$(CC) $(CCARGS) -c $(TOOL)/ipftest.c -o $@@
d125 3
a127 3
ipnat.o: $(TOOL)/ipnat.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h \
	    $(TOP)/opts.h
	$(CC) $(CCARGS) -c $(TOOL)/ipnat.c -o $@@
d129 2
a130 2
ipnat_y.o: ipnat_y.c ipnat_y.h ipnat_l.h
	$(CC) $(CCARGS) -c ipnat_y.c -o $@@
d132 2
a133 2
ipnat_l.o: ipnat_l.c ipnat_y.h
	$(CC) $(CCARGS) -I. -c ipnat_l.c -o $@@
d135 2
a136 2
ipnat_y.h ipnat_y.c: $(TOOL)/ipnat_y.y
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)
d138 2
a139 2
ipnat_l.c: $(TOOL)/lexer.c $(TOP)/ip_nat.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)
d141 2
a142 2
ipnat_l.h: $(TOOL)/lexer.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)
d145 1
a145 1
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_nat.c -o $@@
d148 3
a150 2
	$(TOP)/ip_fil.h $(PROXYLIST) $(TOP)/ip_nat.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_proxy.c -o $@@
d154 1
a154 1
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_frag.c -o $@@
d158 1
a158 1
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_state.c -o $@@
d162 1
a162 1
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_auth.c -o $@@
d164 2
a165 30
ip_fil_u.o: $(TOP)/ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_fil.c -o $@@

ip_rules_u.o: $(TOP)/ip_rules.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_rules.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_rules.c -o $@@

ip_scan_u.o: $(TOP)/ip_scan.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_scan.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_scan.c -o $@@

ip_sync_u.o: $(TOP)/ip_sync.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_sync.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_sync.c -o $@@

ip_pool_u.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_pool.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_pool.c -o $@@

ip_htable_u.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_htable.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_htable.c -o $@@

ip_lookup_u.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_lookup.h $(TOP)/ip_pool.h $(TOP)/ip_htable.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_lookup.c -o $@@

ip_trafcon_u.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_trafcon.h
	$(CC) $(CCARGS) -c $(TOP)/ip_trafcon.c -o $@@
d168 1
a168 10
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_log.c -o $@@

md5_u.o: $(TOP)/md5.c $(TOP)/md5.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/md5.c -o $@@

radix_u.o: $(TOP)/md5.c $(TOP)/radix_ipf.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/radix.c -o $@@

bpf_filter_u.o: $(TOP)/bpf_filter.c $(TOP)/pcap-ipf.h
	$(CC) $(CCARGS) $(EXTRA) -c $(TOP)/bpf_filter.c -o $@@
a173 4
ipf.ko.5 ipl.ko.5: $(MODOBJS)
	ld -warn-common -r -d -o $(.TARGET:S/.ko/.kld/) $(MODOBJS)
	ld -Bshareable -d -warn-common -o $(LKM:S/.5$//) $(.TARGET:S/.ko/.kld/)

d176 2
a177 2
	$(CC) $(CCARGS) -c setdef0.c
	$(CC) $(CCARGS) -c setdef1.c
d181 1
a181 1
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@@
d184 1
a184 1
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@@
d188 1
a188 1
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@@
d191 3
a193 2
	$(TOP)/ip_fil.h $(PROXYLIST) $(TOP)/ip_nat.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@@
d197 1
a197 1
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@@
d199 2
a200 6
ip_fil.c:
	/bin/rm -f ip_fil.c
	ln -s $(TOP)/ip_fil_`uname -s|tr A-Z a-z`.c ip_fil.c

ip_fil.o: ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h
	$(CC) $(CCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@@
d203 1
a203 15
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@@

ip_scan.o: $(TOP)/ip_scan.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_scan.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@@

ip_sync.o: $(TOP)/ip_sync.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_sync.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@@

ip_pool.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_lookup.h $(TOP)/ip_pool.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@@

ip_htable.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_lookup.h $(TOP)/ip_htable.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@@
d205 1
a205 9
ip_lookup.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	$(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@@

ip_trafcon.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
	      $(TOP)/ip_trafcon.h
	$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@@

vnode_if.h: $(VNODESHDIR)/vnode_if.src
d207 1
a207 6
	if [ -f $(VNODESHDIR)/vnode_if.sh ] ; then \
		sh $(VNODESHDIR)/vnode_if.sh $(VNODESHDIR)/vnode_if.src; \
	fi
	if [ -f $(VNODESHDIR)/vnode_if.pl ] ; then \
		perl $(VNODESHDIR)/vnode_if.pl $(VNODESHDIR)/vnode_if.src; \
	fi
d211 1
a211 1
ml_ipl.o: vnode_if.h $(TOP)/$(MLD) $(TOP)/ipl.h
d215 2
a216 11
ip_rules.o: $(TOP)/ip_rules.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/ip_rules.c -o $@@

mlf_rule.o: $(TOP)/mlf_rule.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlf_rule.c -o $@@

mln_rule.o: $(TOP)/mln_rule.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mln_rule.c -o $@@

mlo_rule.o: $(TOP)/mlo_rule.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlo_rule.c -o $@@
d218 2
a219 2
mlfk_rule.o: $(TOP)/mlfk_rule.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlfk_rule.c -o $@@
d221 2
a222 2
$(LKMR): ip_rules.o $(MLR)
	ld -r ip_rules.o $(MLR) -o $(LKMR)
d224 2
a225 2
ipf_y.o: ipf_y.c ipf_y.h $(TOP)/ipf.h ipf_l.h $(TOP)/opts.h
	$(CC) $(CCARGS) $(IPFBPF) -c ipf_y.c -o $@@
d227 2
a228 78
ipf_l.o: ipf_l.c ipf_y.h $(TOP)/ipf.h ipf_l.h $(TOP)/opts.h
	$(CC) $(CCARGS) -I. -c ipf_l.c -o $@@

ipf_y.h ipf_y.c: $(TOOL)/ipf_y.y $(TOP)/ipf.h $(TOP)/opts.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipf_l.c: $(TOOL)/lexer.c $(TOP)/ipf.h $(TOP)/opts.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipf_l.h: $(TOOL)/lexer.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipmon: $(IPMON) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(IPMON) -o $@@ $(LIBS) -ll

ipmon.o: $(TOOL)/ipmon.c $(TOP)/ipmon.h
	$(CC) $(CCARGS) $(LOGFAC) -c $(TOOL)/ipmon.c -o $@@

ipmon_y.o: ipmon_y.c ipmon_y.h $(TOP)/ipmon.h ipmon_l.h
	$(CC) $(CCARGS) -c ipmon_y.c -o $@@

ipmon_l.o: ipmon_l.c ipmon_y.h $(TOP)/ipmon.h
	$(CC) $(CCARGS) -I. -c ipmon_l.c -o $@@

ipmon_y.h ipmon_y.c: $(TOOL)/ipmon_y.y $(TOP)/ipmon.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipmon_l.c: $(TOOL)/lexer.c $(TOP)/ipmon.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipmon_l.h: $(TOOL)/lexer.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipscan: ipscan_y.o ipscan_l.o
	$(CC) $(DEBUG) ipscan_y.o ipscan_l.o -o $@@ -ll $(LIBS) -lkvm

ipscan_y.o: ipscan_y.c ipscan_y.h $(TOP)/ip_scan.h ipscan_l.h
	$(CC) $(CCARGS) -c ipscan_y.c -o $@@

ipscan_l.o: ipscan_l.c ipscan_y.h $(TOP)/ip_scan.h
	$(CC) $(CCARGS) -I. -c ipscan_l.c -o $@@

ipscan_y.h ipscan_y.c: $(TOOL)/ipscan_y.y $(TOP)/ip_scan.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ipscan_l.c ipscan_l.h: $(TOOL)/lexer.c $(TOP)/ip_scan.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ippool: $(IPPOOL) $(OBJ)/libipf.a
	$(CC) $(DEBUG) -I. $(CFLAGS) $(IPPOOL) -o $@@ -ll -lkvm -L. -lipf

ippool.o: $(TOOL)/ippool.c $(TOP)/ip_pool.h
	$(CC) $(CCARGS) -c $(TOOL)/ippool.c -o $@@

ippool_y.o: ippool_y.c ippool_y.h $(TOP)/ip_pool.h ippool_l.h
	$(CC) $(CCARGS) -c ippool_y.c -o $@@

ippool_l.o: ippool_l.c ippool_y.h $(TOP)/ip_pool.h
	$(CC) $(CCARGS) -I. -c ippool_l.c -o $@@

ippool_y.h ippool_y.c: $(TOOL)/ippool_y.y $(TOP)/ip_pool.h ippool_l.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ippool_l.c: $(TOOL)/lexer.c $(TOP)/ip_pool.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

ippool_l.h: $(TOOL)/lexer.h
	(cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@@)

iptrafcon.o: $(TOP)/iptrafcon.c
	$(CC) $(CCARGS) -c $< -o $@@

iptrafcon: $(IPTRAFCON) $(OBJ)/libipf.a
	$(CC) $(CCARGS) $(IPTRAFCON) -o $@@ $(LIBS)

.y.c:

.l.c:
d231 4
a234 11
	${RM} -f ../ipf ../ipnat ../ipmon ../ippool ../ipftest 
	${RM} -f ../ipscan ../ipsyncm ../ipsyncs
	${RM} -f *.core *.o *.a ipt ipfstat ipf ipfstat ipftest ipmon
	${RM} -f if_ipl ipnat ipfrule.ko* ipf.kld*
	${RM} -f vnode_if.h $(LKM) ioconf.h *.ko setdef1.c setdef0.c setdefs.h
	${RM} -f ip_fil.c ipf_l.c ipf_y.c ipf_y.h ipf_l.h
	${RM} -f ipscan ipscan_y.c ipscan_y.h ipscan_l.c ipscan_l.h
	${RM} -f ippool ippool_y.c ippool_y.h ippool_l.c ippool_l.h
	${RM} -f ipnat_y.c ipnat_y.h ipnat_l.c ipnat_l.h
	${RM} -f ipmon_y.c ipmon_y.h ipmon_l.c ipmon_l.h
	${RM} -f ipsyncm ipsyncs ipfs
d239 1
a239 1
			cd $${i}; (make TOP=../.. clean); cd ..; \
d249 1
a249 1
		$(CHMOD) 444 /usr/include/netinet/$$i; \
a256 5
	-if [ -d /boot/kernel -a -f ipf.ko ] ; then \
		cp ipf.ko /boot/kernel; \
	fi
	-$(INSTALL) -cs -g wheel -m 755 -o root ipscan $(SBINDEST)
	(cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP))
a257 1
	    ippool:$(BINDEST) ipsyncm:$(BINDEST) ipsyncs:$(BINDEST) \
a260 1
		dd=; \
d265 1
a265 1
				dd=XXX; \
@


1.1.1.10
log
@Import IPFilter 4.1.3
@
text
@d18 1
a18 1
INC=-I/usr/include -I/sys -I/sys/sys -I/sys/arch
d48 1
a48 1
IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o
d122 1
a122 1
	    $(TOP)/opts.h $(TOP)/ip_rules.h
d125 2
a126 4
fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ipl.h \
	    $(TOP)/ip_rules.h
	$(CC) $(CCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \
	    -c $(TOP)/fil.c -o $@@
d148 1
a148 1
ipnat_y.c: $(TOOL)/ipnat_y.y
a150 2
ipnat_y.h: ipnat_y.c

d179 1
a179 1
ip_rules_u.o: ip_rules.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
d181 1
a181 1
	$(CC) $(CCARGS) $(EXTRA) -c ip_rules.c -o $@@
a222 9
ipfrule.ko.5: ip_rulesx.o $(MLR)
	ld -warn-common -r -d -o $(.TARGET:S/.ko/.kld/) ip_rulesx.o $(MLR)
	ld -Bshareable -d -warn-common -o $(LKMR:S/.5$//) $(.TARGET:S/.ko/.kld/) 
ipfrule.ko: ip_rulesx.o $(MLR)
	gensetdefs ip_rulesx.o $(MLR)
	$(CC) $(CCARGS) -c setdef0.c
	$(CC) $(CCARGS) -c setdef1.c
	ld -Bshareable -o $@@ setdef0.o ip_rulesx.o $(MLR) setdef1.o

d231 1
a231 1
	ld -Bshareable -o $@@ setdef0.o $(MODOBJS) setdef1.o
d298 2
a299 15
ip_rules.o: ip_rules.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) $(COMPIPF) -c ip_rules.c -o $@@

ip_rules.c: $(TOP)/rules/ip_rules $(TOP)/tools/ipfcomp.c ipf
	./ipf -cc -nf $(TOP)/rules/ip_rules

$(TOP)/ip_rules.h: ip_rules.c
	if [ ! -f $(TOP)/ip_rules.h ] ; then \
		/bin/mv -f ip_rules.h $(TOP); \
	else \
		touch $(TOP)/ip_rules.h; \
	fi

ip_rulesx.o: ip_rules.c $(TOP)/ip_rules.h
	$(CC) -I. $(CFLAGS) $(DFLAGS) -DIPFILTER_COMPILED -c ip_rules.c -o $@@
d313 3
d322 1
a322 1
ipf_y.c: $(TOOL)/ipf_y.y $(TOP)/ipf.h $(TOP)/opts.h
a324 2
ipf_y.h: ipf_y.c

d343 1
a343 1
ipmon_y.c: $(TOOL)/ipmon_y.y $(TOP)/ipmon.h
a345 2
ipmon_y.h: ipmon_y.c

d361 1
a361 1
ipscan_y.c: $(TOOL)/ipscan_y.y $(TOP)/ip_scan.h
a363 2
ipscan_y.h: ipscan_y.c

d379 1
a379 1
ippool_y.c: $(TOOL)/ippool_y.y $(TOP)/ip_pool.h ippool_l.h
a381 2
ippool_y.h: ippool_y.c

d409 1
a409 1
	${RM} -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h
a431 3
	-if [ -d /modules -a -f ipfrule.ko ] ; then \
		cp ipfrule.ko /modules; \
	fi
a434 6
	-if [ -d /boot/kernel -a -f ipfrule.ko ] ; then \
		cp ipfrule.ko /boot/kernel; \
	fi
	-if [ -d /usr/lkm -a -f if_ipl.o ] ; then \
		cp if_ipl.o /usr/lkm; \
	fi
@


1.1.1.11
log
@Import IPFilter 4.1.5
@
text
@d77 2
a78 2
build all: machine $(OBJ)/libipf.a ipf ipfs ipfstat ipftest ipmon ipnat \
	   ippool ipscan ipsyncm ipsyncs $(LKM) $(LKMR)
a80 11
machine: Makefile.kmod
	if [ -f Makefile.kmod ] ; then \
		make -f Makefile.kmod depend MKUPDATE=no; \
	fi

Makefile.kmod:
	if [ -f /usr/share/mk/bsd.kmod.mk -a "`uname -s`" = "NetBSD" ] ; then \
		rm -f Makefile.kmod; \
		ln -s /usr/share/mk/bsd.kmod.mk Makefile.kmod; \
	fi

a442 3
	if [ -f Makefile.kmod ] ; then \
		${MAKE} -f Makefile.kmod ${MFLAGS} clean; \
	fi
d446 1
a446 2
			/bin/rm -f $${i}/Makefile $${i}/Makefile.ipsend; \
			/bin/rm -f $${i}/Makefile.kmod; \
@


1.1.1.12
log
@Import IPFilter 4.1.6
@
text
@d63 1
a63 1
	  $(TOP)/ip_rpcb_pxy.c $(TOP)/ip_pptp_pxy.c
@


1.1.1.13
log
@Import IPFilter 4.1.13
@
text
@a5 1
TOP=../..
d11 1
a11 2
CC=gcc -Wall -Wuninitialized -Wstrict-prototypes -O -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Werror
#UFLAGS=-fprofile-arcs -ftest-coverage
d19 1
a19 1
DEF=-D$(CPU) -D__$(CPU)__ -DINET -DKERNEL -D_KERNEL $(INC) $(DEVFS) -fno-builtin
d48 1
a48 1
IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter_u.o
d69 1
a69 2
CCARGS=-I. $(DEBUG) $(CFLAGS) $(UFLAGS)
KCARGS=-I. $(DEBUG) $(CFLAGS)
a79 3
	-/bin/rm -f ../tools ./tools
	-ln -s ../tools .
	-ln -s ../tools ..
d138 1
a138 1
	$(CC) $(KCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \
d243 2
a244 2
	$(CC) $(KCARGS) -c setdef0.c
	$(CC) $(KCARGS) -c setdef1.c
d253 2
a254 2
	$(CC) $(KCARGS) -c setdef0.c
	$(CC) $(KCARGS) -c setdef1.c
d258 1
a258 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@@
d261 1
a261 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@@
d265 1
a265 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@@
d269 1
a269 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@@
d273 1
a273 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@@
d280 1
a280 1
	$(CC) $(KCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@@
d283 1
a283 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@@
d286 1
a286 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@@
d289 1
a289 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@@
d293 1
a293 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@@
d297 1
a297 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@@
d301 1
a301 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@@
d305 1
a305 1
	$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@@
a451 1
	${RM} -f *.da *.gcov *.bb *.bbg tools
a510 7

coverage:
	ksh -c 'for i in *.da; do j=$${i%%.da}.c; gcov $$j 2>&1 | egrep -v "y.tab.c|Could|Creating|_l\.c|\.h"; done'  | sort -k 1n -k 3n > report
	sort -k 1n -k 3n report | perl -e 'while(<>) { next if (/^0.00/); s/\%//g; @@F=split;$$lc+=$$F[2];$$t += ($$F[0]/100)*$$F[2];}  printf "%d of %d = %d%%\n", $$t, $$lc,($$t/$$lc)*100;' >> report

clean-coverage:
	/bin/rm -f *.gcov *.da
@


1.1.1.14
log
@Import IPFilter 4.1.19
@
text
@a516 3
	if [ -d /etc/rc.d ] ; then \
		$(INSTALL) -c -g wheel -m 755 -o root ../ipfadm-rcd $(SBINDEST)/ipfadm; \
	fi
@


1.1.1.15
log
@Import IPFilter 4.1.22
@
text
@a86 5
bpf.h:
	echo '#define DEV_BPF 1' > bpf.h

$(TOP)/ip_compat.h: bpf.h

d140 1
a140 1
	$(CC) $(CCARGS) $(EXTRA) $(IPFBPF) -c $(TOP)/fil.c -o $@@
d450 1
a450 1
	${RM} -f if_ipl ipnat ipfrule.ko* ipf.kld* ipfrule.kld*
d457 1
a457 1
	${RM} -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h bpf.h
@


1.1.1.16
log
@Import IPFilter 4.1.29 to the vendor branch
@
text
@d488 1
a488 5
		if [ -f /modules/ipl.ko ] ; then \
			cp ipf.ko /modules/ipl.ko; \
		else \
			cp ipf.ko /modules; \
		fi \
d494 1
a494 5
		if [ -f /boot/kernel/ipl.ko ] ; then \
			cp ipf.ko /boot/kernel/ipl.ko; \
		else \
			cp ipf.ko /boot/kernel; \
		fi \
@


