head	1.16;
access;
symbols
	RELENG_8_4:1.16.0.2
	RELENG_9_1_0_RELEASE:1.12.2.1.4.2
	RELENG_9_1:1.12.2.1.0.4
	RELENG_9_1_BP:1.12.2.1
	RELENG_8_3_0_RELEASE:1.6.2.2.4.1
	RELENG_8_3:1.6.2.2.0.4
	RELENG_8_3_BP:1.6.2.2
	RELENG_9_0_0_RELEASE:1.12.2.1.2.1
	RELENG_9_0:1.12.2.1.0.2
	RELENG_9_0_BP:1.12.2.1
	RELENG_9:1.12.0.2
	RELENG_9_BP:1.12
	RELENG_7_4_0_RELEASE:1.5.2.2.2.1
	RELENG_8_2_0_RELEASE:1.6.2.2.2.1
	RELENG_7_4:1.5.2.2.0.2
	RELENG_7_4_BP:1.5.2.2
	RELENG_8_2:1.6.2.2.0.2
	RELENG_8_2_BP:1.6.2.2
	RELENG_8_1_0_RELEASE:1.6.2.1.4.1
	RELENG_8_1:1.6.2.1.0.4
	RELENG_8_1_BP:1.6.2.1
	RELENG_7_3_0_RELEASE:1.5.2.1.4.1
	RELENG_7_3:1.5.2.1.0.4
	RELENG_7_3_BP:1.5.2.1
	RELENG_8_0_0_RELEASE:1.6.2.1.2.1
	RELENG_8_0:1.6.2.1.0.2
	RELENG_8_0_BP:1.6.2.1
	RELENG_8:1.6.0.2
	RELENG_8_BP:1.6
	RELENG_7_2_0_RELEASE:1.5.2.1.2.1
	RELENG_7_2:1.5.2.1.0.2
	RELENG_7_2_BP:1.5.2.1
	RELENG_7_1_0_RELEASE:1.5.6.1
	RELENG_7_1:1.5.0.6
	RELENG_7_1_BP:1.5
	RELENG_7_0_0_RELEASE:1.5
	RELENG_7_0:1.5.0.4
	RELENG_7_0_BP:1.5
	RELENG_7:1.5.0.2
	RELENG_7_BP:1.5;
locks; strict;
comment	@# @;


1.16
date	2012.11.17.01.49.49;	author svnexp;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2012.07.24.16.03.28;	author ache;	state Exp;
branches;
next	1.14;

1.14
date	2012.06.24.09.19.24;	author andrew;	state Exp;
branches;
next	1.13;

1.13
date	2012.06.24.08.43.34;	author andrew;	state Exp;
branches;
next	1.12;

1.12
date	2011.05.07.01.05.31;	author obrien;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2010.08.21.17.29.59;	author rpaulo;	state Exp;
branches;
next	1.10;

1.10
date	2010.08.21.10.40.12;	author rpaulo;	state Exp;
branches;
next	1.9;

1.9
date	2010.07.21.12.54.34;	author kaiw;	state Exp;
branches;
next	1.8;

1.8
date	2010.07.21.12.14.50;	author kaiw;	state Exp;
branches;
next	1.7;

1.7
date	2010.01.02.09.58.07;	author ed;	state Exp;
branches;
next	1.6;

1.6
date	2009.03.12.04.44.09;	author obrien;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2006.12.25.02.22.22;	author jkoshy;	state Exp;
branches
	1.5.2.1
	1.5.6.1;
next	1.4;

1.4
date	2006.12.18.05.40.01;	author jkoshy;	state Exp;
branches;
next	1.3;

1.3
date	2006.11.24.06.38.11;	author ru;	state Exp;
branches;
next	1.2;

1.2
date	2006.11.12.18.43.25;	author jkoshy;	state Exp;
branches;
next	1.1;

1.1
date	2006.11.11.17.16.33;	author jkoshy;	state Exp;
branches;
next	;

1.16.2.1
date	2012.11.17.01.49.49;	author svnexp;	state dead;
branches;
next	1.16.2.2;

1.16.2.2
date	2013.03.28.13.03.14;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.12.2.1.2.1
	1.12.2.1.4.1;
next	1.12.2.2;

1.12.2.2
date	2012.11.17.11.36.23;	author svnexp;	state Exp;
branches;
next	1.12.2.3;

1.12.2.3
date	2014.04.15.17.01.44;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.12.2.1.2.2;

1.12.2.1.2.2
date	2012.11.17.08.36.23;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.12.2.1.4.2;

1.12.2.1.4.2
date	2012.11.17.08.47.13;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.6.2.1.2.1
	1.6.2.1.4.1;
next	1.6.2.2;

1.6.2.2
date	2010.09.04.12.52.44;	author kaiw;	state Exp;
branches
	1.6.2.2.2.1
	1.6.2.2.4.1;
next	1.6.2.3;

1.6.2.3
date	2012.11.17.10.36.07;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.6.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.6.2.2.2.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.6.2.2.4.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.6.2.2.4.2;

1.6.2.2.4.2
date	2012.11.17.08.24.48;	author svnexp;	state Exp;
branches;
next	;

1.5.2.1
date	2009.03.23.23.32.20;	author obrien;	state Exp;
branches
	1.5.2.1.2.1
	1.5.2.1.4.1;
next	1.5.2.2;

1.5.2.2
date	2010.09.04.12.52.51;	author kaiw;	state Exp;
branches
	1.5.2.2.2.1;
next	1.5.2.3;

1.5.2.3
date	2012.11.17.08.02.42;	author svnexp;	state Exp;
branches;
next	;

1.5.2.1.2.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.5.2.1.4.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.5.2.2.2.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.5.2.2.2.2;

1.5.2.2.2.2
date	2012.11.17.08.16.48;	author svnexp;	state Exp;
branches;
next	;

1.5.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;


desc
@@


1.16
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/lib/libelf/Makefile 238741 2012-07-24 16:03:28Z ache $

LIB=	elf

SRCS=	elf_begin.c						\
	elf_cntl.c						\
	elf_end.c elf_errmsg.c elf_errno.c			\
	elf_data.c						\
	elf_fill.c						\
	elf_flag.c						\
	elf_getarhdr.c						\
	elf_getarsym.c						\
	elf_getbase.c						\
	elf_getident.c						\
	elf_hash.c						\
	elf_kind.c						\
	elf_memory.c						\
	elf_next.c						\
	elf_rand.c						\
	elf_rawfile.c						\
	elf_phnum.c						\
	elf_shnum.c						\
	elf_shstrndx.c						\
	elf_scn.c						\
	elf_strptr.c						\
	elf_update.c						\
	elf_version.c						\
	gelf_cap.c						\
	gelf_checksum.c						\
	gelf_dyn.c						\
	gelf_ehdr.c						\
	gelf_getclass.c						\
	gelf_fsize.c						\
	gelf_move.c						\
	gelf_phdr.c						\
	gelf_rel.c						\
	gelf_rela.c						\
	gelf_shdr.c						\
	gelf_sym.c						\
	gelf_syminfo.c						\
	gelf_symshndx.c						\
	gelf_xlate.c						\
	libelf.c						\
	libelf_align.c						\
	libelf_allocate.c					\
	libelf_ar.c						\
	libelf_ar_util.c					\
	libelf_checksum.c					\
	libelf_data.c						\
	libelf_ehdr.c						\
	libelf_extended.c					\
	libelf_phdr.c						\
	libelf_shdr.c						\
	libelf_xlate.c						\
	${GENSRCS}
INCS=	libelf.h gelf.h

#
# We need to link against the correct version of these files. One
# solution is to include ../../sys in the include path. This causes
# problems when a header file in sys depends on a file in another
# part of the tree, e.g. a machine dependent header.
#
SRCS+=	sys/elf32.h sys/elf64.h sys/elf_common.h

GENSRCS=	libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES=	${GENSRCS}
CLEANDIRS=	sys
CFLAGS+=	-I${.CURDIR} -I.

sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
	mkdir -p ${.OBJDIR}/sys
	ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}

SHLIB_MAJOR=	1

MAN=	elf.3							\
	elf_begin.3						\
	elf_cntl.3						\
	elf_end.3						\
	elf_errmsg.3						\
	elf_fill.3						\
	elf_flagdata.3						\
	elf_getarhdr.3						\
	elf_getarsym.3						\
	elf_getbase.3						\
	elf_getdata.3						\
	elf_getident.3						\
	elf_getscn.3						\
	elf_getphdrnum.3					\
	elf_getphnum.3						\
	elf_getshdrnum.3					\
	elf_getshnum.3						\
	elf_getshdrstrndx.3					\
	elf_getshstrndx.3					\
	elf_hash.3						\
	elf_kind.3						\
	elf_memory.3						\
	elf_next.3						\
	elf_rawfile.3						\
	elf_rand.3						\
	elf_strptr.3						\
	elf_update.3						\
	elf_version.3						\
	gelf.3							\
	gelf_checksum.3						\
	gelf_fsize.3						\
	gelf_getcap.3						\
	gelf_getclass.3						\
	gelf_getdyn.3						\
	gelf_getehdr.3						\
	gelf_getmove.3						\
	gelf_getphdr.3						\
	gelf_getrel.3						\
	gelf_getrela.3						\
	gelf_getshdr.3						\
	gelf_getsym.3						\
	gelf_getsyminfo.3					\
	gelf_getsymshndx.3					\
	gelf_newehdr.3						\
	gelf_newphdr.3						\
	gelf_update_ehdr.3					\
	gelf_xlatetof.3

MLINKS+= \
	elf_errmsg.3 elf_errno.3		\
	elf_flagdata.3 elf_flagehdr.3		\
	elf_flagdata.3 elf_flagelf.3		\
	elf_flagdata.3 elf_flagphdr.3		\
	elf_flagdata.3 elf_flagscn.3		\
	elf_flagdata.3 elf_flagshdr.3		\
	elf_getdata.3 elf_newdata.3		\
	elf_getdata.3 elf_rawdata.3		\
	elf_getscn.3 elf_ndxscn.3		\
	elf_getscn.3 elf_newscn.3		\
	elf_getscn.3 elf_nextscn.3		\
	elf_getshstrndx.3 elf_setshstrndx.3	\
	gelf_getcap.3 gelf_update_cap.3		\
	gelf_getdyn.3 gelf_update_dyn.3		\
	gelf_getmove.3 gelf_update_move.3	\
	gelf_getrel.3 gelf_update_rel.3		\
	gelf_getrela.3 gelf_update_rela.3	\
	gelf_getsym.3 gelf_update_sym.3		\
	gelf_getsyminfo.3 gelf_update_syminfo.3	\
	gelf_getsymshndx.3 gelf_update_symshndx.3 \
	gelf_update_ehdr.3 gelf_update_phdr.3	\
	gelf_update_ehdr.3 gelf_update_shdr.3	\
	gelf_xlatetof.3 gelf_xlatetom.3

.for E in 32 64
MLINKS+= \
	gelf_checksum.3	elf${E}_checksum.3 	\
	gelf_fsize.3	elf${E}_fsize.3 	\
	gelf_getehdr.3	elf${E}_getehdr.3	\
	gelf_getphdr.3	elf${E}_getphdr.3	\
	gelf_getshdr.3	elf${E}_getshdr.3	\
	gelf_newehdr.3	elf${E}_newehdr.3	\
	gelf_newphdr.3	elf${E}_newphdr.3	\
	gelf_xlatetof.3	elf${E}_xlatetof.3	\
	gelf_xlatetof.3	elf${E}_xlatetom.3
.endfor

VERSION_MAP=		${.CURDIR}/Version.map

LIBELF_TEST_HOOKS?=	1
.if defined(LIBELF_TEST_HOOKS) && (${LIBELF_TEST_HOOKS} > 0)
CFLAGS+= -DLIBELF_TEST_HOOKS
.endif

libelf_convert.c:	elf_types.m4 libelf_convert.m4
libelf_fsize.c:		elf_types.m4 libelf_fsize.m4
libelf_msize.c:		elf_types.m4 libelf_msize.m4

.include <bsd.lib.mk>

# Keep the .SUFFIXES line after the include of bsd.lib.mk
.SUFFIXES:	.m4 .c
.m4.c:
	m4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET}
@


1.16.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:14 +0000
@
text
@d1 179
@


1.16.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 168
# $FreeBSD: releng/8.4/lib/libelf/Makefile 212204 2010-09-04 12:52:44Z kaiw $

LIB=	elf

SRCS=	elf_begin.c						\
	elf_cntl.c						\
	elf_end.c elf_errmsg.c elf_errno.c			\
	elf_data.c						\
	elf_fill.c						\
	elf_flag.c						\
	elf_getarhdr.c						\
	elf_getarsym.c						\
	elf_getbase.c						\
	elf_getident.c						\
	elf_hash.c						\
	elf_kind.c						\
	elf_memory.c						\
	elf_next.c						\
	elf_rand.c						\
	elf_rawfile.c						\
	elf_phnum.c						\
	elf_shnum.c						\
	elf_shstrndx.c						\
	elf_scn.c						\
	elf_strptr.c						\
	elf_update.c						\
	elf_version.c						\
	gelf_cap.c						\
	gelf_checksum.c						\
	gelf_dyn.c						\
	gelf_ehdr.c						\
	gelf_getclass.c						\
	gelf_fsize.c						\
	gelf_move.c						\
	gelf_phdr.c						\
	gelf_rel.c						\
	gelf_rela.c						\
	gelf_shdr.c						\
	gelf_sym.c						\
	gelf_syminfo.c						\
	gelf_symshndx.c						\
	gelf_xlate.c						\
	libelf.c						\
	libelf_align.c						\
	libelf_allocate.c					\
	libelf_ar.c						\
	libelf_ar_util.c					\
	libelf_checksum.c					\
	libelf_data.c						\
	libelf_ehdr.c						\
	libelf_extended.c					\
	libelf_phdr.c						\
	libelf_shdr.c						\
	libelf_xlate.c						\
	${GENSRCS}
INCS=	libelf.h gelf.h

GENSRCS=	libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES=	${GENSRCS}
CFLAGS+=	-I. -I${.CURDIR}

SHLIB_MAJOR=	1

WARNS?=	6

MAN=	elf.3							\
	elf_begin.3						\
	elf_cntl.3						\
	elf_end.3						\
	elf_errmsg.3						\
	elf_fill.3						\
	elf_flagdata.3						\
	elf_getarhdr.3						\
	elf_getarsym.3						\
	elf_getbase.3						\
	elf_getdata.3						\
	elf_getident.3						\
	elf_getscn.3						\
	elf_getphdrnum.3					\
	elf_getphnum.3						\
	elf_getshdrnum.3					\
	elf_getshnum.3						\
	elf_getshdrstrndx.3					\
	elf_getshstrndx.3					\
	elf_hash.3						\
	elf_kind.3						\
	elf_memory.3						\
	elf_next.3						\
	elf_rawfile.3						\
	elf_rand.3						\
	elf_strptr.3						\
	elf_update.3						\
	elf_version.3						\
	gelf.3							\
	gelf_checksum.3						\
	gelf_fsize.3						\
	gelf_getcap.3						\
	gelf_getclass.3						\
	gelf_getdyn.3						\
	gelf_getehdr.3						\
	gelf_getmove.3						\
	gelf_getphdr.3						\
	gelf_getrel.3						\
	gelf_getrela.3						\
	gelf_getshdr.3						\
	gelf_getsym.3						\
	gelf_getsyminfo.3					\
	gelf_getsymshndx.3					\
	gelf_newehdr.3						\
	gelf_newphdr.3						\
	gelf_update_ehdr.3					\
	gelf_xlatetof.3

MLINKS+= \
	elf_errmsg.3 elf_errno.3		\
	elf_flagdata.3 elf_flagehdr.3		\
	elf_flagdata.3 elf_flagelf.3		\
	elf_flagdata.3 elf_flagphdr.3		\
	elf_flagdata.3 elf_flagscn.3		\
	elf_flagdata.3 elf_flagshdr.3		\
	elf_getdata.3 elf_newdata.3		\
	elf_getdata.3 elf_rawdata.3		\
	elf_getscn.3 elf_ndxscn.3		\
	elf_getscn.3 elf_newscn.3		\
	elf_getscn.3 elf_nextscn.3		\
	elf_getshstrndx.3 elf_setshstrndx.3	\
	gelf_getcap.3 gelf_update_cap.3		\
	gelf_getdyn.3 gelf_update_dyn.3		\
	gelf_getmove.3 gelf_update_move.3	\
	gelf_getrel.3 gelf_update_rel.3		\
	gelf_getrela.3 gelf_update_rela.3	\
	gelf_getsym.3 gelf_update_sym.3		\
	gelf_getsyminfo.3 gelf_update_syminfo.3	\
	gelf_getsymshndx.3 gelf_update_symshndx.3 \
	gelf_update_ehdr.3 gelf_update_phdr.3	\
	gelf_update_ehdr.3 gelf_update_shdr.3	\
	gelf_xlatetof.3 gelf_xlatetom.3

.for E in 32 64
MLINKS+= \
	gelf_checksum.3	elf${E}_checksum.3 	\
	gelf_fsize.3	elf${E}_fsize.3 	\
	gelf_getehdr.3	elf${E}_getehdr.3	\
	gelf_getphdr.3	elf${E}_getphdr.3	\
	gelf_getshdr.3	elf${E}_getshdr.3	\
	gelf_newehdr.3	elf${E}_newehdr.3	\
	gelf_newphdr.3	elf${E}_newphdr.3	\
	gelf_xlatetof.3	elf${E}_xlatetof.3	\
	gelf_xlatetof.3	elf${E}_xlatetom.3
.endfor

VERSION_MAP=		${.CURDIR}/Version.map

LIBELF_TEST_HOOKS?=	1
.if defined(LIBELF_TEST_HOOKS) && (${LIBELF_TEST_HOOKS} > 0)
CFLAGS+= -DLIBELF_TEST_HOOKS
.endif

libelf_convert.c:	elf_types.m4 libelf_convert.m4
libelf_fsize.c:		elf_types.m4 libelf_fsize.m4
libelf_msize.c:		elf_types.m4 libelf_msize.m4

.include <bsd.lib.mk>

# Keep the .SUFFIXES line after the include of bsd.lib.mk
.SUFFIXES:	.m4 .c
.m4.c:
	m4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET}
@


1.15
log
@SVN rev 238741 on 2012-07-24 16:03:28Z by ache

Don't ever build files depending on the directory where they are placed in.
It is obvious that its modification time will change with each such file
builded.
This bug cause whole libelf to rebuild itself each second make run
(and relink that files on each first make run) in the loop.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.14
log
@SVN rev 237531 on 2012-06-24 09:19:24Z by andrew

Add the sys directory we create to the list of items to clean.
@
text
@d71 2
a72 1
sys/elf32.h sys/elf64.h sys/elf_common.h: sys
a74 3
sys:
	mkdir -p ${.OBJDIR}/sys

@


1.13
log
@SVN rev 237528 on 2012-06-24 08:43:34Z by andrew

Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h.

When building libelf in the bootstrap stage this would include the tree
versions of, for example, sys/_types.h. This would work as long as the
tree's version of this file was close enough to the system's version of
the file. If, however, there was a change in the tree such that the location
of a typedef was moved this would cause problems. In this case the version
of sys/_types.h in the tree no longer defines __wchar_t and expects it to
to be defined in machine/_types.h, however we pick up machine/_types.h from
the system and find it is not defined there. The solution is to restrict the
parts of sys er include from the tree to those that are needed.

This fixes the recent Tinderbox failure.

Pointy Hat to:	andrew
@
text
@d68 1
@


1.12
log
@SVN rev 221569 on 2011-05-07 01:05:31Z by obrien

Add the ability to search for all the inlined instances of a given function.

Reviewed by:	jb
Obtained from:	Juniper Networks
@
text
@d58 8
d68 7
a74 1
CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/../../sys
@


1.12.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/lib/libelf/Makefile 221569 2011-05-07 01:05:31Z obrien $
@


1.12.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/264506
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/lib/libelf/Makefile 264506 2014-04-15 16:10:47Z tijl $
a57 8
#
# We need to link against the correct version of these files. One
# solution is to include ../../sys in the include path. This causes
# problems when a header file in sys depends on a file in another
# part of the tree, e.g. a machine dependent header.
#
SRCS+=	sys/elf32.h sys/elf64.h sys/elf_common.h

d60 1
a60 6
CLEANDIRS=	sys
CFLAGS+=	-I${.CURDIR} -I.

sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
	mkdir -p ${.OBJDIR}/sys
	ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
@


1.12.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/lib/libelf/Makefile 221569 2011-05-07 01:05:31Z obrien $
@


1.12.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/lib/libelf/Makefile 221569 2011-05-07 01:05:31Z obrien $
@


1.11
log
@SVN rev 211577 on 2010-08-21 17:29:59Z by rpaulo

Don't link drti.o with libelf_pic.a. This means that all software with
userland SDT probes must be linked with libelf explicitly.

Requested by:	kib
Sponsored by:	The FreeBSD Foundation
@
text
@d60 1
a60 1
CFLAGS+=	-I. -I${.CURDIR}
@


1.10
log
@SVN rev 211540 on 2010-08-21 10:40:12Z by rpaulo

Install a PIC libelf. This will be needed by the DTrace runtime
instrumentation object (dtri.o).

Sponsored by:	The FreeBSD Foundation
@
text
@a57 1
INSTALL_PIC_ARCHIVE=yes
@


1.9
log
@SVN rev 210348 on 2010-07-21 12:54:34Z by kaiw

Move helper functions `_libelf_ar_get_{name,number,string}()` and
`_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
to break the circular dependency between "elf_memory.o" and
"libelf_ar.o".

Obtained from:	elftoolchain
MFC after:		1 month
@
text
@d58 1
@


1.8
log
@SVN rev 210345 on 2010-07-21 12:14:50Z by kaiw

* Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
  favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
  respectively.
* Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
  `elf_getshdrnum()`.
* Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
  `elf_getshnum()`.

Obtained from:	elftoolchain
MFC after:		1 month
@
text
@d47 1
@


1.7
log
@SVN rev 201381 on 2010-01-02 09:58:07Z by ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
@
text
@d66 2
a67 1
	elf_end.3 elf_errmsg.3					\
d76 1
d78 1
d80 1
@


1.6
log
@SVN rev 189721 on 2009-03-12 04:44:09Z by obrien

Don't need to set symbol, default value is OK.
@
text
@a62 2
WARNS?=	6

@


1.6.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.6.2.2
log
@SVN rev 212204 on 2010-09-04 12:52:44Z by kaiw

MFC r210344,r210345,r210348.

r210344:
  Avoid switching between "unsigned char" and "char" in the C code
  generated from "libelf_convert.m4".

r210345:
  * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
    favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
    respectively.
  * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
    `elf_getshdrnum()`.
  * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
    `elf_getshnum()`.

r210348:
  Move helper functions `_libelf_ar_get_{name,number,string}()` and
  `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
  to break the circular dependency between "elf_memory.o" and
  "libelf_ar.o".
@
text
@a46 1
	libelf_ar_util.c					\
d68 1
a68 2
	elf_end.3						\
	elf_errmsg.3						\
a76 1
	elf_getphdrnum.3					\
a77 1
	elf_getshdrnum.3					\
a78 1
	elf_getshdrstrndx.3					\
@


1.6.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/lib/libelf/Makefile 212204 2010-09-04 12:52:44Z kaiw $
@


1.6.2.2.4.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.6.2.2.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/lib/libelf/Makefile 212204 2010-09-04 12:52:44Z kaiw $
@


1.6.2.2.2.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.6.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.6.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.5
log
@Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx'
members of the ELF Executable Header inside the library-private
`struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr
structure on an elf_update(3) call.  These fields of the Ehdr
structure are technically `out of bounds' for an application program
per the ELF(3) API, but we've seen applications that initialize
a new Ehdr structure using memcpy(), messing up the library's
invariants. [1]

Implement elf_getphnum() and handle ELF objects with more than
64K program header table entries.

Reported by:	jb [1]
@
text
@d151 1
a151 1
CFLAGS+=	-DLIBELF_TEST_HOOKS=1
@


1.5.2.1
log
@SVN rev 190343 on 2009-03-23 23:32:20Z by obrien

MFC: r189721: don't need to set symbol, default value OK
@
text
@d151 1
a151 1
CFLAGS+= -DLIBELF_TEST_HOOKS
@


1.5.2.2
log
@SVN rev 212205 on 2010-09-04 12:52:51Z by kaiw

MFC r210344,r210345,r210348.

r210344:
  Avoid switching between "unsigned char" and "char" in the C code
  generated from "libelf_convert.m4".

r210345:
  * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
    favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
    respectively.
  * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
    `elf_getshdrnum()`.
  * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
    `elf_getshnum()`.

r210348:
  Move helper functions `_libelf_ar_get_{name,number,string}()` and
  `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
  to break the circular dependency between "elf_memory.o" and
  "libelf_ar.o".
@
text
@a46 1
	libelf_ar_util.c					\
d68 1
a68 2
	elf_end.3						\
	elf_errmsg.3						\
a76 1
	elf_getphdrnum.3					\
a77 1
	elf_getshdrnum.3					\
a78 1
	elf_getshdrstrndx.3					\
@


1.5.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/lib/libelf/Makefile 212205 2010-09-04 12:52:51Z kaiw $
@


1.5.2.2.2.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.5.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/lib/libelf/Makefile 212205 2010-09-04 12:52:51Z kaiw $
@


1.5.2.1.4.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.5.2.1.2.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.5.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.4
log
@Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled.  Change the M4
templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair
around the generated code for each ELF data type, where `NNN' is
the OS version where the ELF type was added to the source tree.

This change allows cross-builds of old sources on newer FreeBSD
systems to work correctly.

Problem reported by:	ru
@
text
@d21 1
d50 1
d77 1
@


1.3
log
@- style: use `=' instead of `+=' for initial assignments.

- don't add generated sources' objects to OBJS explicitly;
  GENSRCS is part of SRCS so they were already in OBJS.
@
text
@d27 1
a28 2
	gelf_fsize.c						\
	gelf_getclass.c						\
d31 3
d39 1
a58 2
OSRELDATE!=	sysctl -n kern.osreldate

a60 6
.if ${OSRELDATE} > 700009
SRCS+=	gelf_cap.c						\
	gelf_move.c						\
	gelf_syminfo.c
.endif

d160 1
a160 1
	m4 -D SRCDIR=${.CURDIR} -D OSRELDATE=${OSRELDATE} ${.IMPSRC} > ${.TARGET}
@


1.2
log
@- Replace the use of DPSRCS with something more appropriate.  DPSRCS
  is for when you need something in ".depend", but not compiled in.
- Style fixes: Spell ${.OBJDIR} as ".".
- Neaten a comment.

Submitted by:	ru
@
text
@d52 2
a53 2
GENSRCS+=	libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES+=	${GENSRCS}
a55 2
OBJS+=	libelf_convert.o libelf_fsize.o libelf_msize.o

@


1.1
log
@MFP4: Add an implementation of the ELF(3) and GELF(3) API set.

Bump __FreeBSD_version.

Reviewed by:	jb
@
text
@d48 2
a49 1
	libelf_xlate.c
d52 3
a54 3
DPSRCS+=	libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES+=	libelf_fsize.c libelf_msize.c libelf_convert.c
CFLAGS+=	-I${.OBJDIR} -I${.CURDIR}
d164 1
a164 1
# Keep the .suffixes line after the include of bsd.lib.mk
@

