2002-09-22 10:22:50 +04:00
|
|
|
# $NetBSD: Makefile.boot,v 1.5 2002/09/22 06:22:50 dbj Exp $
|
1996-11-08 01:59:39 +03:00
|
|
|
# from: @(#)Makefile 8.2 (Berkeley) 4/19/94
|
|
|
|
#
|
|
|
|
# a very simple makefile...
|
|
|
|
#
|
|
|
|
# You only want to use this if you aren't running NetBSD.
|
|
|
|
#
|
|
|
|
CC=gcc -O
|
|
|
|
CFLAGS= -I. -DMAKE_BOOTSTRAP
|
|
|
|
|
|
|
|
# Uncomment this if your system does not have strtoul (i.e. SunOS)
|
1999-04-02 10:36:30 +04:00
|
|
|
# STRTOUL= -Dstrtoul=strtol
|
1996-11-08 01:59:39 +03:00
|
|
|
|
|
|
|
# Note: The scanner here uses features specific to "flex" so
|
|
|
|
# do not bother even trying to make lex build the scanner.
|
|
|
|
# If you do not have flex, the source can be found in:
|
|
|
|
# src/usr.bin/lex (See Makefile.boot)
|
|
|
|
LEX=flex -l
|
|
|
|
|
|
|
|
YACC=yacc
|
|
|
|
|
2002-09-22 10:22:50 +04:00
|
|
|
OBJS= files.o hash.o main.o mkdevsw.o mkheaders.o mkioconf.o \
|
|
|
|
mkmakefile.o mkswap.o pack.o sem.o util.o \
|
|
|
|
gram.o lex.yy.o strerror.o
|
1996-11-08 01:59:39 +03:00
|
|
|
|
|
|
|
config: ${OBJS}
|
|
|
|
${CC} -o $@ ${OBJS}
|
|
|
|
|
1999-04-02 10:36:30 +04:00
|
|
|
gram.o : gram.c
|
|
|
|
${CC} ${CFLAGS} -c gram.c
|
1996-11-08 01:59:39 +03:00
|
|
|
|
1999-04-02 10:36:30 +04:00
|
|
|
gram.c gram.h : gram.y
|
1996-11-08 01:59:39 +03:00
|
|
|
${YACC} -d gram.y
|
1999-04-02 10:36:30 +04:00
|
|
|
-mv -f y.tab.c gram.c
|
|
|
|
-mv -f y.tab.h gram.h
|
1996-11-08 01:59:39 +03:00
|
|
|
|
1999-04-02 10:36:30 +04:00
|
|
|
lex.yy.o : lex.yy.c gram.h
|
1996-11-08 01:59:39 +03:00
|
|
|
${CC} ${CFLAGS} ${STRTOUL} -c lex.yy.c
|
|
|
|
|
|
|
|
lex.yy.c : scan.l
|
|
|
|
${LEX} scan.l
|
|
|
|
|
2002-01-29 13:20:28 +03:00
|
|
|
${OBJS} : defs.h
|
1996-11-08 01:59:39 +03:00
|
|
|
|
|
|
|
y.tab.o mkmakefile.o mkswap.o sem.o : sem.h
|
1999-04-02 10:36:30 +04:00
|
|
|
lex.yy.o : gram.h
|
1996-11-08 01:59:39 +03:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CFLAGS} -c $<
|
|
|
|
|
|
|
|
clean:
|
1999-08-19 06:27:02 +04:00
|
|
|
rm -f *.o config lex.yy.c y.tab.[ch] gram.[ch]
|
1996-11-08 01:59:39 +03:00
|
|
|
|