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 60*79f59915SJohn Baldwin.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" 61*79f59915SJohn BaldwinCFLAGS += -mno-relax 62*79f59915SJohn Baldwin.endif 63*79f59915SJohn Baldwin 6441f89315SRuslan Ermilov.if defined(CRUNCH_CFLAGS) 653c9b8563SGordon TetlowCFLAGS+=${CRUNCH_CFLAGS} 6642f8c5b5SEd Maste.else 6742f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ 6842f8c5b5SEd Maste empty(DEBUG_FLAGS:M-gdwarf-*) 69de6feefdSJohn BaldwinCFLAGS+= ${DEBUG_FILES_CFLAGS} 7042f8c5b5SEd MasteCTFFLAGS+= -g 7142f8c5b5SEd Maste.endif 7241f89315SRuslan Ermilov.endif 73afe61c15SRodney W. Grimes 74e82b0b99SJordan K. Hubbard.if !defined(DEBUG_FLAGS) 75afe61c15SRodney W. GrimesSTRIP?= -s 76e82b0b99SJordan K. Hubbard.endif 77afe61c15SRodney W. Grimes 78dc6d22c9SBaptiste Daroussin.if defined(NO_ROOT) 79dc6d22c9SBaptiste Daroussin.if !defined(TAGS) || ! ${TAGS:Mpackage=*} 804c1a82ceSEmmanuel VadotTAGS+= package=${PACKAGE:Uutilities} 81dc6d22c9SBaptiste Daroussin.endif 82dc6d22c9SBaptiste DaroussinTAG_ARGS= -T ${TAGS:[*]:S/ /,/g} 83dc6d22c9SBaptiste Daroussin.endif 84dc6d22c9SBaptiste Daroussin 85a335df48SConrad Meyer.if defined(NO_SHARED) && ${NO_SHARED:tl} != "no" 863585b293SGarrett WollmanLDFLAGS+= -static 873585b293SGarrett Wollman.endif 88afe61c15SRodney W. Grimes 89982f1fc2SKyle Evans# clang currently defaults to dynamic TLS for mips64 binaries 90982f1fc2SKyle Evans.if ${MACHINE_ARCH:Mmips64*} && ${COMPILER_TYPE} == "clang" 91982f1fc2SKyle EvansCFLAGS+= -ftls-model=initial-exec 92982f1fc2SKyle Evans.endif 93982f1fc2SKyle Evans 9442f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 9542f8c5b5SEd MastePROG_FULL=${PROG}.full 9642f8c5b5SEd Maste# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory 9742f8c5b5SEd Maste.if defined(BINDIR) && (\ 9842f8c5b5SEd Maste ${BINDIR} == "/bin" ||\ 995ea4b6d5SEd Maste ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\ 10042f8c5b5SEd Maste ${BINDIR} == "/sbin" ||\ 101b60371f8SEd Maste ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin" ||\ 102b60371f8SEd Maste ${BINDIR} == "/usr/lib" \ 10342f8c5b5SEd Maste ) 10442f8c5b5SEd MasteDEBUGFILEDIR= ${DEBUGDIR}${BINDIR} 10542f8c5b5SEd Maste.else 10642f8c5b5SEd MasteDEBUGFILEDIR?= ${BINDIR}/.debug 107a324b0f0SBryan Drewery.endif 108a324b0f0SBryan Drewery.if !exists(${DESTDIR}${DEBUGFILEDIR}) 10942f8c5b5SEd MasteDEBUGMKDIR= 11042f8c5b5SEd Maste.endif 11142f8c5b5SEd Maste.else 11242f8c5b5SEd MastePROG_FULL= ${PROG} 11347bf8a5cSRuslan Ermilov.endif 11447bf8a5cSRuslan Ermilov 115afe61c15SRodney W. Grimes.if defined(PROG) 116a0dc5970SEd MastePROGNAME?= ${PROG} 11742f8c5b5SEd Maste 118afe61c15SRodney W. Grimes.if defined(SRCS) 119afe61c15SRodney W. Grimes 1202506d700SSimon J. GerratyOBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g} 121afe61c15SRodney W. Grimes 1224f2fac37SJonathan Anderson# LLVM bitcode / textual IR representations of the program 1234f2fac37SJonathan AndersonBCOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g} 1244f2fac37SJonathan AndersonLLOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g} 1254f2fac37SJonathan Anderson 126c2c48445SRui Paulo.if target(beforelinking) 127593c0b49SMark Johnstonbeforelinking: ${OBJS} 12842f8c5b5SEd Maste${PROG_FULL}: beforelinking 129c2c48445SRui Paulo.endif 1305852ae2dSBryan Drewery${PROG_FULL}: ${OBJS} 1315d68012aSRuslan Ermilov.if defined(PROG_CXX) 1329160419cSBryan Drewery ${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \ 1339160419cSBryan Drewery ${OBJS} ${LDADD} 1345d68012aSRuslan Ermilov.else 1359160419cSBryan Drewery ${CC:N${CCACHE_BIN}} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} \ 1369160419cSBryan Drewery ${LDADD} 1375d68012aSRuslan Ermilov.endif 13883cb5baeSMax Khon.if ${MK_CTF} != "no" 139cd49c2e8SMax Khon ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 140cd49c2e8SMax Khon.endif 1415d68012aSRuslan Ermilov 14284aac273SHartmut Brandt.else # !defined(SRCS) 143afe61c15SRodney W. Grimes 1445d68012aSRuslan Ermilov.if !target(${PROG}) 14547bf8a5cSRuslan Ermilov.if defined(PROG_CXX) 14647bf8a5cSRuslan ErmilovSRCS= ${PROG}.cc 14747bf8a5cSRuslan Ermilov.else 148afe61c15SRodney W. GrimesSRCS= ${PROG}.c 14947bf8a5cSRuslan Ermilov.endif 150afe61c15SRodney W. Grimes 151a4c39c7aSBruce Evans# Always make an intermediate object file because: 152a4c39c7aSBruce Evans# - it saves time rebuilding when only the library has changed 153a4c39c7aSBruce Evans# - the name of the object gets put into the executable symbol table instead of 154a4c39c7aSBruce Evans# the name of a variable temporary object. 155a4c39c7aSBruce Evans# - it's useful to keep objects around for crunching. 1567f7fc25bSMark JohnstonOBJS+= ${PROG}.o 1574f2fac37SJonathan AndersonBCOBJS+= ${PROG}.bc 1584f2fac37SJonathan AndersonLLOBJS+= ${PROG}.ll 1594f2fac37SJonathan AndersonCLEANFILES+= ${PROG}.o ${PROG}.bc ${PROG}.ll 160f5c75051SEivind Eklund 161c2c48445SRui Paulo.if target(beforelinking) 162593c0b49SMark Johnstonbeforelinking: ${OBJS} 16342f8c5b5SEd Maste${PROG_FULL}: beforelinking 164c2c48445SRui Paulo.endif 1655852ae2dSBryan Drewery${PROG_FULL}: ${OBJS} 166f8ba1555SRuslan Ermilov.if defined(PROG_CXX) 1679160419cSBryan Drewery ${CXX:N${CCACHE_BIN}} ${CXXFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} \ 1689160419cSBryan Drewery ${OBJS} ${LDADD} 169f8ba1555SRuslan Ermilov.else 1709160419cSBryan Drewery ${CC:N${CCACHE_BIN}} ${CFLAGS:N-M*} ${LDFLAGS} -o ${.TARGET} ${OBJS} \ 1719160419cSBryan Drewery ${LDADD} 172afe61c15SRodney W. Grimes.endif 17383cb5baeSMax Khon.if ${MK_CTF} != "no" 174cd49c2e8SMax Khon ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 175cd49c2e8SMax Khon.endif 17642f8c5b5SEd Maste.endif # !target(${PROG}) 177f5c75051SEivind Eklund 1780d947ed1SEd Maste.endif # !defined(SRCS) 179afe61c15SRodney W. Grimes 18042f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 1815852ae2dSBryan Drewery${PROG}: ${PROG_FULL} ${PROGNAME}.debug 18242f8c5b5SEd Maste ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROGNAME}.debug \ 18342f8c5b5SEd Maste ${PROG_FULL} ${.TARGET} 18442f8c5b5SEd Maste 1855852ae2dSBryan Drewery${PROGNAME}.debug: ${PROG_FULL} 18642f8c5b5SEd Maste ${OBJCOPY} --only-keep-debug ${PROG_FULL} ${.TARGET} 18742f8c5b5SEd Maste.endif 18842f8c5b5SEd Maste 189e4195e2eSJonathan Anderson.if defined(LLVM_LINK) 190e4195e2eSJonathan Anderson${PROG_FULL}.bc: ${BCOBJS} 191e4195e2eSJonathan Anderson ${LLVM_LINK} -o ${.TARGET} ${BCOBJS} 192e4195e2eSJonathan Anderson 193e4195e2eSJonathan Anderson${PROG_FULL}.ll: ${LLOBJS} 194e4195e2eSJonathan Anderson ${LLVM_LINK} -S -o ${.TARGET} ${LLOBJS} 195e4195e2eSJonathan Anderson 1966f6b66a8SJonathan AndersonCLEANFILES+= ${PROG_FULL}.bc ${PROG_FULL}.ll 197e4195e2eSJonathan Anderson.endif # defined(LLVM_LINK) 198e4195e2eSJonathan Anderson 199e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" && !defined(MAN) && \ 200862d3deaSRuslan Ermilov !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ 201afe61c15SRodney W. Grimes !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ 2028b4f1f91SBrooks Davis !defined(MAN7) && !defined(MAN8) && !defined(MAN9) 20319ea15a1SRuslan ErmilovMAN= ${PROG}.1 20419ea15a1SRuslan ErmilovMAN1= ${MAN} 205afe61c15SRodney W. Grimes.endif 2060d947ed1SEd Maste.endif # defined(PROG) 207afe61c15SRodney W. Grimes 2087750ad47SMarcel Moolenaar.if defined(_SKIP_BUILD) 2097750ad47SMarcel Moolenaarall: 2107750ad47SMarcel Moolenaar.else 2111bd4272fSBryan Dreweryall: ${PROG} ${SCRIPTS} 212e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 213f1702f87SBryan Dreweryall: all-man 214862d3deaSRuslan Ermilov.endif 2157750ad47SMarcel Moolenaar.endif 216afe61c15SRodney W. Grimes 21741f89315SRuslan Ermilov.if defined(PROG) 218e4195e2eSJonathan AndersonCLEANFILES+= ${PROG} ${PROG}.bc ${PROG}.ll 21942f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 2206f6b66a8SJonathan AndersonCLEANFILES+= ${PROG_FULL} ${PROGNAME}.debug 22142f8c5b5SEd Maste.endif 22241f89315SRuslan Ermilov.endif 22341f89315SRuslan Ermilov 22441f89315SRuslan Ermilov.if defined(OBJS) 225e4195e2eSJonathan AndersonCLEANFILES+= ${OBJS} ${BCOBJS} ${LLOBJS} 22641f89315SRuslan Ermilov.endif 227afe61c15SRodney W. Grimes 22851fa76c4SRuslan Ermilov.include <bsd.libnames.mk> 22951fa76c4SRuslan Ermilov 230218a2cd2SBruce Evans.if defined(PROG) 231799483e4SBryan Drewery.if !defined(NO_EXTRADEPEND) 232663e9677SBruce Evans_EXTRADEPEND: 23351fa76c4SRuslan Ermilov.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib) 23451fa76c4SRuslan Ermilov.if defined(DPADD) && !empty(DPADD) 23537fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${DPADD} >> ${DEPENDFILE} 23651fa76c4SRuslan Ermilov.endif 23751fa76c4SRuslan Ermilov.else 23837fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE} 2397273339dSWarner Losh.if defined(PROG_CXX) 24063e4d6f7SWarner Losh.if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++) 24137fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} 242d515c63dSDimitry Andric.else 24337fd8bc2SJohn Baldwin echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} 244f8ba1555SRuslan Ermilov.endif 2458c05a446SPeter Wemm.endif 24651fa76c4SRuslan Ermilov.endif 247799483e4SBryan Drewery.endif # !defined(NO_EXTRADEPEND) 248d515c63dSDimitry Andric.endif 249663e9677SBruce Evans 250afe61c15SRodney W. Grimes.if !target(install) 251afe61c15SRodney W. Grimes 252212acbefSRuslan Ermilov.if defined(PRECIOUSPROG) 25300fbd407SRuslan Ermilov.if !defined(NO_FSCHG) 254dee651ebSRuslan ErmilovINSTALLFLAGS+= -fschg 255dee651ebSRuslan Ermilov.endif 256212acbefSRuslan ErmilovINSTALLFLAGS+= -S 257212acbefSRuslan Ermilov.endif 258dee651ebSRuslan Ermilov 259e902c1bbSTim Vanderhoek_INSTALLFLAGS:= ${INSTALLFLAGS} 260e902c1bbSTim Vanderhoek.for ie in ${INSTALLFLAGS_EDIT} 261e902c1bbSTim Vanderhoek_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} 262e902c1bbSTim Vanderhoek.endfor 263e902c1bbSTim Vanderhoek 26451fa76c4SRuslan Ermilov.if !target(realinstall) && !defined(INTERNALPROG) 26587829387SRuslan Ermilovrealinstall: _proginstall 266badb7c1cSRuslan Ermilov.ORDER: beforeinstall _proginstall 26787829387SRuslan Ermilov_proginstall: 268afe61c15SRodney W. Grimes.if defined(PROG) 269dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 27095f8c826SRuslan Ermilov ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME} 27142f8c5b5SEd Maste.if ${MK_DEBUG_FILES} != "no" 27242f8c5b5SEd Maste.if defined(DEBUGMKDIR) 273b626f5a7SGlen Barber ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/ 27442f8c5b5SEd Maste.endif 275dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \ 27642f8c5b5SEd Maste ${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug 27742f8c5b5SEd Maste.endif 27895f8c826SRuslan Ermilov.endif 27984aac273SHartmut Brandt.endif # !target(realinstall) 280afe61c15SRodney W. Grimes 281f7ee8cfeSRuslan Ermilov.if defined(SCRIPTS) && !empty(SCRIPTS) 282f7ee8cfeSRuslan Ermilovrealinstall: _scriptsinstall 283badb7c1cSRuslan Ermilov.ORDER: beforeinstall _scriptsinstall 284f7ee8cfeSRuslan Ermilov 285f7ee8cfeSRuslan ErmilovSCRIPTSDIR?= ${BINDIR} 286f7ee8cfeSRuslan ErmilovSCRIPTSOWN?= ${BINOWN} 287f7ee8cfeSRuslan ErmilovSCRIPTSGRP?= ${BINGRP} 288f7ee8cfeSRuslan ErmilovSCRIPTSMODE?= ${BINMODE} 289f7ee8cfeSRuslan Ermilov 290116d4508SSimon J. GerratySTAGE_AS_SETS+= scripts 291116d4508SSimon J. Gerratystage_as.scripts: ${SCRIPTS} 292116d4508SSimon J. GerratyFLAGS.stage_as.scripts= -m ${SCRIPTSMODE} 293116d4508SSimon J. GerratySTAGE_FILES_DIR.scripts= ${STAGE_OBJTOP} 294f7ee8cfeSRuslan Ermilov.for script in ${SCRIPTS} 295f7ee8cfeSRuslan Ermilov.if defined(SCRIPTSNAME) 296f7ee8cfeSRuslan ErmilovSCRIPTSNAME_${script:T}?= ${SCRIPTSNAME} 297f7ee8cfeSRuslan Ermilov.else 298f7ee8cfeSRuslan ErmilovSCRIPTSNAME_${script:T}?= ${script:T:R} 299f7ee8cfeSRuslan Ermilov.endif 300f7ee8cfeSRuslan ErmilovSCRIPTSDIR_${script:T}?= ${SCRIPTSDIR} 301f7ee8cfeSRuslan ErmilovSCRIPTSOWN_${script:T}?= ${SCRIPTSOWN} 302f7ee8cfeSRuslan ErmilovSCRIPTSGRP_${script:T}?= ${SCRIPTSGRP} 303f7ee8cfeSRuslan ErmilovSCRIPTSMODE_${script:T}?= ${SCRIPTSMODE} 304116d4508SSimon J. GerratySTAGE_AS_${script:T}= ${SCRIPTSDIR_${script:T}}/${SCRIPTSNAME_${script:T}} 305a7aaf57eSRuslan Ermilov_scriptsinstall: _SCRIPTSINS_${script:T} 306a7aaf57eSRuslan Ermilov_SCRIPTSINS_${script:T}: ${script} 307dc6d22c9SBaptiste Daroussin ${INSTALL} ${TAG_ARGS} -o ${SCRIPTSOWN_${.ALLSRC:T}} \ 308f7ee8cfeSRuslan Ermilov -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \ 3094367bda6SRuslan Ermilov ${.ALLSRC} \ 310f7ee8cfeSRuslan Ermilov ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}} 311f7ee8cfeSRuslan Ermilov.endfor 312f7ee8cfeSRuslan Ermilov.endif 313f7ee8cfeSRuslan Ermilov 3148479adc1SRuslan ErmilovNLSNAME?= ${PROG} 3158479adc1SRuslan Ermilov.include <bsd.nls.mk> 3168479adc1SRuslan Ermilov 3179b4f4918SBaptiste Daroussin.include <bsd.confs.mk> 318af2dc868SRuslan Ermilov.include <bsd.files.mk> 3195d862037SRuslan Ermilov.include <bsd.incs.mk> 320fa8c921eSBrooks Davis 321fa8c921eSBrooks DavisLINKOWN?= ${BINOWN} 322fa8c921eSBrooks DavisLINKGRP?= ${BINGRP} 323fa8c921eSBrooks DavisLINKMODE?= ${BINMODE} 32484f94a79SRuslan Ermilov.include <bsd.links.mk> 325c7b111cbSRuslan Ermilov 326e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 327f1702f87SBryan Dreweryrealinstall: maninstall 328f1702f87SBryan Drewery.ORDER: beforeinstall maninstall 32987829387SRuslan Ermilov.endif 33087829387SRuslan Ermilov 331abb02fa2SBryan Drewery.endif # !target(install) 332afe61c15SRodney W. Grimes 333e1fe3dbaSRuslan Ermilov.if ${MK_MAN} != "no" 334afe61c15SRodney W. Grimes.include <bsd.man.mk> 33569b87d3eSEivind Eklund.endif 33669b87d3eSEivind Eklund 33738f8fddfSEnji Cooper.if defined(HAS_TESTS) 33838f8fddfSEnji CooperMAKE+= MK_MAKE_CHECK_USE_SANDBOX=yes 33938f8fddfSEnji CooperSUBDIR_TARGETS+= check 34038f8fddfSEnji CooperTESTS_LD_LIBRARY_PATH+= ${.OBJDIR} 34138f8fddfSEnji CooperTESTS_PATH+= ${.OBJDIR} 34238f8fddfSEnji Cooper.endif 34338f8fddfSEnji Cooper 344d7beff08SBryan Drewery.if defined(PROG) 345d7beff08SBryan DreweryOBJS_DEPEND_GUESS+= ${SRCS:M*.h} 34688fe1f7aSBryan Drewery.endif 34788fe1f7aSBryan Drewery 34888fe1f7aSBryan Drewery.include <bsd.dep.mk> 349aae63957SBryan Drewery.include <bsd.clang-analyze.mk> 350cd9a2f5cSJordan K. Hubbard.include <bsd.obj.mk> 351d510ecb4SKris Kennaway.include <bsd.sys.mk> 352