1# $FreeBSD$ 2 3PROG_CXX= llvm-objcopy 4MAN= 5 6SRCDIR= 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+= llvm-objcopy.cpp 16 17.include "${SRCTOP}/lib/clang/llvm.pre.mk" 18 19CFLAGS+= -I${.OBJDIR} 20CFLAGS+= -I${LLVM_SRCS}/${SRCDIR} 21 22.include "${SRCTOP}/lib/clang/llvm.build.mk" 23 24.for hdr in ObjcopyOpts StripOpts 25${hdr}.inc: ${LLVM_SRCS}/${SRCDIR}/${hdr}.td 26 ${LLVM_TBLGEN} -gen-opt-parser-defs \ 27 -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ 28 ${LLVM_SRCS}/${SRCDIR}/${hdr}.td 29TGHDRS+= ${hdr}.inc 30.endfor 31 32DEPENDFILES+= ${TGHDRS:C/$/.d/} 33DPSRCS+= ${TGHDRS} 34CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} 35 36LIBDEPS+= llvm 37 38.for lib in ${LIBDEPS} 39DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 40LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a 41.endfor 42 43PACKAGE= clang 44 45LIBADD+= ncursesw 46LIBADD+= pthread 47LIBADD+= z 48 49.include <bsd.prog.mk> 50