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