blob: 09319cce9c722e9809c7d2aed661c688e54bb463 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# $NetBSD: Darwin.bsd.sys.mk,v 1.1 2004/11/27 14:42:28 grant Exp $
#OBJCOPY?= objcopy
STRIP?= strip
CONFIG?= config
RPCGEN?= rpcgen
MKLOCALE?= mklocale
.SUFFIXES: .m .o .ln .lo
# Objective C
# (Defined here rather than in <sys.mk> because `.m' is not just
# used for Objective C source)
.m:
${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.m.o:
${COMPILE.m} ${.IMPSRC}
.if defined(PARALLEL) || defined(LPREFIX)
LPREFIX?=yy
LFLAGS+=-P${LPREFIX}
# Lex
.l:
${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
${LINK.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll
rm -f ${.TARGET:R}.${LPREFIX}.c
.l.c:
${LEX.l} -o${.TARGET} ${.IMPSRC}
.l.o:
${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
rm -f ${.TARGET:R}.${LPREFIX}.c
.endif
# Yacc
.if defined(YHEADER) || defined(YPREFIX)
.if defined(YPREFIX)
YFLAGS+=-p${YPREFIX}
.endif
.if defined(YHEADER)
YFLAGS+=-d
.endif
.y:
${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
rm -f ${.TARGET:R}.tab.c ${.TARGET:R}.tab.h
.y.h: ${.TARGET:R}.c
.y.c:
${YACC.y} -o ${.TARGET} ${.IMPSRC}
.y.o:
${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
.elif defined(PARALLEL)
.y:
${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
rm -f ${.TARGET:R}.tab.c
.y.c:
${YACC.y} -o ${.TARGET} ${.IMPSRC}
.y.o:
${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
rm -f ${.TARGET:R}.tab.c
.endif
|