xref: /freebsd/lib/libelftc/Makefile (revision 09a53ad8f1318c5daae6cfb19d97f4f6459f0013)
1# $FreeBSD$
2.include <bsd.own.mk>
3
4PACKAGE=lib${LIB}
5INTERNALLIB=
6
7ELFTCDIR=	${SRCTOP}/contrib/elftoolchain
8
9.PATH:	${ELFTCDIR}/libelftc
10
11LIB=	elftc
12
13SRCS=	elftc_bfdtarget.c                       \
14	elftc_copyfile.c                        \
15	elftc_demangle.c                        \
16	elftc_reloc_type_str.c			\
17	elftc_set_timestamps.c                  \
18	elftc_string_table.c                    \
19	elftc_timestamp.c			\
20	elftc_version.c                         \
21	libelftc_bfdtarget.c                    \
22	libelftc_dem_arm.c                      \
23	libelftc_dem_gnu2.c                     \
24	libelftc_dem_gnu3.c                     \
25	libelftc_hash.c                         \
26	libelftc_vstr.c
27
28INCS=	libelftc.h
29CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
30
31MAN=
32
33# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
34# We need to link against the correct version of these files. One
35# solution is to include ../../sys in the include path. This causes
36# problems when a header file in sys depends on a file in another
37# part of the tree, e.g. a machine dependent header.
38#
39SRCS+=		sys/elf_common.h
40CLEANDIRS=	sys
41CFLAGS+=	-I.
42sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
43	mkdir -p ${.OBJDIR}/sys
44	ln -sf ${.ALLSRC} ${.TARGET}
45
46.include <bsd.lib.mk>
47