summaryrefslogtreecommitdiff
path: root/usr.sbin/config/Makefile.boot
blob: 62fb2bb2ab25eacdc950f21fcd3787c328b86a8e (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
#	$OpenBSD: Makefile.boot,v 1.2 1997/09/21 11:43:32 deraadt Exp $
#
# 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]