1 # $NetBSD: bsd.hostlib.mk,v 1.19 2014/12/01 01:34:30 erh Exp $
10 MKDEP_SUFFIXES?
= .o .lo .d
14 MKDEPCXX
:= ${HOST_MKDEPCXX}
16 .if
${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
)
22 _YHLSRCS
= ${SRCS
:M
*.
[ly
]:C
/\..
$/.c
/} ${YHEADER
:D
${SRCS
:M
*.y
:.y
=.h
}}
24 CLEANFILES
+= ${_YHLSRCS}
25 .
endif # defined(HOSTLIB)
27 .if
!empty
(SRCS
:N
*.h
:N
*.sh
)
28 OBJS
+= ${SRCS
:N
*.h
:N
*.sh
:R
:S
/$/.lo
/g
}
31 .if defined
(OBJS
) && !empty
(OBJS
)
32 .NOPATH
: lib
${HOSTLIB}.a
${OBJS} ${_YHLSRCS}
36 lib
${HOSTLIB}.a
: ${OBJS} ${DPADD}
39 ${HOST_AR} cq
${.TARGET
} ${OBJS}
40 ${HOST_RANLIB} ${.TARGET
}
42 .
endif # defined(OBJS) && !empty(OBJS)
44 realall
: lib
${HOSTLIB}.a
46 CLEANFILES
+= a.out
[Ee
]rrs mklog core
*.core lib
${HOSTLIB}.a
${OBJS}
49 CFLAGS
:= ${HOST_CFLAGS}
50 CPPFLAGS
:= ${HOST_CPPFLAGS}
52 ##### Pull in related .mk logic
55 .
include <bsd.
clean.mk
>
57 ${TARGETS}: # ensure existence