summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 28d8bf713a00c..e27f3bafa163a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.99 2017/08/13 20:12:53 sjg Exp $
+# $Id: Makefile,v 1.104 2020/02/06 01:33:54 sjg Exp $
PROG= bmake
@@ -56,6 +56,7 @@ SRCS+= \
lstSucc.c
.-include "VERSION"
+.-include "Makefile.inc"
# this file gets generated by configure
.-include "Makefile.config"
@@ -77,11 +78,23 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
-# meta mode can be useful even without filemon
+# meta mode can be useful even without filemon
+# should be set by now
+USE_FILEMON ?= no
+.if ${USE_FILEMON:tl} != "no"
+.PATH: ${.CURDIR}/filemon
+SRCS+= filemon_${USE_FILEMON}.c
+COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu}
+COPTS.job.c+= ${COPTS.meta.c}
+
+.if ${USE_FILEMON} == "dev"
FILEMON_H ?= /usr/include/dev/filemon/filemon.h
.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
-COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
+COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
.endif
+.endif # USE_FILEMON == dev
+
+.endif # USE_FILEMON
.PATH: ${srcdir}
.PATH: ${srcdir}/lst.lib
@@ -198,6 +211,8 @@ main.o: ${SRCS} ${.CURDIR}/VERSION
.if ${MK_AUTOCONF_MK} == "yes"
CONFIGURE_DEPS += ${.CURDIR}/VERSION
+# we do not need or want the generated makefile
+CONFIGURE_ARGS += --without-makefile
.include <autoconf.mk>
.endif
SHARE_MK?=${SHAREDIR}/mk