1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5PROG_CXX= llvm-objcopy 6 7SRCDIR= llvm/tools/llvm-objcopy 8SRCS+= ObjcopyOptions.cpp 9SRCS+= llvm-objcopy.cpp 10 11CFLAGS.llvm-objcopy.cpp+= -Dllvm_objcopy_main=main 12 13.include "${SRCTOP}/lib/clang/llvm.pre.mk" 14 15CFLAGS+= -I${.OBJDIR} 16CFLAGS+= -I${LLVM_BASE}/${SRCDIR} 17 18.for hdr in BitcodeStripOpts InstallNameToolOpts ObjcopyOpts StripOpts 19${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td 20 ${LLVM_TBLGEN} -gen-opt-parser-defs \ 21 -I ${LLVM_SRCS}/tools/llvm-objcopy -I ${LLVM_SRCS}/include \ 22 -d ${.TARGET}.d -o ${.TARGET} ${LLVM_BASE}/${SRCDIR}/${hdr}.td 23TGHDRS+= ${hdr}.inc 24.endfor 25 26DEPENDFILES+= ${TGHDRS:C/$/.d/} 27DPSRCS+= ${TGHDRS} 28CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} 29 30LIBADD+= z 31LIBADD+= zstd 32 33LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip 34 35.if ${MK_LLVM_BINUTILS} != "no" 36LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ 37 ${BINDIR}/llvm-strip ${BINDIR}/strip 38MLINKS= llvm-objcopy.1 objcopy.1 \ 39 llvm-objcopy.1 strip.1 40.endif 41 42.include "../llvm.prog.mk" 43