1# $OpenBSD: Makefile,v 1.3 2023/11/12 17:29:04 jca Exp $ 2 3.include <bsd.own.mk> 4 5LLVM_V= 16 6LIBDIR= /usr/lib/clang/${LLVM_V}/lib 7 8.if ${COMPILER_VERSION:L} != "clang" 9CC= clang 10CXX= clang++ 11.endif 12 13.if ${BUILD_CLANG:L} == "yes" 14 15LIB= clang_rt.profile 16NOPIC= 17NOPROFILE= 18 19CFLAGS+= -fPIC -std=gnu99 -fvisibility=hidden -fno-stack-protector 20CFLAGS+= -DCOMPILER_RT_HAS_ATOMICS=1 21CFLAGS+= -DCOMPILER_RT_HAS_FCNTL_LCK=1 22CFLAGS+= -DCOMPILER_RT_HAS_UNAME=1 23CPPFLAGS+= -DVISIBILITY_HIDDEN 24CPPFLAGS+= -I${BSDSRCDIR}/gnu/llvm/compiler-rt/include/ 25 26.PATH: ${.CURDIR}/../../../llvm/compiler-rt/lib/profile 27 28SRCS+= GCDAProfiling.c \ 29 InstrProfiling.c \ 30 InstrProfilingInternal.c \ 31 InstrProfilingValue.c \ 32 InstrProfilingBuffer.c \ 33 InstrProfilingFile.c \ 34 InstrProfilingMerge.c \ 35 InstrProfilingMergeFile.c \ 36 InstrProfilingNameVar.c \ 37 InstrProfilingVersionVar.c \ 38 InstrProfilingWriter.c \ 39 InstrProfilingPlatformOther.c \ 40 InstrProfilingRuntime.cpp \ 41 InstrProfilingUtil.c 42 43beforeinstall: 44 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${DIRMODE} \ 45 ${DESTDIR}${LIBDIR} 46 47.include <bsd.lib.mk> 48 49.else 50NOPROG= 51.include <bsd.prog.mk> 52.endif 53