1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5PROG_CXX= llvm-objcopy 6 7SRCDIR= llvm/tools/llvm-objcopy 8SRCS+= COFF/COFFObjcopy.cpp 9SRCS+= COFF/Object.cpp 10SRCS+= COFF/Reader.cpp 11SRCS+= COFF/Writer.cpp 12SRCS+= ConfigManager.cpp 13SRCS+= ELF/ELFObjcopy.cpp 14SRCS+= ELF/Object.cpp 15SRCS+= MachO/MachOLayoutBuilder.cpp 16SRCS+= MachO/MachOObjcopy.cpp 17SRCS+= MachO/MachOReader.cpp 18SRCS+= MachO/MachOWriter.cpp 19SRCS+= MachO/Object.cpp 20SRCS+= llvm-objcopy.cpp 21SRCS+= wasm/Object.cpp 22SRCS+= wasm/Reader.cpp 23SRCS+= wasm/WasmObjcopy.cpp 24SRCS+= wasm/Writer.cpp 25 26.include "${SRCTOP}/lib/clang/llvm.pre.mk" 27 28CFLAGS+= -I${.OBJDIR} 29CFLAGS+= -I${LLVM_BASE}/${SRCDIR} 30 31.for hdr in BitcodeStripOpts InstallNameToolOpts ObjcopyOpts StripOpts 32${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td 33 ${LLVM_TBLGEN} -gen-opt-parser-defs \ 34 -I ${LLVM_SRCS}/tools/llvm-objcopy -I ${LLVM_SRCS}/include \ 35 -d ${.TARGET}.d -o ${.TARGET} ${LLVM_BASE}/${SRCDIR}/${hdr}.td 36TGHDRS+= ${hdr}.inc 37.endfor 38 39DEPENDFILES+= ${TGHDRS:C/$/.d/} 40DPSRCS+= ${TGHDRS} 41CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} 42 43LIBADD+= z 44 45LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip 46 47.if ${MK_LLVM_BINUTILS} != "no" 48LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ 49 ${BINDIR}/llvm-strip ${BINDIR}/strip 50MLINKS= llvm-objcopy.1 objcopy.1 51.endif 52 53.include "../llvm.prog.mk" 54