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 31 32LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip 33 34.if ${MK_LLVM_BINUTILS} != "no" 35LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ 36 ${BINDIR}/llvm-strip ${BINDIR}/strip 37MLINKS= llvm-objcopy.1 objcopy.1 \ 38 llvm-objcopy.1 strip.1 39.endif 40 41.include "../llvm.prog.mk" 42