1*0a6a1f1dSLionel Sambuc# $FreeBSD: head/lib/libelf/Makefile 261246 2014-01-28 21:38:54Z kaiw $ 2*0a6a1f1dSLionel Sambuc.include <bsd.own.mk> 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel SambucTOP= ${.CURDIR}/../../dist 5*0a6a1f1dSLionel SambucSRCDIR= ${TOP}/libelf 6*0a6a1f1dSLionel Sambuc 7*0a6a1f1dSLionel Sambuc.PATH: ${SRCDIR} 8*0a6a1f1dSLionel Sambuc 9*0a6a1f1dSLionel SambucLIB= elf 10*0a6a1f1dSLionel Sambuc 11*0a6a1f1dSLionel SambucSRCS= elf.c \ 12*0a6a1f1dSLionel Sambuc elf_begin.c \ 13*0a6a1f1dSLionel Sambuc elf_cntl.c \ 14*0a6a1f1dSLionel Sambuc elf_end.c elf_errmsg.c elf_errno.c \ 15*0a6a1f1dSLionel Sambuc elf_data.c \ 16*0a6a1f1dSLionel Sambuc elf_fill.c \ 17*0a6a1f1dSLionel Sambuc elf_flag.c \ 18*0a6a1f1dSLionel Sambuc elf_getarhdr.c \ 19*0a6a1f1dSLionel Sambuc elf_getarsym.c \ 20*0a6a1f1dSLionel Sambuc elf_getbase.c \ 21*0a6a1f1dSLionel Sambuc elf_getident.c \ 22*0a6a1f1dSLionel Sambuc elf_hash.c \ 23*0a6a1f1dSLionel Sambuc elf_kind.c \ 24*0a6a1f1dSLionel Sambuc elf_memory.c \ 25*0a6a1f1dSLionel Sambuc elf_next.c \ 26*0a6a1f1dSLionel Sambuc elf_open.c \ 27*0a6a1f1dSLionel Sambuc elf_rand.c \ 28*0a6a1f1dSLionel Sambuc elf_rawfile.c \ 29*0a6a1f1dSLionel Sambuc elf_phnum.c \ 30*0a6a1f1dSLionel Sambuc elf_shnum.c \ 31*0a6a1f1dSLionel Sambuc elf_shstrndx.c \ 32*0a6a1f1dSLionel Sambuc elf_scn.c \ 33*0a6a1f1dSLionel Sambuc elf_strptr.c \ 34*0a6a1f1dSLionel Sambuc elf_update.c \ 35*0a6a1f1dSLionel Sambuc elf_version.c \ 36*0a6a1f1dSLionel Sambuc gelf_cap.c \ 37*0a6a1f1dSLionel Sambuc gelf_checksum.c \ 38*0a6a1f1dSLionel Sambuc gelf_dyn.c \ 39*0a6a1f1dSLionel Sambuc gelf_ehdr.c \ 40*0a6a1f1dSLionel Sambuc gelf_getclass.c \ 41*0a6a1f1dSLionel Sambuc gelf_fsize.c \ 42*0a6a1f1dSLionel Sambuc gelf_move.c \ 43*0a6a1f1dSLionel Sambuc gelf_phdr.c \ 44*0a6a1f1dSLionel Sambuc gelf_rel.c \ 45*0a6a1f1dSLionel Sambuc gelf_rela.c \ 46*0a6a1f1dSLionel Sambuc gelf_shdr.c \ 47*0a6a1f1dSLionel Sambuc gelf_sym.c \ 48*0a6a1f1dSLionel Sambuc gelf_syminfo.c \ 49*0a6a1f1dSLionel Sambuc gelf_symshndx.c \ 50*0a6a1f1dSLionel Sambuc gelf_xlate.c \ 51*0a6a1f1dSLionel Sambuc libelf_align.c \ 52*0a6a1f1dSLionel Sambuc libelf_allocate.c \ 53*0a6a1f1dSLionel Sambuc libelf_ar.c \ 54*0a6a1f1dSLionel Sambuc libelf_ar_util.c \ 55*0a6a1f1dSLionel Sambuc libelf_checksum.c \ 56*0a6a1f1dSLionel Sambuc libelf_data.c \ 57*0a6a1f1dSLionel Sambuc libelf_ehdr.c \ 58*0a6a1f1dSLionel Sambuc libelf_extended.c \ 59*0a6a1f1dSLionel Sambuc libelf_memory.c \ 60*0a6a1f1dSLionel Sambuc libelf_open.c \ 61*0a6a1f1dSLionel Sambuc libelf_phdr.c \ 62*0a6a1f1dSLionel Sambuc libelf_shdr.c \ 63*0a6a1f1dSLionel Sambuc libelf_xlate.c \ 64*0a6a1f1dSLionel Sambuc ${GENSRCS} 65*0a6a1f1dSLionel Sambuc 66*0a6a1f1dSLionel SambucINCS= libelf.h gelf.h 67*0a6a1f1dSLionel SambucINCSDIR= /usr/include 68*0a6a1f1dSLionel Sambuc 69*0a6a1f1dSLionel SambucGENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c 70*0a6a1f1dSLionel SambucCLEANFILES+= ${GENSRCS} 71*0a6a1f1dSLionel SambucCPPFLAGS+= -I. -I${SRCDIR} -I${TOP}/common 72*0a6a1f1dSLionel Sambuc 73*0a6a1f1dSLionel SambucSHLIB_MAJOR= 1 74*0a6a1f1dSLionel SambucSHLIB_MINOR= 0 75*0a6a1f1dSLionel Sambuc 76*0a6a1f1dSLionel SambucMAN= elf.3 \ 77*0a6a1f1dSLionel Sambuc elf_begin.3 \ 78*0a6a1f1dSLionel Sambuc elf_cntl.3 \ 79*0a6a1f1dSLionel Sambuc elf_end.3 \ 80*0a6a1f1dSLionel Sambuc elf_errmsg.3 \ 81*0a6a1f1dSLionel Sambuc elf_fill.3 \ 82*0a6a1f1dSLionel Sambuc elf_flagdata.3 \ 83*0a6a1f1dSLionel Sambuc elf_getarhdr.3 \ 84*0a6a1f1dSLionel Sambuc elf_getarsym.3 \ 85*0a6a1f1dSLionel Sambuc elf_getbase.3 \ 86*0a6a1f1dSLionel Sambuc elf_getdata.3 \ 87*0a6a1f1dSLionel Sambuc elf_getident.3 \ 88*0a6a1f1dSLionel Sambuc elf_getscn.3 \ 89*0a6a1f1dSLionel Sambuc elf_getphdrnum.3 \ 90*0a6a1f1dSLionel Sambuc elf_getphnum.3 \ 91*0a6a1f1dSLionel Sambuc elf_getshdrnum.3 \ 92*0a6a1f1dSLionel Sambuc elf_getshnum.3 \ 93*0a6a1f1dSLionel Sambuc elf_getshdrstrndx.3 \ 94*0a6a1f1dSLionel Sambuc elf_getshstrndx.3 \ 95*0a6a1f1dSLionel Sambuc elf_hash.3 \ 96*0a6a1f1dSLionel Sambuc elf_kind.3 \ 97*0a6a1f1dSLionel Sambuc elf_memory.3 \ 98*0a6a1f1dSLionel Sambuc elf_next.3 \ 99*0a6a1f1dSLionel Sambuc elf_open.3 \ 100*0a6a1f1dSLionel Sambuc elf_rawfile.3 \ 101*0a6a1f1dSLionel Sambuc elf_rand.3 \ 102*0a6a1f1dSLionel Sambuc elf_strptr.3 \ 103*0a6a1f1dSLionel Sambuc elf_update.3 \ 104*0a6a1f1dSLionel Sambuc elf_version.3 \ 105*0a6a1f1dSLionel Sambuc gelf.3 \ 106*0a6a1f1dSLionel Sambuc gelf_checksum.3 \ 107*0a6a1f1dSLionel Sambuc gelf_fsize.3 \ 108*0a6a1f1dSLionel Sambuc gelf_getcap.3 \ 109*0a6a1f1dSLionel Sambuc gelf_getclass.3 \ 110*0a6a1f1dSLionel Sambuc gelf_getdyn.3 \ 111*0a6a1f1dSLionel Sambuc gelf_getehdr.3 \ 112*0a6a1f1dSLionel Sambuc gelf_getmove.3 \ 113*0a6a1f1dSLionel Sambuc gelf_getphdr.3 \ 114*0a6a1f1dSLionel Sambuc gelf_getrel.3 \ 115*0a6a1f1dSLionel Sambuc gelf_getrela.3 \ 116*0a6a1f1dSLionel Sambuc gelf_getshdr.3 \ 117*0a6a1f1dSLionel Sambuc gelf_getsym.3 \ 118*0a6a1f1dSLionel Sambuc gelf_getsyminfo.3 \ 119*0a6a1f1dSLionel Sambuc gelf_getsymshndx.3 \ 120*0a6a1f1dSLionel Sambuc gelf_newehdr.3 \ 121*0a6a1f1dSLionel Sambuc gelf_newphdr.3 \ 122*0a6a1f1dSLionel Sambuc gelf_update_ehdr.3 \ 123*0a6a1f1dSLionel Sambuc gelf_xlatetof.3 124*0a6a1f1dSLionel Sambuc 125*0a6a1f1dSLionel SambucMLINKS+= \ 126*0a6a1f1dSLionel Sambuc elf_errmsg.3 elf_errno.3 \ 127*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagarhdr.3 \ 128*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagehdr.3 \ 129*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagelf.3 \ 130*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagphdr.3 \ 131*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagscn.3 \ 132*0a6a1f1dSLionel Sambuc elf_flagdata.3 elf_flagshdr.3 \ 133*0a6a1f1dSLionel Sambuc elf_getdata.3 elf_newdata.3 \ 134*0a6a1f1dSLionel Sambuc elf_getdata.3 elf_rawdata.3 \ 135*0a6a1f1dSLionel Sambuc elf_getscn.3 elf_ndxscn.3 \ 136*0a6a1f1dSLionel Sambuc elf_getscn.3 elf_newscn.3 \ 137*0a6a1f1dSLionel Sambuc elf_getscn.3 elf_nextscn.3 \ 138*0a6a1f1dSLionel Sambuc elf_getshstrndx.3 elf_setshstrndx.3 \ 139*0a6a1f1dSLionel Sambuc elf_open.3 elf_openmemory.3 \ 140*0a6a1f1dSLionel Sambuc gelf_getcap.3 gelf_update_cap.3 \ 141*0a6a1f1dSLionel Sambuc gelf_getdyn.3 gelf_update_dyn.3 \ 142*0a6a1f1dSLionel Sambuc gelf_getmove.3 gelf_update_move.3 \ 143*0a6a1f1dSLionel Sambuc gelf_getrel.3 gelf_update_rel.3 \ 144*0a6a1f1dSLionel Sambuc gelf_getrela.3 gelf_update_rela.3 \ 145*0a6a1f1dSLionel Sambuc gelf_getsym.3 gelf_update_sym.3 \ 146*0a6a1f1dSLionel Sambuc gelf_getsyminfo.3 gelf_update_syminfo.3 \ 147*0a6a1f1dSLionel Sambuc gelf_getsymshndx.3 gelf_update_symshndx.3 \ 148*0a6a1f1dSLionel Sambuc gelf_update_ehdr.3 gelf_update_phdr.3 \ 149*0a6a1f1dSLionel Sambuc gelf_update_ehdr.3 gelf_update_shdr.3 \ 150*0a6a1f1dSLionel Sambuc gelf_xlatetof.3 gelf_xlatetom.3 151*0a6a1f1dSLionel Sambuc 152*0a6a1f1dSLionel Sambuc.for E in 32 64 153*0a6a1f1dSLionel SambucMLINKS+= \ 154*0a6a1f1dSLionel Sambuc gelf_checksum.3 elf${E}_checksum.3 \ 155*0a6a1f1dSLionel Sambuc gelf_fsize.3 elf${E}_fsize.3 \ 156*0a6a1f1dSLionel Sambuc gelf_getehdr.3 elf${E}_getehdr.3 \ 157*0a6a1f1dSLionel Sambuc gelf_getphdr.3 elf${E}_getphdr.3 \ 158*0a6a1f1dSLionel Sambuc gelf_getshdr.3 elf${E}_getshdr.3 \ 159*0a6a1f1dSLionel Sambuc gelf_newehdr.3 elf${E}_newehdr.3 \ 160*0a6a1f1dSLionel Sambuc gelf_newphdr.3 elf${E}_newphdr.3 \ 161*0a6a1f1dSLionel Sambuc gelf_xlatetof.3 elf${E}_xlatetof.3 \ 162*0a6a1f1dSLionel Sambuc gelf_xlatetof.3 elf${E}_xlatetom.3 163*0a6a1f1dSLionel Sambuc.endfor 164*0a6a1f1dSLionel Sambuc 165*0a6a1f1dSLionel Sambuclibelf_convert.c: elf_types.m4 libelf_convert.m4 166*0a6a1f1dSLionel Sambuclibelf_fsize.c: elf_types.m4 libelf_fsize.m4 167*0a6a1f1dSLionel Sambuclibelf_msize.c: elf_types.m4 libelf_msize.m4 168*0a6a1f1dSLionel Sambuc 169*0a6a1f1dSLionel Sambuc.include <bsd.lib.mk> 170*0a6a1f1dSLionel Sambuc 171*0a6a1f1dSLionel Sambuc# Keep the .SUFFIXES line after the include of bsd.lib.mk 172*0a6a1f1dSLionel Sambuc.SUFFIXES: .m4 .c 173*0a6a1f1dSLionel Sambuc.m4.c: 174*0a6a1f1dSLionel Sambuc ${TOOL_M4} -D SRCDIR=${SRCDIR} ${M4FLAGS} ${.IMPSRC} > ${.TARGET} 175*0a6a1f1dSLionel Sambuc 176