summaryrefslogtreecommitdiff
path: root/usr.sbin/config/Makefile.boot
blob: 3f7830db8db9aeadba7d0625879b0136e14e6838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#	$NetBSD: Makefile.boot,v 1.1 1996/11/07 22:59:39 gwr Exp $
#	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)
STRTOUL= -Dstrtoul=strtol

# 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

OBJS=	files.o hash.o main.o mkheaders.o mkioconf.o mkmakefile.o \
	mkswap.o pack.o sem.o util.o y.tab.o lex.yy.o strerror.o

config: ${OBJS}
	${CC} -o $@ ${OBJS}

y.tab.o : y.tab.c
	${CC} ${CFLAGS} -c y.tab.c

y.tab.c y.tab.h : gram.y
	${YACC} -d gram.y

lex.yy.o : lex.yy.c
	${CC} ${CFLAGS} ${STRTOUL} -c lex.yy.c

lex.yy.c : scan.l
	${LEX} scan.l

${OBJS} : config.h

y.tab.o mkmakefile.o mkswap.o sem.o : sem.h
lex.yy.o : y.tab.h

.c.o:
	${CC} ${CFLAGS} -c $<

clean:
	rm -f *.o config lex.yy.c y.tab.[ch]