xref: /freebsd/lib/libelftc/Makefile (revision 649e8a3ea4ca16a5f1ebd48cc445dd18f6eee046)
131942939SEd Maste.include <bsd.own.mk>
231942939SEd Maste
3*649e8a3eSLexi WinterPACKAGE=	toolchain
431942939SEd MasteINTERNALLIB=
531942939SEd Maste
62821bdccSEd MasteELFTCDIR=	${SRCTOP}/contrib/elftoolchain
731942939SEd Maste
831942939SEd Maste.PATH:	${ELFTCDIR}/libelftc
931942939SEd Maste
1031942939SEd MasteLIB=	elftc
1131942939SEd Maste
1231942939SEd MasteSRCS=	elftc_bfdtarget.c                       \
1331942939SEd Maste	elftc_copyfile.c                        \
1431942939SEd Maste	elftc_demangle.c                        \
15b6b6f9ccSEd Maste	elftc_reloc_type_str.c			\
1631942939SEd Maste	elftc_set_timestamps.c                  \
1731942939SEd Maste	elftc_string_table.c                    \
18b6d812d2SEd Maste	elftc_timestamp.c			\
1931942939SEd Maste	elftc_version.c                         \
2031942939SEd Maste	libelftc_bfdtarget.c                    \
2131942939SEd Maste	libelftc_dem_arm.c                      \
2231942939SEd Maste	libelftc_dem_gnu2.c                     \
2331942939SEd Maste	libelftc_dem_gnu3.c                     \
2431942939SEd Maste	libelftc_hash.c                         \
2531942939SEd Maste	libelftc_vstr.c
2631942939SEd Maste
2731942939SEd MasteINCS=	libelftc.h
2831942939SEd MasteCFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
2931942939SEd Maste
304cc3366dSEnji CooperMAN+=	elftc.3 \
314cc3366dSEnji Cooper	elftc_bfd_find_target.3 \
324cc3366dSEnji Cooper	elftc_copyfile.3 \
334cc3366dSEnji Cooper	elftc_demangle.3 \
344cc3366dSEnji Cooper	elftc_reloc_type_str.3 \
354cc3366dSEnji Cooper	elftc_set_timestamps.3 \
364cc3366dSEnji Cooper	elftc_timestamp.3 \
374cc3366dSEnji Cooper	elftc_string_table_create.3 \
384cc3366dSEnji Cooper	elftc_version.3
3931942939SEd Maste
400a8314e0SMark JohnstonMLINKS+= \
410a8314e0SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
420a8314e0SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
430a8314e0SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
440a8314e0SMark Johnston	elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \
450a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_destroy.3 \
460a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_from_section.3 \
470a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_image.3 \
480a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_insert.3 \
490a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_lookup.3 \
500a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_remove.3 \
510a8314e0SMark Johnston	elftc_string_table_create.3 elftc_string_table_to_string.3
520a8314e0SMark Johnston
5394bb24b3SBryan Drewery# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
5494bb24b3SBryan Drewery# We need to link against the correct version of these files. One
5594bb24b3SBryan Drewery# solution is to include ../../sys in the include path. This causes
5694bb24b3SBryan Drewery# problems when a header file in sys depends on a file in another
5794bb24b3SBryan Drewery# part of the tree, e.g. a machine dependent header.
5894bb24b3SBryan Drewery#
5994bb24b3SBryan DrewerySRCS+=		sys/elf_common.h
6094bb24b3SBryan DreweryCLEANDIRS=	sys
6194bb24b3SBryan DreweryCFLAGS+=	-I.
6294bb24b3SBryan Drewerysys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
6394bb24b3SBryan Drewery	mkdir -p ${.OBJDIR}/sys
6494bb24b3SBryan Drewery	ln -sf ${.ALLSRC} ${.TARGET}
6594bb24b3SBryan Drewery
6631942939SEd Maste.include <bsd.lib.mk>
67