xref: /freebsd/lib/libelftc/Makefile (revision cc68614da8232d8baaca0ae0d0dd8f890f06623e)
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+=	elftc.3 \
32	elftc_bfd_find_target.3 \
33	elftc_copyfile.3 \
34	elftc_demangle.3 \
35	elftc_reloc_type_str.3 \
36	elftc_set_timestamps.3 \
37	elftc_timestamp.3 \
38	elftc_string_table_create.3 \
39	elftc_version.3
40
41MLINKS+= \
42	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
43	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
44	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
45	elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \
46	elftc_string_table_create.3 elftc_string_table_destroy.3 \
47	elftc_string_table_create.3 elftc_string_table_from_section.3 \
48	elftc_string_table_create.3 elftc_string_table_image.3 \
49	elftc_string_table_create.3 elftc_string_table_insert.3 \
50	elftc_string_table_create.3 elftc_string_table_lookup.3 \
51	elftc_string_table_create.3 elftc_string_table_remove.3 \
52	elftc_string_table_create.3 elftc_string_table_to_string.3
53
54# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
55# We need to link against the correct version of these files. One
56# solution is to include ../../sys in the include path. This causes
57# problems when a header file in sys depends on a file in another
58# part of the tree, e.g. a machine dependent header.
59#
60SRCS+=		sys/elf_common.h
61CLEANDIRS=	sys
62CFLAGS+=	-I.
63sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
64	mkdir -p ${.OBJDIR}/sys
65	ln -sf ${.ALLSRC} ${.TARGET}
66
67.include <bsd.lib.mk>
68