xref: /freebsd-12.1/lib/libelftc/Makefile (revision 978bce43)
131942939SEd Maste# $FreeBSD$
231942939SEd Maste.include <bsd.own.mk>
331942939SEd Maste
4a70cba95SGlen BarberPACKAGE=lib${LIB}
531942939SEd MasteINTERNALLIB=
631942939SEd Maste
72821bdccSEd MasteELFTCDIR=	${SRCTOP}/contrib/elftoolchain
831942939SEd Maste
931942939SEd Maste.PATH:	${ELFTCDIR}/libelftc
1031942939SEd Maste
1131942939SEd MasteLIB=	elftc
1231942939SEd Maste
1331942939SEd MasteSRCS=	elftc_bfdtarget.c                       \
1431942939SEd Maste	elftc_copyfile.c                        \
1531942939SEd Maste	elftc_demangle.c                        \
16b6b6f9ccSEd Maste	elftc_reloc_type_str.c			\
1731942939SEd Maste	elftc_set_timestamps.c                  \
1831942939SEd Maste	elftc_string_table.c                    \
19b6d812d2SEd Maste	elftc_timestamp.c			\
2031942939SEd Maste	elftc_version.c                         \
2131942939SEd Maste	libelftc_bfdtarget.c                    \
2231942939SEd Maste	libelftc_dem_arm.c                      \
2331942939SEd Maste	libelftc_dem_gnu2.c                     \
2431942939SEd Maste	libelftc_dem_gnu3.c                     \
2531942939SEd Maste	libelftc_hash.c                         \
2631942939SEd Maste	libelftc_vstr.c
2731942939SEd Maste
2831942939SEd MasteINCS=	libelftc.h
2931942939SEd MasteCFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
3031942939SEd Maste
314cc3366dSEnji CooperMAN+=	elftc.3 \
324cc3366dSEnji Cooper	elftc_bfd_find_target.3 \
334cc3366dSEnji Cooper	elftc_copyfile.3 \
344cc3366dSEnji Cooper	elftc_demangle.3 \
354cc3366dSEnji Cooper	elftc_reloc_type_str.3 \
364cc3366dSEnji Cooper	elftc_set_timestamps.3 \
374cc3366dSEnji Cooper	elftc_timestamp.3 \
384cc3366dSEnji Cooper	elftc_string_table_create.3 \
394cc3366dSEnji Cooper	elftc_version.3
4031942939SEd Maste
41*978bce43SMark JohnstonMLINKS+= \
42*978bce43SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
43*978bce43SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
44*978bce43SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
45*978bce43SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \
46*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_destroy.3 \
47*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_from_section.3 \
48*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_image.3 \
49*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_insert.3 \
50*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_lookup.3 \
51*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_remove.3 \
52*978bce43SMark Johnston	elftc_string_table_create.3 elftc_string_table_to_string.3
53*978bce43SMark Johnston
5494bb24b3SBryan Drewery# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
5594bb24b3SBryan Drewery# We need to link against the correct version of these files. One
5694bb24b3SBryan Drewery# solution is to include ../../sys in the include path. This causes
5794bb24b3SBryan Drewery# problems when a header file in sys depends on a file in another
5894bb24b3SBryan Drewery# part of the tree, e.g. a machine dependent header.
5994bb24b3SBryan Drewery#
6094bb24b3SBryan DrewerySRCS+=		sys/elf_common.h
6194bb24b3SBryan DreweryCLEANDIRS=	sys
6294bb24b3SBryan DreweryCFLAGS+=	-I.
6394bb24b3SBryan Drewerysys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
6494bb24b3SBryan Drewery	mkdir -p ${.OBJDIR}/sys
6594bb24b3SBryan Drewery	ln -sf ${.ALLSRC} ${.TARGET}
6694bb24b3SBryan Drewery
6731942939SEd Maste.include <bsd.lib.mk>
68