1 # $NetBSD: bsd.hostlib.mk,v 1.13 2004/01/29 01:48:45 lukem Exp $
11 HOST_MKDEP?
= CC
=${HOST_CC
:Q
} mkdep
12 MKDEP_SUFFIXES?
= .o .lo
17 .if
${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
)
23 _YHLSRCS
= ${SRCS
:M
*.
[ly
]:C
/\..
$/.c
/} ${YHEADER
:D
${SRCS
:M
*.y
:.y
=.h
}}
25 CLEANFILES
+= ${_YHLSRCS}
26 .
endif # defined(HOSTLIB)
28 .if
!empty
(SRCS
:N
*.h
:N
*.sh
)
29 OBJS
+= ${SRCS
:N
*.h
:N
*.sh
:R
:S
/$/.lo
/g
}
32 .if defined
(OBJS
) && !empty
(OBJS
)
33 .NOPATH
: ${OBJS} ${HOSTPROG} ${_YHLSRCS}
37 lib
${HOSTLIB}.a
: ${OBJS} ${DPADD}
40 ${HOST_AR} cq
${.TARGET
} ${OBJS}
41 ${HOST_RANLIB} ${.TARGET
}
43 .
endif # defined(OBJS) && !empty(OBJS)
45 realall
: lib
${HOSTLIB}.a
48 rm -f a.out
[Ee
]rrs mklog core
*.core \
49 lib
${HOSTLIB}.a
${OBJS} ${CLEANFILES}
52 CFLAGS
:= ${HOST_CFLAGS}
53 CPPFLAGS
:= ${HOST_CPPFLAGS}
55 ##### Pull in related .mk logic
59 ${TARGETS}: # ensure existence