2011-04-17 16:52:26 +04:00
|
|
|
# $NetBSD: Makefile,v 1.3 2011/04/17 12:52:26 tron Exp $
|
2010-02-25 00:34:57 +03:00
|
|
|
|
|
|
|
HOSTLIB= ctf
|
|
|
|
|
2011-04-17 16:52:26 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2010-02-25 00:34:57 +03:00
|
|
|
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}
|
|
|
|
|
2010-06-20 03:11:10 +04:00
|
|
|
.include "${.CURDIR}/../Makefile.nbincludes"
|
2010-02-25 00:34:57 +03:00
|
|
|
.include <bsd.hostlib.mk>
|