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