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