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 21 22.include "${SRCTOP}/lib/clang/llvm.pre.mk" 23 24CFLAGS+= -I${.OBJDIR} 25CFLAGS+= -I${LLVM_BASE}/${SRCDIR} 26 27.include "${SRCTOP}/lib/clang/llvm.build.mk" 28 29.for hdr in InstallNameToolOpts ObjcopyOpts StripOpts 30${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td 31 ${LLVM_TBLGEN} -gen-opt-parser-defs \ 32 -I ${LLVM_SRCS}/tools/llvm-objcopy -I ${LLVM_SRCS}/include \ 33 -d ${.TARGET}.d -o ${.TARGET} ${LLVM_BASE}/${SRCDIR}/${hdr}.td 34TGHDRS+= ${hdr}.inc 35.endfor 36 37DEPENDFILES+= ${TGHDRS:C/$/.d/} 38DPSRCS+= ${TGHDRS} 39CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} 40 41LIBDEPS+= llvm 42 43.for lib in ${LIBDEPS} 44DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 45LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 46.endfor 47 48PACKAGE= clang 49 50LIBADD+= execinfo 51LIBADD+= ncursesw 52LIBADD+= pthread 53LIBADD+= z 54 55.include <bsd.prog.mk> 56