1 # $NetBSD: Makefile,v 1.2 2009/12/23 20:28:29 cegger Exp $
9 elf_end.c elf_errmsg.c elf_errno.c \
11 elf_fill.c elf_flag.c \
12 elf_getarhdr.c elf_getarsym.c elf_getbase.c \
18 elf_rand.c elf_rawfile.c \
20 elf_shnum.c elf_shstrndx.c elf_scn.c elf_strptr.c \
31 gelf_rel.c gelf_rela.c \
32 gelf_shdr.c gelf_sym.c gelf_syminfo.c gelf_symshndx.c \
35 libelf_align.c libelf_allocate.c libelf_ar.c \
38 libelf_ehdr.c libelf_extended.c \
44 LIBELF_GENSRCS
= libelf_fsize.c libelf_msize.c libelf_convert.c
46 LIBELF_DIR
= ${.CURDIR
}/..
/..
/external
/bsd
/libelf
/dist
48 CLEANFILES
+= ${LIBELF_GENSRCS}
49 CPPFLAGS
+= -I
${.CURDIR
}/..
/compat
-I
${LIBELF_DIR}
50 CPPFLAGS
+= -I
${TOOLDIR}/include/nbinclude
52 CPPFLAGS
+= -DLIBELF_TEST_HOOKS
54 libelf_convert.c
: elf_types.m4 libelf_convert.m4
55 libelf_fsize.c
: elf_types.m4 libelf_fsize.m4
56 libelf_msize.c
: elf_types.m4 libelf_msize.m4
58 BUILD_OSTYPE
!= uname
-s
60 # Disable use of pre-compiled headers on Darwin.
61 .if
${BUILD_OSTYPE} == "Darwin"
62 CPPFLAGS
+= -no-cpp-precomp
65 # -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
66 # other file ops, on many systems, without changing function names.
68 CPPFLAGS
+= -DHAVE_NBTOOL_CONFIG_H
=1 -D_FILE_OFFSET_BITS
=64
70 COMPATOBJ
!= cd
${.CURDIR
}/..
/compat
&& ${PRINTOBJDIR}
71 CPPFLAGS
+= -I
${COMPATOBJ}
76 HOST_CPPFLAGS
:= ${CPPFLAGS}
79 .
include "${.CURDIR}/../Makefile.disklabel"
80 .
include <bsd.hostlib.mk
>
82 # Keep the .SUFFIXES line after the include of bsd.hostlib.mk
83 M4OBJDIR
!= cd
${.CURDIR
}/..
/m4
&& ${PRINTOBJDIR}
86 ${M4OBJDIR}/m4
-D SRCDIR
=${LIBELF_DIR} ${.IMPSRC
} > ${.TARGET
}