131942939SEd Maste.include <bsd.own.mk> 231942939SEd Maste 331942939SEd MasteINTERNALLIB= 431942939SEd Maste 52821bdccSEd MasteELFTCDIR= ${SRCTOP}/contrib/elftoolchain 631942939SEd Maste 731942939SEd Maste.PATH: ${ELFTCDIR}/libelftc 831942939SEd Maste 931942939SEd MasteLIB= elftc 1031942939SEd Maste 1131942939SEd MasteSRCS= elftc_bfdtarget.c \ 1231942939SEd Maste elftc_copyfile.c \ 1331942939SEd Maste elftc_demangle.c \ 14b6b6f9ccSEd Maste elftc_reloc_type_str.c \ 1531942939SEd Maste elftc_set_timestamps.c \ 1631942939SEd Maste elftc_string_table.c \ 17b6d812d2SEd Maste elftc_timestamp.c \ 1831942939SEd Maste elftc_version.c \ 1931942939SEd Maste libelftc_bfdtarget.c \ 2031942939SEd Maste libelftc_dem_arm.c \ 2131942939SEd Maste libelftc_dem_gnu2.c \ 2231942939SEd Maste libelftc_dem_gnu3.c \ 2331942939SEd Maste libelftc_hash.c \ 2431942939SEd Maste libelftc_vstr.c 2531942939SEd Maste 2631942939SEd MasteINCS= libelftc.h 2731942939SEd MasteCFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common 2831942939SEd Maste 294cc3366dSEnji CooperMAN+= elftc.3 \ 304cc3366dSEnji Cooper elftc_bfd_find_target.3 \ 314cc3366dSEnji Cooper elftc_copyfile.3 \ 324cc3366dSEnji Cooper elftc_demangle.3 \ 334cc3366dSEnji Cooper elftc_reloc_type_str.3 \ 344cc3366dSEnji Cooper elftc_set_timestamps.3 \ 354cc3366dSEnji Cooper elftc_timestamp.3 \ 364cc3366dSEnji Cooper elftc_string_table_create.3 \ 374cc3366dSEnji Cooper elftc_version.3 3831942939SEd Maste 39*0a8314e0SMark JohnstonMLINKS+= \ 40*0a8314e0SMark Johnston elftc_bfd_find_target.3 elftc_bfd_target_class.3 \ 41*0a8314e0SMark Johnston elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \ 42*0a8314e0SMark Johnston elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \ 43*0a8314e0SMark Johnston elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \ 44*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_destroy.3 \ 45*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_from_section.3 \ 46*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_image.3 \ 47*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_insert.3 \ 48*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_lookup.3 \ 49*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_remove.3 \ 50*0a8314e0SMark Johnston elftc_string_table_create.3 elftc_string_table_to_string.3 51*0a8314e0SMark Johnston 5294bb24b3SBryan Drewery# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile 5394bb24b3SBryan Drewery# We need to link against the correct version of these files. One 5494bb24b3SBryan Drewery# solution is to include ../../sys in the include path. This causes 5594bb24b3SBryan Drewery# problems when a header file in sys depends on a file in another 5694bb24b3SBryan Drewery# part of the tree, e.g. a machine dependent header. 5794bb24b3SBryan Drewery# 5894bb24b3SBryan DrewerySRCS+= sys/elf_common.h 5994bb24b3SBryan DreweryCLEANDIRS= sys 6094bb24b3SBryan DreweryCFLAGS+= -I. 6194bb24b3SBryan Drewerysys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA 6294bb24b3SBryan Drewery mkdir -p ${.OBJDIR}/sys 6394bb24b3SBryan Drewery ln -sf ${.ALLSRC} ${.TARGET} 6494bb24b3SBryan Drewery 6531942939SEd Maste.include <bsd.lib.mk> 66