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