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