Makefile revision 1.7
1# $OpenBSD: Makefile,v 1.7 2021/12/17 14:55:47 patrick Exp $ 2 3PROG= llvm-config 4BINDIR= /usr/bin 5 6NATIVE_ARCHS=AArch64 ARM Mips PowerPC RISCV Sparc X86 7 8CMAKE= cmake 9LLVMROOT= ${.CURDIR}/../../../llvm/llvm 10 11.include <bsd.own.mk> 12SRCS= llvm-config.cpp 13 14CPPFLAGS+= -I${.CURDIR} 15 16llvm-config.o: BuildVariables.inc ExtensionDependencies.inc LibraryDependencies.inc 17 18BuildVariables.inc: ${.CURDIR}/BuildVariables.inc.def 19 cp ${.CURDIR}/BuildVariables.inc.def ${.OBJDIR}/BuildVariables.inc 20 echo "#define LLVM_TARGETS_BUILT \"${LLVM_ARCH} AMDGPU\"" >> \ 21 ${.OBJDIR}/BuildVariables.inc 22 23ExtensionDependencies.inc: 24 cp ${.CURDIR}/ExtensionDependencies.inc \ 25 ${.OBJDIR}/ExtensionDependencies.inc 26 27LibraryDependencies.inc: 28 cp ${.CURDIR}/LibraryDependencies.inc.${LLVM_ARCH} \ 29 ${.OBJDIR}/LibraryDependencies.inc 30 31LLVM_LIBDEPS= LLVMTableGen LLVMSupport 32 33reconf: 34.for arch in ${NATIVE_ARCHS} 35 mkdir ${.CURDIR}/CMakeGen 36 cd ${.CURDIR}/CMakeGen && ${CMAKE} -DLLVM_TARGETS_TO_BUILD="${arch};AMDGPU" ${LLVMROOT} 37 mv ${.CURDIR}/CMakeGen/tools/llvm-config/LibraryDependencies.inc ${.CURDIR}/LibraryDependencies.inc.${arch} 38 rm -rf ${.CURDIR}/CMakeGen 39.endfor 40 41CLEANFILES+= BuildVariables.inc LibraryDependencies.inc 42 43.PATH: ${.CURDIR}/../../../llvm/llvm/tools/llvm-config 44 45.include <bsd.prog.mk> 46 47