xref: /freebsd/lib/libelftc/Makefile (revision 02e9120893770924227138ba49df1edb3896112a)
1.include <bsd.own.mk>
2
3INTERNALLIB=
4
5ELFTCDIR=	${SRCTOP}/contrib/elftoolchain
6
7.PATH:	${ELFTCDIR}/libelftc
8
9LIB=	elftc
10
11SRCS=	elftc_bfdtarget.c                       \
12	elftc_copyfile.c                        \
13	elftc_demangle.c                        \
14	elftc_reloc_type_str.c			\
15	elftc_set_timestamps.c                  \
16	elftc_string_table.c                    \
17	elftc_timestamp.c			\
18	elftc_version.c                         \
19	libelftc_bfdtarget.c                    \
20	libelftc_dem_arm.c                      \
21	libelftc_dem_gnu2.c                     \
22	libelftc_dem_gnu3.c                     \
23	libelftc_hash.c                         \
24	libelftc_vstr.c
25
26INCS=	libelftc.h
27CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
28
29MAN+=	elftc.3 \
30	elftc_bfd_find_target.3 \
31	elftc_copyfile.3 \
32	elftc_demangle.3 \
33	elftc_reloc_type_str.3 \
34	elftc_set_timestamps.3 \
35	elftc_timestamp.3 \
36	elftc_string_table_create.3 \
37	elftc_version.3
38
39MLINKS+= \
40	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
41	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
42	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
43	elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \
44	elftc_string_table_create.3 elftc_string_table_destroy.3 \
45	elftc_string_table_create.3 elftc_string_table_from_section.3 \
46	elftc_string_table_create.3 elftc_string_table_image.3 \
47	elftc_string_table_create.3 elftc_string_table_insert.3 \
48	elftc_string_table_create.3 elftc_string_table_lookup.3 \
49	elftc_string_table_create.3 elftc_string_table_remove.3 \
50	elftc_string_table_create.3 elftc_string_table_to_string.3
51
52# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
53# We need to link against the correct version of these files. One
54# solution is to include ../../sys in the include path. This causes
55# problems when a header file in sys depends on a file in another
56# part of the tree, e.g. a machine dependent header.
57#
58SRCS+=		sys/elf_common.h
59CLEANDIRS=	sys
60CFLAGS+=	-I.
61sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
62	mkdir -p ${.OBJDIR}/sys
63	ln -sf ${.ALLSRC} ${.TARGET}
64
65.include <bsd.lib.mk>
66