13585b293SGarrett Wollman# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 27f3dea24SPeter Wemm# $FreeBSD$ 3afe61c15SRodney W. Grimes 42bdaf7e8SRuslan Ermilov.include <bsd.init.mk> 5bd871f14SWarner Losh.include <bsd.compiler.mk> 6e5c6deceSEd Maste.include <bsd.linker.mk> 7afe61c15SRodney W. Grimes 8e4195e2eSJonathan Anderson.SUFFIXES: .out .o .bc .c .cc .cpp .cxx .C .m .y .l .ll .ln .s .S .asm 9afe61c15SRodney W. Grimes 1048aea4daSRuslan Ermilov# XXX The use of COPTS in modern makefiles is discouraged. 1141f89315SRuslan Ermilov.if defined(COPTS) 129b8d26fdSBryan Drewery.warning ${.CURDIR}: COPTS should be CFLAGS. 1341f89315SRuslan ErmilovCFLAGS+=${COPTS} 1441f89315SRuslan Ermilov.endif 1541f89315SRuslan Ermilov 164df1f59eSWarner Losh.if ${MK_ASSERT_DEBUG} == "no" 174df1f59eSWarner LoshCFLAGS+= -DNDEBUG 18e2e1ab1cSDavid E. O'BrienNO_WERROR= 194df1f59eSWarner Losh.endif 204df1f59eSWarner Losh 2141f89315SRuslan Ermilov.if defined(DEBUG_FLAGS) 2241f89315SRuslan ErmilovCFLAGS+=${DEBUG_FLAGS} 238eba8cd8SMarcel MoolenaarCXXFLAGS+=${DEBUG_FLAGS} 24770ac3b2SJohn Birrell 2583cb5baeSMax Khon.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" 26770ac3b2SJohn BirrellCTFFLAGS+= -g 27770ac3b2SJohn Birrell.endif 2841f89315SRuslan Ermilov.endif 2941f89315SRuslan Ermilov 3042f8c5b5SEd Maste.if defined(PROG_CXX) 3142f8c5b5SEd MastePROG= ${PROG_CXX} 3242f8c5b5SEd Maste.endif 3342f8c5b5SEd Maste 346e521732SEd Maste.if !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) 3542f8c5b5SEd MasteMK_DEBUG_FILES= no 3642f8c5b5SEd Maste.endif 3742f8c5b5SEd Maste 38bf81eb3cSEd Maste# ELF hardening knobs 39bf81eb3cSEd Maste.if ${MK_BIND_NOW} != "no" 40bf81eb3cSEd MasteLDFLAGS+= -Wl,-znow 41bf81eb3cSEd Maste.endif 42447b492eSEd Maste.if ${MK_PIE} != "no" && (!defined(NO_SHARED) || ${NO_SHARED:tl} == "no") 43bcf99d2dSEd MasteCFLAGS+= -fPIE 44bcf99d2dSEd MasteCXXFLAGS+= -fPIE 45bcf99d2dSEd MasteLDFLAGS+= -pie 46bcf99d2dSEd Maste.endif 47fc191b11SEd Maste.if ${MK_RETPOLINE} != "no" 48e5c6deceSEd Maste.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline} 49fc191b11SEd MasteCFLAGS+= -mretpoline 50fc191b11SEd MasteCXXFLAGS+= -mretpoline 5114608708SEd Maste# retpolineplt is broken with static linking (PR 233336) 52447b492eSEd Maste.if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no" 53fc191b11SEd MasteLDFLAGS+= -Wl,-zretpolineplt 54fc191b11SEd Maste.endif 55e5c6deceSEd Maste.else 56e5c6deceSEd Maste.warning Retpoline requested but not supported by compiler or linker 57e5c6deceSEd Maste.endif 5814608708SEd Maste.endif 59fc191b11SEd Maste 6041f89315SRuslan Ermilov.if defined(CRUNCH_CFLAGS) 613c9b8563SGordon TetlowCFLAGS+=${CRUNCH_CFLAGS} 6242f8c5b5SEd Maste.else 6342f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ 6442f8c5b5SEd Maste empty(DEBUG_FLAGS:M-gdwarf-*) 65de6feefdSJohn BaldwinCFLAGS+= ${DEBUG_FILES_CFLAGS} 6642f8c5b5SEd MasteCTFFLAGS+= -g 6742f8c5b5SEd Maste.endif 6841f89315SRuslan Ermilov.endif 69afe61c15SRodney W. Grimes 70e82b0b99SJordan K. Hubbard.if !defined(DEBUG_FLAGS) 71afe61c15SRodney W. GrimesSTRIP?= -s 72e82b0b99SJordan K. Hubbard.endif 73afe61c15SRodney W. Grimes 74dc6d22c9SBaptiste Daroussin.if defined(NO_ROOT) 75dc6d22c9SBaptiste Daroussin.if !defined(TAGS) || ! ${TAGS:Mpackage=*} 764c1a82ceSEmmanuel VadotTAGS+= package=${PACKAGE:Uutilities} 77dc6d22c9SBaptiste Daroussin.endif 78dc6d22c9SBaptiste DaroussinTAG_ARGS= -T ${TAGS:[*]:S/ /,/g} 79dc6d22c9SBaptiste Daroussin.endif 80dc6d22c9SBaptiste Daroussin 81a335df48SConrad Meyer.if defined(NO_SHARED) && ${NO_SHARED:tl} != "no" 823585b293SGarrett WollmanLDFLAGS+= -static 833585b293SGarrett Wollman.endif 84afe61c15SRodney W. Grimes 85*982f1fc2SKyle Evans# clang currently defaults to dynamic TLS for mips64 binaries 86*982f1fc2SKyle Evans.if ${MACHINE_ARCH:Mmips64*} && ${COMPILER_TYPE} == "clang" 87*982f1fc2SKyle EvansCFLAGS+= -ftls-model=initial-exec 88*982f1fc2SKyle Evans.endif 89*982f1fc2SKyle Evans 9042f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 9142f8c5b5SEd MastePROG_FULL=${PROG}.full 9242f8c5b5SEd Maste# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory 9342f8c5b5SEd Maste.if defined(BINDIR) && (\ 9442f8c5b5SEd Maste ${BINDIR} == "/bin" ||\ 955ea4b6d5SEd Maste ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\ 9642f8c5b5SEd Maste ${BINDIR} == "/sbin" ||\ 97b60371f8SEd Maste ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin" ||\ 98b60371f8SEd Maste ${BINDIR} == "/usr/lib" \ 9942f8c5b5SEd Maste ) 10042f8c5b5SEd MasteDEBUGFILEDIR= ${DEBUGDIR}${BINDIR} 10142f8c5b5SEd Maste.else 10242f8c5b5SEd MasteDEBUGFILEDIR?= ${BINDIR}/.debug 103a324b0f0SBryan Drewery.endif 104a324b0f0SBryan Drewery.if !exists(${DESTDIR}${DEBUGFILEDIR}) 10542f8c5b5SEd MasteDEBUGMKDIR= 10642f8c5b5SEd Maste.endif 10742f8c5b5SEd Maste.else 10842f8c5b5SEd MastePROG_FULL= ${PROG} 10947bf8a5cSRuslan Ermilov.endif 11047bf8a5cSRuslan Ermilov 111afe61c15SRodney W. Grimes.if defined(PROG) 112a0dc5970SEd MastePROGNAME?= ${PROG} 11342f8c5b5SEd Maste 114afe61c15SRodney W. Grimes.if defined(SRCS) 115afe61c15SRodney W. Grimes 1162506d700SSimon J. GerratyOBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g} 117afe61c15SRodney W. Grimes 1184f2fac37SJonathan Anderson# LLVM bitcode / textual IR representations of the program 1194f2fac37SJonathan AndersonBCOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g} 1204f2fac37SJonathan AndersonLLOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g} 1214f2fac37SJonathan Anderson 122c2c48445SRui Paulo.if target(beforelinking) 123593c0b49SMark Johnstonbeforelinking: ${OBJS} 12442f8c5b5SEd Maste${PROG_FULL}: beforelinking 125c2c48445SRui Paulo.endif 1265852ae2dSBryan Drewery${PROG_FULL}: ${OBJS} 1275d68012aSRuslan Ermilov.if defined(PROG_CXX) 1289160419cSBryan Drewery ${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \ 1299160419cSBryan Drewery ${OBJS} ${LDADD} 1305d68012aSRuslan Ermilov.else 1319160419cSBryan Drewery ${CC:N${CCACHE_BIN}} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} \ 1329160419cSBryan Drewery ${LDADD} 1335d68012aSRuslan Ermilov.endif 13483cb5baeSMax Khon.if ${MK_CTF} != "no" 135cd49c2e8SMax Khon ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 136cd49c2e8SMax Khon.endif 1375d68012aSRuslan Ermilov 13884aac273SHartmut Brandt.else # !defined(SRCS) 139afe61c15SRodney W. Grimes 1405d68012aSRuslan Ermilov.if !target(${PROG}) 14147bf8a5cSRuslan Ermilov.if defined(PROG_CXX) 14247bf8a5cSRuslan ErmilovSRCS= ${PROG}.cc 14347bf8a5cSRuslan Ermilov.else 144afe61c15SRodney W. GrimesSRCS= ${PROG}.c 14547bf8a5cSRuslan Ermilov.endif 146afe61c15SRodney W. Grimes 147a4c39c7aSBruce Evans# Always make an intermediate object file because: 148a4c39c7aSBruce Evans# - it saves time rebuilding when only the library has changed 149a4c39c7aSBruce Evans# - the name of the object gets put into the executable symbol table instead of 150a4c39c7aSBruce Evans# the name of a variable temporary object. 151a4c39c7aSBruce Evans# - it's useful to keep objects around for crunching. 1527f7fc25bSMark JohnstonOBJS+= ${PROG}.o 1534f2fac37SJonathan AndersonBCOBJS+= ${PROG}.bc 1544f2fac37SJonathan AndersonLLOBJS+= ${PROG}.ll 1554f2fac37SJonathan AndersonCLEANFILES+= ${PROG}.o ${PROG}.bc ${PROG}.ll 156f5c75051SEivind Eklund 157c2c48445SRui Paulo.if target(beforelinking) 158593c0b49SMark Johnstonbeforelinking: ${OBJS} 15942f8c5b5SEd Maste${PROG_FULL}: beforelinking 160c2c48445SRui Paulo.endif 1615852ae2dSBryan Drewery${PROG_FULL}: ${OBJS} 162f8ba1555SRuslan Ermilov.if defined(PROG_CXX) 1639160419cSBryan Drewery ${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \ 1649160419cSBryan Drewery ${OBJS} ${LDADD} 165f8ba1555SRuslan Ermilov.else 1669160419cSBryan Drewery ${CC:N${CCACHE_BIN}} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} \ 1679160419cSBryan Drewery ${LDADD} 168afe61c15SRodney W. Grimes.endif 16983cb5baeSMax Khon.if ${MK_CTF} != "no" 170cd49c2e8SMax Khon ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 171cd49c2e8SMax Khon.endif 17242f8c5b5SEd Maste.endif # !target(${PROG}) 173f5c75051SEivind Eklund 1740d947ed1SEd Maste.endif # !defined(SRCS) 175afe61c15SRodney W. Grimes 17642f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 1775852ae2dSBryan Drewery${PROG}: ${PROG_FULL} ${PROGNAME}.debug 17842f8c5b5SEd Maste ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROGNAME}.debug \ 17942f8c5b5SEd Maste ${PROG_FULL} ${.TARGET} 18042f8c5b5SEd Maste 1815852ae2dSBryan Drewery${PROGNAME}.debug: ${PROG_FULL} 18242f8c5b5SEd Maste ${OBJCOPY} --only-keep-debug ${PROG_FULL} ${.TARGET} 18342f8c5b5SEd Maste.endif 18442f8c5b5SEd Maste 185e4195e2eSJonathan Anderson.if defined(LLVM_LINK) 186e4195e2eSJonathan Anderson${PROG_FULL}.bc: ${BCOBJS} 187e4195e2eSJonathan Anderson ${LLVM_LINK} -o ${.TARGET} ${BCOBJS} 188e4195e2eSJonathan Anderson 189e4195e2eSJonathan Anderson${PROG_FULL}.ll: ${LLOBJS} 190e4195e2eSJonathan Anderson ${LLVM_LINK} -S -o ${.TARGET} ${LLOBJS} 191e4195e2eSJonathan Anderson 1926f6b66a8SJonathan AndersonCLEANFILES+= ${PROG_FULL}.bc ${PROG_FULL}.ll 193e4195e2eSJonathan Anderson.endif # defined(LLVM_LINK) 194e4195e2eSJonathan Anderson 195e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" && !defined(MAN) && \ 196862d3deaSRuslan Ermilov !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ 197afe61c15SRodney W. Grimes !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ 1988b4f1f91SBrooks Davis !defined(MAN7) && !defined(MAN8) && !defined(MAN9) 19919ea15a1SRuslan ErmilovMAN= ${PROG}.1 20019ea15a1SRuslan ErmilovMAN1= ${MAN} 201afe61c15SRodney W. Grimes.endif 2020d947ed1SEd Maste.endif # defined(PROG) 203afe61c15SRodney W. Grimes 2047750ad47SMarcel Moolenaar.if defined(_SKIP_BUILD) 2057750ad47SMarcel Moolenaarall: 2067750ad47SMarcel Moolenaar.else 2071bd4272fSBryan Dreweryall: ${PROG} ${SCRIPTS} 208e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 209f1702f87SBryan Dreweryall: all-man 210862d3deaSRuslan Ermilov.endif 2117750ad47SMarcel Moolenaar.endif 212afe61c15SRodney W. Grimes 21341f89315SRuslan Ermilov.if defined(PROG) 214e4195e2eSJonathan AndersonCLEANFILES+= ${PROG} ${PROG}.bc ${PROG}.ll 21542f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 2166f6b66a8SJonathan AndersonCLEANFILES+= ${PROG_FULL} ${PROGNAME}.debug 21742f8c5b5SEd Maste.endif 21841f89315SRuslan Ermilov.endif 21941f89315SRuslan Ermilov 22041f89315SRuslan Ermilov.if defined(OBJS) 221e4195e2eSJonathan AndersonCLEANFILES+= ${OBJS} ${BCOBJS} ${LLOBJS} 22241f89315SRuslan Ermilov.endif 223afe61c15SRodney W. Grimes 22451fa76c4SRuslan Ermilov.include <bsd.libnames.mk> 22551fa76c4SRuslan Ermilov 226218a2cd2SBruce Evans.if defined(PROG) 227799483e4SBryan Drewery.if !defined(NO_EXTRADEPEND) 228663e9677SBruce Evans_EXTRADEPEND: 22951fa76c4SRuslan Ermilov.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib) 23051fa76c4SRuslan Ermilov.if defined(DPADD) && !empty(DPADD) 23137fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${DPADD} >> ${DEPENDFILE} 23251fa76c4SRuslan Ermilov.endif 23351fa76c4SRuslan Ermilov.else 23437fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE} 2357273339dSWarner Losh.if defined(PROG_CXX) 23663e4d6f7SWarner Losh.if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++) 23737fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} 238d515c63dSDimitry Andric.else 23937fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} 240f8ba1555SRuslan Ermilov.endif 2418c05a446SPeter Wemm.endif 24251fa76c4SRuslan Ermilov.endif 243799483e4SBryan Drewery.endif # !defined(NO_EXTRADEPEND) 244d515c63dSDimitry Andric.endif 245663e9677SBruce Evans 246afe61c15SRodney W. Grimes.if !target(install) 247afe61c15SRodney W. Grimes 248212acbefSRuslan Ermilov.if defined(PRECIOUSPROG) 24900fbd407SRuslan Ermilov.if !defined(NO_FSCHG) 250dee651ebSRuslan ErmilovINSTALLFLAGS+= -fschg 251dee651ebSRuslan Ermilov.endif 252212acbefSRuslan ErmilovINSTALLFLAGS+= -S 253212acbefSRuslan Ermilov.endif 254dee651ebSRuslan Ermilov 255e902c1bbSTim Vanderhoek_INSTALLFLAGS:= ${INSTALLFLAGS} 256e902c1bbSTim Vanderhoek.for ie in ${INSTALLFLAGS_EDIT} 257e902c1bbSTim Vanderhoek_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} 258e902c1bbSTim Vanderhoek.endfor 259e902c1bbSTim Vanderhoek 26051fa76c4SRuslan Ermilov.if !target(realinstall) && !defined(INTERNALPROG) 26187829387SRuslan Ermilovrealinstall: _proginstall 262badb7c1cSRuslan Ermilov.ORDER: beforeinstall _proginstall 26387829387SRuslan Ermilov_proginstall: 264afe61c15SRodney W. Grimes.if defined(PROG) 265dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 26695f8c826SRuslan Ermilov ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME} 26742f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 26842f8c5b5SEd Maste.if defined(DEBUGMKDIR) 269b626f5a7SGlen Barber ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/ 27042f8c5b5SEd Maste.endif 271dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \ 27242f8c5b5SEd Maste ${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug 27342f8c5b5SEd Maste.endif 27495f8c826SRuslan Ermilov.endif 27584aac273SHartmut Brandt.endif # !target(realinstall) 276afe61c15SRodney W. Grimes 277f7ee8cfeSRuslan Ermilov.if defined(SCRIPTS) && !empty(SCRIPTS) 278f7ee8cfeSRuslan Ermilovrealinstall: _scriptsinstall 279badb7c1cSRuslan Ermilov.ORDER: beforeinstall _scriptsinstall 280f7ee8cfeSRuslan Ermilov 281f7ee8cfeSRuslan ErmilovSCRIPTSDIR?= ${BINDIR} 282f7ee8cfeSRuslan ErmilovSCRIPTSOWN?= ${BINOWN} 283f7ee8cfeSRuslan ErmilovSCRIPTSGRP?= ${BINGRP} 284f7ee8cfeSRuslan ErmilovSCRIPTSMODE?= ${BINMODE} 285f7ee8cfeSRuslan Ermilov 286116d4508SSimon J. GerratySTAGE_AS_SETS+= scripts 287116d4508SSimon J. Gerratystage_as.scripts: ${SCRIPTS} 288116d4508SSimon J. GerratyFLAGS.stage_as.scripts= -m ${SCRIPTSMODE} 289116d4508SSimon J. GerratySTAGE_FILES_DIR.scripts= ${STAGE_OBJTOP} 290f7ee8cfeSRuslan Ermilov.for script in ${SCRIPTS} 291f7ee8cfeSRuslan Ermilov.if defined(SCRIPTSNAME) 292f7ee8cfeSRuslan ErmilovSCRIPTSNAME_${script:T}?= ${SCRIPTSNAME} 293f7ee8cfeSRuslan Ermilov.else 294f7ee8cfeSRuslan ErmilovSCRIPTSNAME_${script:T}?= ${script:T:R} 295f7ee8cfeSRuslan Ermilov.endif 296f7ee8cfeSRuslan ErmilovSCRIPTSDIR_${script:T}?= ${SCRIPTSDIR} 297f7ee8cfeSRuslan ErmilovSCRIPTSOWN_${script:T}?= ${SCRIPTSOWN} 298f7ee8cfeSRuslan ErmilovSCRIPTSGRP_${script:T}?= ${SCRIPTSGRP} 299f7ee8cfeSRuslan ErmilovSCRIPTSMODE_${script:T}?= ${SCRIPTSMODE} 300116d4508SSimon J. GerratySTAGE_AS_${script:T}= ${SCRIPTSDIR_${script:T}}/${SCRIPTSNAME_${script:T}} 301a7aaf57eSRuslan Ermilov_scriptsinstall: _SCRIPTSINS_${script:T} 302a7aaf57eSRuslan Ermilov_SCRIPTSINS_${script:T}: ${script} 303dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS} -o ${SCRIPTSOWN_${.ALLSRC:T}} \ 304f7ee8cfeSRuslan Ermilov -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \ 3054367bda6SRuslan Ermilov ${.ALLSRC} \ 306f7ee8cfeSRuslan Ermilov ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}} 307f7ee8cfeSRuslan Ermilov.endfor 308f7ee8cfeSRuslan Ermilov.endif 309f7ee8cfeSRuslan Ermilov 3108479adc1SRuslan ErmilovNLSNAME?= ${PROG} 3118479adc1SRuslan Ermilov.include <bsd.nls.mk> 3128479adc1SRuslan Ermilov 3139b4f4918SBaptiste Daroussin.include <bsd.confs.mk> 314af2dc868SRuslan Ermilov.include <bsd.files.mk> 3155d862037SRuslan Ermilov.include <bsd.incs.mk> 316fa8c921eSBrooks Davis 317fa8c921eSBrooks DavisLINKOWN?= ${BINOWN} 318fa8c921eSBrooks DavisLINKGRP?= ${BINGRP} 319fa8c921eSBrooks DavisLINKMODE?= ${BINMODE} 32084f94a79SRuslan Ermilov.include <bsd.links.mk> 321c7b111cbSRuslan Ermilov 322e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 323f1702f87SBryan Dreweryrealinstall: maninstall 324f1702f87SBryan Drewery.ORDER: beforeinstall maninstall 32587829387SRuslan Ermilov.endif 32687829387SRuslan Ermilov 327abb02fa2SBryan Drewery.endif # !target(install) 328afe61c15SRodney W. Grimes 329e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 330afe61c15SRodney W. Grimes.include <bsd.man.mk> 33169b87d3eSEivind Eklund.endif 33269b87d3eSEivind Eklund 33338f8fddfSEnji Cooper.if defined(HAS_TESTS) 33438f8fddfSEnji CooperMAKE+= MK_MAKE_CHECK_USE_SANDBOX=yes 33538f8fddfSEnji CooperSUBDIR_TARGETS+= check 33638f8fddfSEnji CooperTESTS_LD_LIBRARY_PATH+= ${.OBJDIR} 33738f8fddfSEnji CooperTESTS_PATH+= ${.OBJDIR} 33838f8fddfSEnji Cooper.endif 33938f8fddfSEnji Cooper 340d7beff08SBryan Drewery.if defined(PROG) 341d7beff08SBryan DreweryOBJS_DEPEND_GUESS+= ${SRCS:M*.h} 34288fe1f7aSBryan Drewery.endif 34388fe1f7aSBryan Drewery 34488fe1f7aSBryan Drewery.include <bsd.dep.mk> 345aae63957SBryan Drewery.include <bsd.clang-analyze.mk> 346cd9a2f5cSJordan K. Hubbard.include <bsd.obj.mk> 347d510ecb4SKris Kennaway.include <bsd.sys.mk> 348