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