Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed a coding style to "bsd" (described in IMPLEMENTATION,
chapter 8). - Does not depend on interface. 'interface' directive was removed in configuration rule, and no inbound/outbound distinction in each rule. - Changed a syntax of configuration command (natptconfig) related to the item mentioned above. The syntax does not change greatly, it became simpler. - Use TAILQ (defined in /usr/include/sys/queue.h) instead of my original list handle routines.
- Loading branch information
fujisawa
committed
Sep 2, 2001
1 parent
49105ae
commit 87b08f2
Showing
12 changed files
with
1,050 additions
and
1,619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,74 @@ | ||
# Copyright (c) 1996 WIDE Project. All rights reserved. | ||
# $KAME: Makefile,v 1.5 2001/09/02 19:32:27 fujisawa Exp $ | ||
|
||
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 and 2001 WIDE Project. | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modifications, are permitted provided that the above copyright notice | ||
# and this paragraph are duplicated in all such forms and that any | ||
# documentation, advertising materials, and other materials related to | ||
# such distribution and use acknowledge that the software was developed | ||
# by the WIDE Project, Japan. The name of the Project may not be used to | ||
# endorse or promote products derived from this software without | ||
# specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' | ||
# AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT | ||
# LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE. | ||
# 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. | ||
|
||
.if exists(${.CURDIR}/../Makefile.opsys) | ||
.include "${.CURDIR}/../Makefile.opsys" | ||
.endif | ||
|
||
.PATH: ${.CURDIR}/../../sys/ | ||
|
||
BINDIR= ${PREFIX}/sbin | ||
PROG= natptconfig | ||
SRCS= main.c natptconfig.y.c natptconfig.l.c misc.c show.c showsubs.c yylex.c | ||
CLEANFILES+= natptconfig.y.c natptconfig.l.c natptconfig.y.h y.output y.tab.c y.tab.h | ||
LDADD+=-ly -ll | ||
SRCS = main.c misc.c show.c showsubs.c yylex.c | ||
SRCS+= cfparse.y cftoken.l | ||
YACC= yacc -tv | ||
|
||
.if (${OPSYS} != "NetBSD") | ||
CFLAGS+= -Wall | ||
.if (${OPSYS} == "NetBSD") | ||
YFLAGS+=-d | ||
.endif | ||
|
||
CFLAGS+= -g -I${.CURDIR}/../../sys/ -DYYDEBUG -DNATPT -DNATPTCONFIG -DreadKMEM | ||
|
||
LDADD+= -L${.CURDIR}/../libinet6 -L${.CURDIR}/../libinet6/obj \ | ||
-L/usr/local/v6/lib -linet6 -lkvm -ly -ll | ||
DPADD+= ${.CURDIR}/../libinet6/libinet6.a \ | ||
${.CURDIR}/../libinet6/obj/libinet6.a \ | ||
/usr/local/v6/lib/libinet6.a | ||
|
||
CC=gcc | ||
.if (${OPSYS} != "NetBSD") | ||
CFLAGS+=-g -Wall -DYYDEBUG | ||
.else | ||
CPPFLAGS+=-g | ||
.endif | ||
.if (${OPSYS} != "NetBSD") | ||
MAN1= | ||
MAN8= natptconfig.8 | ||
.else | ||
MAN= natptconfig.8 | ||
YFLAGS+= -d | ||
.endif | ||
|
||
main.o: main.c natptconfig.y.h | ||
misc.o: misc.c natptconfig.y.h | ||
yylex.o: yylex.c natptconfig.y.h | ||
|
||
natptconfig.y.c \ | ||
natptconfig.y.h: natptconfig.y showvar.h | ||
$(YACC) ${YFLAGS} natptconfig.y | ||
mv y.tab.c natptconfig.y.c | ||
mv y.tab.h natptconfig.y.h | ||
|
||
natptconfig.l.c: natptconfig.l | ||
$(LEX) -t -L natptconfig.l > natptconfig.l.c | ||
.if exists(/usr/local/v6/lib/libinet6.a) | ||
LDADD+= -L${.OBJDIR}/../libinet6 -L${.OBJDIR}/../libinet6/obj \ | ||
-L/usr/local/v6/lib -linet6 -lkvm | ||
DPADD+= ${.OBJDIR}/../libinet6/libinet6.a \ | ||
${.OBJDIR}/../libinet6/obj/libinet6.a \ | ||
/usr/local/v6/lib/libinet6.a | ||
.endif | ||
|
||
etags: | ||
etags *.[chly] ../../sys/netinet6/*.[ch] | ||
tag: | ||
etags *.[chly] /usr/include/netinet6/natpt_*.h | ||
|
||
clean: | ||
-rm -f $(PROG) *.o *.core | ||
-rm -f cfparse.[ch] cfparse.output cftoken.c | ||
-rm -f natptconfig.8.gz | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.