minix/share/mk/bsd.hostlib.mk
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

59 lines
1.2 KiB
Makefile

# $NetBSD: bsd.hostlib.mk,v 1.17 2013/10/29 16:11:46 joerg Exp $
.include <bsd.init.mk>
.include <bsd.sys.mk>
##### Basic targets
##### Default values
CFLAGS+= ${COPTS}
HOST_MKDEP?= CC=${HOST_CC:Q} mkdep
HOST_MKDEPCXX?= CC=${HOST_CXX:Q} mkdep
MKDEP_SUFFIXES?= .o .lo
# Override these:
MKDEP:= ${HOST_MKDEP}
MKDEPCXX:= ${HOST_MKDEPCXX}
.if ${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)
OBJHOSTMACHINE= # set
.endif
##### Build rules
.if defined(HOSTLIB)
_YHLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
DPSRCS+= ${_YHLSRCS}
CLEANFILES+= ${_YHLSRCS}
.endif # defined(HOSTLIB)
.if !empty(SRCS:N*.h:N*.sh)
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.lo/g}
.endif
.if defined(OBJS) && !empty(OBJS)
.NOPATH: lib${HOSTLIB}.a ${OBJS} ${_YHLSRCS}
${OBJS}: ${DPSRCS}
lib${HOSTLIB}.a: ${OBJS} ${DPADD}
${_MKTARGET_BUILD}
rm -f ${.TARGET}
${HOST_AR} cq ${.TARGET} ${OBJS}
${HOST_RANLIB} ${.TARGET}
.endif # defined(OBJS) && !empty(OBJS)
realall: lib${HOSTLIB}.a
CLEANFILES+= a.out [Ee]rrs mklog core *.core lib${HOSTLIB}.a ${OBJS}
beforedepend:
CFLAGS:= ${HOST_CFLAGS}
CPPFLAGS:= ${HOST_CPPFLAGS}
##### Pull in related .mk logic
.include <bsd.obj.mk>
.include <bsd.dep.mk>
.include <bsd.clean.mk>
${TARGETS}: # ensure existence