1# $FreeBSD$ 2 3PROG_CXX= llvm-objcopy 4 5SRCDIR= llvm/tools/llvm-objcopy 6SRCS+= Buffer.cpp 7SRCS+= COFF/COFFObjcopy.cpp 8SRCS+= COFF/Object.cpp 9SRCS+= COFF/Reader.cpp 10SRCS+= COFF/Writer.cpp 11SRCS+= CopyConfig.cpp 12SRCS+= ELF/ELFConfig.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.include "${SRCTOP}/lib/clang/llvm.build.mk" 32 33.for hdr in 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 45LIBDEPS+= llvm 46 47.for lib in ${LIBDEPS} 48DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 49LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 50.endfor 51 52PACKAGE= clang 53 54LIBADD+= execinfo 55LIBADD+= ncursesw 56LIBADD+= pthread 57LIBADD+= z 58 59.include <bsd.prog.mk> 60