1 # $NetBSD: bsd.hostlib.mk,v 1.16 2011/09/10 16:57:35 apb Exp $
10 HOST_MKDEP?
= CC
=${HOST_CC
:Q
} mkdep
11 MKDEP_SUFFIXES?
= .o .lo
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