NetBSD/tools/libctf/Makefile

66 lines
1.5 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.3 2011/04/17 12:52:26 tron Exp $
HOSTLIB= ctf
.include <bsd.own.mk>
SRCS= ctf_create.c \
ctf_decl.c \
ctf_error.c \
ctf_hash.c \
ctf_labels.c \
ctf_lib.c \
ctf_lookup.c \
ctf_open.c \
ctf_subr.c \
ctf_types.c \
ctf_util.c
OSNETDIR= ${.CURDIR}/../../external/cddl/osnet
OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist
LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist
CPPFLAGS+= -DCTF_OLD_VERSIONS
.ifndef NOCOMPATLIB
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
CPPFLAGS+= -I${COMPATOBJ}
.endif
CPPFLAGS+= -I${.CURDIR}/../compat \
-I${OSNETDIR}/sys \
-I${OSNETDIR}/include \
-I${OPENSOLARIS_DISTDIR}/head \
-I${OPENSOLARIS_DISTDIR}/common/ctf \
-I${OPENSOLARIS_DISTDIR}/lib/libctf/common \
-I${OPENSOLARIS_DISTDIR}/uts/common \
-I${LIBELF_DIR}
BUILD_OSTYPE!= uname -s
# Disable use of pre-compiled headers on Darwin.
.if ${BUILD_OSTYPE} == "Darwin"
CPPFLAGS+= -no-cpp-precomp
.endif
# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
# other file ops, on many systems, without changing function names.
CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
.PATH: ${OPENSOLARIS_DISTDIR}/common/ctf
.PATH: ${OPENSOLARIS_DISTDIR}/lib/libctf/common
HOST_CPPFLAGS:= ${CPPFLAGS}
CPPFLAGS:= # empty
realinstall: install.host
install.host: ${TOOLDIR}/lib/libctf.a
${TOOLDIR}/lib/libctf.a:: libctf.a
${_MKTARGET_INSTALL}
mkdir -p ${TOOLDIR}/lib
${HOST_INSTALL_FILE} -m ${BINMODE} libctf.a ${.TARGET}
.include "${.CURDIR}/../Makefile.nbincludes"
.include <bsd.hostlib.mk>