1 # $NetBSD: Makefile,v 1.3 2011/04/17 12:52:26 tron Exp $ 2 3 HOSTLIB= ctf 4 5 .include <bsd.own.mk> 6 7 SRCS= ctf_create.c \ 8 ctf_decl.c \ 9 ctf_error.c \ 10 ctf_hash.c \ 11 ctf_labels.c \ 12 ctf_lib.c \ 13 ctf_lookup.c \ 14 ctf_open.c \ 15 ctf_subr.c \ 16 ctf_types.c \ 17 ctf_util.c 18 19 OSNETDIR= ${.CURDIR}/../../external/cddl/osnet 20 OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist 21 LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist 22 23 CPPFLAGS+= -DCTF_OLD_VERSIONS 24 25 .ifndef NOCOMPATLIB 26 COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR} 27 CPPFLAGS+= -I${COMPATOBJ} 28 .endif 29 30 CPPFLAGS+= -I${.CURDIR}/../compat \ 31 -I${OSNETDIR}/sys \ 32 -I${OSNETDIR}/include \ 33 -I${OPENSOLARIS_DISTDIR}/head \ 34 -I${OPENSOLARIS_DISTDIR}/common/ctf \ 35 -I${OPENSOLARIS_DISTDIR}/lib/libctf/common \ 36 -I${OPENSOLARIS_DISTDIR}/uts/common \ 37 -I${LIBELF_DIR} 38 39 BUILD_OSTYPE!= uname -s 40 41 # Disable use of pre-compiled headers on Darwin. 42 .if ${BUILD_OSTYPE} == "Darwin" 43 CPPFLAGS+= -no-cpp-precomp 44 .endif 45 46 # -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and 47 # other file ops, on many systems, without changing function names. 48 49 CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 50 51 .PATH: ${OPENSOLARIS_DISTDIR}/common/ctf 52 .PATH: ${OPENSOLARIS_DISTDIR}/lib/libctf/common 53 54 HOST_CPPFLAGS:= ${CPPFLAGS} 55 CPPFLAGS:= # empty 56 57 realinstall: install.host 58 install.host: ${TOOLDIR}/lib/libctf.a 59 ${TOOLDIR}/lib/libctf.a:: libctf.a 60 ${_MKTARGET_INSTALL} 61 mkdir -p ${TOOLDIR}/lib 62 ${HOST_INSTALL_FILE} -m ${BINMODE} libctf.a ${.TARGET} 63 64 .include "${.CURDIR}/../Makefile.nbincludes" 65 .include <bsd.hostlib.mk> 66