aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2022-04-06 10:51:55 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2022-04-06 10:51:55 -0500
commit391d12db48754861b5cecac92ee3321597ee02c1 (patch)
treeb42fad5a31ca342de7b7ecf1fb78784194c1400c /mk
parent0efc1b133e4182bd53cde78153bd8b5cc2e99448 (diff)
migrate fully to meson build system
- drop old build system - move shared include and source files to common directory - drop "rc-" prefix from shared include and source files - move executable-specific code to individual directories under src - adjust top-level .gitignore file for new build system This closes #489.
Diffstat (limited to 'mk')
-rw-r--r--mk/cc.mk44
-rw-r--r--mk/debug.mk23
-rw-r--r--mk/depend.mk21
-rw-r--r--mk/dist.mk50
-rw-r--r--mk/gitignore.mk22
-rw-r--r--mk/gitver.mk8
-rw-r--r--mk/lib.mk77
-rw-r--r--mk/net.mk1
-rw-r--r--mk/os-BSD.mk16
-rw-r--r--mk/os-DragonFly.mk13
-rw-r--r--mk/os-FreeBSD.mk15
-rw-r--r--mk/os-GNU-kFreeBSD.mk18
-rw-r--r--mk/os-GNU.mk15
-rw-r--r--mk/os-Linux.mk40
-rw-r--r--mk/os-NetBSD.mk14
-rw-r--r--mk/os-prefix.mk8
-rw-r--r--mk/os.mk19
-rw-r--r--mk/pam.mk16
-rw-r--r--mk/prog.mk48
-rw-r--r--mk/scripts.mk64
-rw-r--r--mk/subdir.mk38
-rw-r--r--mk/sys.mk71
-rw-r--r--mk/termcap.mk17
23 files changed, 0 insertions, 658 deletions
diff --git a/mk/cc.mk b/mk/cc.mk
deleted file mode 100644
index 5efd5ad8..00000000
--- a/mk/cc.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Setup some good default CFLAGS
-CFLAGS?= -O2 -g
-
-# Default to using the C99 standard
-CSTD?= c99
-ifneq (${CSTD},)
-CFLAGS+= -std=${CSTD}
-endif
-
-# Try and use some good cc flags if we're building from git
-# We don't use -pedantic as it will warn about our perfectly valid
-# use of %m in our logger.
-_CCFLAGS= -Wall -Wextra -Wimplicit -Wshadow -Wformat=2 \
- -Wmissing-prototypes -Wmissing-declarations \
- -Wmissing-noreturn -Wmissing-format-attribute \
- -Wnested-externs \
- -Winline -Wwrite-strings -Wcast-align -Wcast-qual \
- -Wpointer-arith \
- -Wdeclaration-after-statement -Wsequence-point \
- -Werror=implicit-function-declaration
-
-# We should be using -Wredundant-decls, but our library hidden proto stuff
-# gives loads of warnings. I don't fully understand it (the hidden proto,
-# not the warning) so we just silence the warning.
-
-_CC_FLAGS_SH= for f in ${_CCFLAGS}; do \
- if echo "int main(void) { return 0;} " | \
- ${CC} $$f -S -xc -o /dev/null - ; \
- then printf "%s" "$$f "; fi \
- done;
-_CC_FLAGS:= $(shell ${_CC_FLAGS_SH})
-CFLAGS+= ${_CC_FLAGS}
-
-include ${MK}/debug.mk
diff --git a/mk/debug.mk b/mk/debug.mk
deleted file mode 100644
index c7cbe9e8..00000000
--- a/mk/debug.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# rules to enable debugging support
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-_RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac
-_RC_DEBUG:= $(shell ${_RC_DEBUG_SH})
-CPPFLAGS+= ${_RC_DEBUG}
-
-# Should we enable this with a different flag?
-_LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac
-_LD_DEBUG:= $(shell ${_LD_DEBUG_SH})
-LDFLAGS+= ${_LD_DEBUG}
-
-_GGDB_SH= case "${DEBUG}" in "") echo "";; *) echo "-ggdb";; esac
-_GGDB:= $(shell ${_GGDB_SH})
-CFLAGS+= ${_GGDB}
diff --git a/mk/depend.mk b/mk/depend.mk
deleted file mode 100644
index 187592dd..00000000
--- a/mk/depend.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-# Generate .depend
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-CLEANFILES+= .depend
-IGNOREFILES+= .depend
-
-.depend: ${SRCS}
- rm -f .depend
- ${CC} ${LOCAL_CPPFLAGS} ${CPPFLAGS} -MM ${SRCS} > .depend
-
-depend: .depend extra_depend
-
--include .depend
diff --git a/mk/dist.mk b/mk/dist.mk
deleted file mode 100644
index c1e94a59..00000000
--- a/mk/dist.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# rules to make a distribution tarball from a git repo
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-GITREF?= ${VERSION}
-DISTPREFIX?= ${NAME}-${VERSION}
-DISTFILE?= ${DISTPREFIX}.tar.gz
-
-CLEANFILES+= ${NAME}-*.tar.gz
-
-CHANGELOG_LIMIT?= --after="1 year ago"
-
-_SNAP_SH= date -u +%Y%m%d%H%M
-_SNAP:= $(shell ${_SNAP_SH})
-SNAP= ${_SNAP}
-SNAPDIR= ${DISTPREFIX}-${SNAP}
-SNAPFILE= ${SNAPDIR}.tar.gz
-
-changelog:
- git log ${CHANGELOG_LIMIT} --format=full > ChangeLog
-
-dist:
- git archive --prefix=${DISTPREFIX}/ ${GITREF} --output=${DISTFILE}
-
-distcheck: dist
- rm -rf ${DISTPREFIX}
- tar xf ${DISTFILE}
- MAKEFLAGS= $(MAKE) -C ${DISTPREFIX}
- MAKEFLAGS= $(MAKE) -C ${DISTPREFIX} check
- rm -rf ${DISTPREFIX}
-
-snapshot:
- rm -rf /tmp/${SNAPDIR}
- mkdir /tmp/${SNAPDIR}
- cp -RPp * /tmp/${SNAPDIR}
- (cd /tmp/${SNAPDIR}; make clean)
- rm -rf /tmp/${SNAPDIR}/.git 2>/dev/null || true
- tar -cvzpf ${SNAPFILE} -C /tmp ${SNAPDIR}
- rm -rf /tmp/${SNAPDIR}
- ls -l ${SNAPFILE}
-
-snap: snapshot
-
diff --git a/mk/gitignore.mk b/mk/gitignore.mk
deleted file mode 100644
index a0b24cb7..00000000
--- a/mk/gitignore.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# rules to make .gitignore files
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-IGNOREFILES+= ${CLEANFILES}
-
-.PHONY: .gitignore
-
-.gitignore:
- @if test -n "${IGNOREFILES}"; then \
- echo "Ignoring ${IGNOREFILES}"; \
- echo ${IGNOREFILES} | tr ' ' '\n' > .gitignore; \
- fi
-
-ignore: .gitignore
diff --git a/mk/gitver.mk b/mk/gitver.mk
deleted file mode 100644
index 62cae5a4..00000000
--- a/mk/gitver.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-_GITVER_SH= if git rev-parse --short HEAD >/dev/null 2>&1; then \
- printf "."; \
- git rev-parse --short HEAD; \
- else \
- echo ""; \
- fi
-_GITVER:= $(shell ${_GITVER_SH})
-GITVER= ${_GITVER}
diff --git a/mk/lib.mk b/mk/lib.mk
deleted file mode 100644
index eb6fcf4b..00000000
--- a/mk/lib.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-# rules to build a library
-# based on FreeBSD's bsd.lib.mk
-
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR}
-SHLIB_LINK= lib${LIB}.so
-SONAME?= ${SHLIB_NAME}
-
-SOBJS+= ${SRCS:.c=.So}
-
-MKSTATICLIBS?= yes
-ifeq (${MKSTATICLIBS},yes)
-OBJS+= ${SRCS:.c=.o}
-_LIBS+= lib${LIB}.a
-endif
-
-_LIBS+= ${SHLIB_NAME}
-
-CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
-
-%.o: %.c
- ${CC} ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
-
-%.So: %.c
- ${CC} ${PICFLAG} -DPIC ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
-
-all: depend ${_LIBS}
-
-lib${LIB}.a: ${OBJS} ${STATICOBJS}
- @${ECHO} building static library $@
- ${AR} rc $@ $^
- ${RANLIB} $@
-
-${SHLIB_NAME}: ${VERSION_MAP}
-LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
-
-${SHLIB_NAME}: ${SOBJS}
- @${ECHO} building shared library $@
- @rm -f $@ ${SHLIB_LINK}
- @ln -fs $@ ${SHLIB_LINK}
- ${CC} ${LOCAL_CFLAGS} ${CFLAGS} ${LOCAL_LDFLAGS} ${LDFLAGS} -shared -Wl,-x \
- -o $@ -Wl,-soname,${SONAME} \
- ${SOBJS} ${LDADD}
-
-install: all
- ${INSTALL} -d ${DESTDIR}${LIBDIR}
-ifeq (${MKSTATICLIBS},yes)
- ${INSTALL} -m ${LIBMODE} lib${LIB}.a ${DESTDIR}${LIBDIR}
-endif
- ${INSTALL} -m ${LIBMODE} ${SHLIB_NAME} ${DESTDIR}${LIBDIR}
- ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
- ${INSTALL} -d ${DESTDIR}${INCDIR}
- for x in ${INCS}; do ${INSTALL} -m ${INCMODE} $$x ${DESTDIR}${INCDIR}; done
-
-check test::
-
-clean:
- rm -f ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK} ${CLEANFILES}
-
-extra_depend:
- @TMP=depend.$$$$; \
- ${SED} -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.So:/' .depend > $${TMP}; \
- mv $${TMP} .depend
-
-include ${MK}/sys.mk
-include ${MK}/os.mk
-include ${MK}/depend.mk
-include ${MK}/gitignore.mk
diff --git a/mk/net.mk b/mk/net.mk
deleted file mode 100644
index abc198c6..00000000
--- a/mk/net.mk
+++ /dev/null
@@ -1 +0,0 @@
-MKNET?= yes
diff --git a/mk/os-BSD.mk b/mk/os-BSD.mk
deleted file mode 100644
index 43db4d59..00000000
--- a/mk/os-BSD.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-PKG_PREFIX?= /usr/local
-SFX= .BSD.in
-
-LIBKVM?= -lkvm
diff --git a/mk/os-DragonFly.mk b/mk/os-DragonFly.mk
deleted file mode 100644
index 6bd9c29c..00000000
--- a/mk/os-DragonFly.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (c) 2013-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-include ${MK}/os-BSD.mk
diff --git a/mk/os-FreeBSD.mk b/mk/os-FreeBSD.mk
deleted file mode 100644
index 1025921f..00000000
--- a/mk/os-FreeBSD.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-include ${MK}/os-BSD.mk
-
-CPPFLAGS+= -D_BSD_SOURCE
diff --git a/mk/os-GNU-kFreeBSD.mk b/mk/os-GNU-kFreeBSD.mk
deleted file mode 100644
index 8d25a19d..00000000
--- a/mk/os-GNU-kFreeBSD.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2013-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-SFX= .GNU-kFreeBSD.in
-PKG_PREFIX?= /usr
-
-CPPFLAGS+= -D_BSD_SOURCE
-LIBDL= -Wl,-Bdynamic -ldl
-LIBKVM?=
diff --git a/mk/os-GNU.mk b/mk/os-GNU.mk
deleted file mode 100644
index ea22b2fc..00000000
--- a/mk/os-GNU.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-SFX= .GNU.in
-PKG_PREFIX?= /usr
-
-CPPFLAGS+= -D_DEFAULT_SOURCE -DMAXPATHLEN=4096 -DPATH_MAX=4096
-LIBDL= -Wl,-Bdynamic -ldl
diff --git a/mk/os-Linux.mk b/mk/os-Linux.mk
deleted file mode 100644
index 00521c80..00000000
--- a/mk/os-Linux.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-SFX= .Linux.in
-PKG_PREFIX?= /usr
-
-CPPFLAGS+= -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_XOPEN_SOURCE
-LIBDL= -Wl,-Bdynamic -ldl
-
-ifeq (${MKSELINUX},yes)
-CPPFLAGS+= -DHAVE_SELINUX
-LIBSELINUX?= -lselinux
-LDADD += $(LIBSELINUX)
-
-ifneq (${MKPAM},pam)
-# if using selinux but not pam then we need crypt
-LIBCRYPT?= -lcrypt
-LDADD += $(LIBCRYPT)
-endif
-
-endif
-
-ifeq (${MKCAP},yes)
-CPPFLAGS+= -DHAVE_CAP
-LIBCAP?= -lcap
-LDADD += $(LIBCAP)
-endif
-
-ifeq (${MKAUDIT},yes)
-LIBAUDIT?= -laudit
-CPPFLAGS+= -DHAVE_AUDIT
-LDADD+= ${LIBAUDIT}
-endif
diff --git a/mk/os-NetBSD.mk b/mk/os-NetBSD.mk
deleted file mode 100644
index 240949aa..00000000
--- a/mk/os-NetBSD.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-PKG_PREFIX?= /usr/pkg
-include ${MK}/os-BSD.mk
diff --git a/mk/os-prefix.mk b/mk/os-prefix.mk
deleted file mode 100644
index af08c99e..00000000
--- a/mk/os-prefix.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright (c) 2012 William Hubbs <w.d.hubbs@gmail.com>
-# Released under the 2-clause BSD license.
-
-ifeq (${MKPREFIX},yes)
-CPPFLAGS+= -DPREFIX
-PKG_PREFIX?= $(PREFIX)/usr
-SED_EXTRA= -e '/_PATH=.*usr.bin/d'
-endif
diff --git a/mk/os.mk b/mk/os.mk
deleted file mode 100644
index 1ce94152..00000000
--- a/mk/os.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-# Generic definitions
-
-_OS_SH= uname -s | tr '/' '-'
-_OS:= $(shell ${_OS_SH})
-OS?= ${_OS}
-include ${MK}/os-prefix.mk
-include ${MK}/os-${OS}.mk
-
-RC_LIB= /$(LIBNAME)/rc
diff --git a/mk/pam.mk b/mk/pam.mk
deleted file mode 100644
index 199896cc..00000000
--- a/mk/pam.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-ifeq (${MKPAM},pam)
-LIBPAM?= -lpam
-CPPFLAGS+= -DHAVE_PAM
-LDADD+= ${LIBPAM}
-
-ifeq (${MKSELINUX},yes)
-# with selinux, pam_misc is needed too
-LIBPAM_MISC?= -lpam_misc
-LDADD+= ${LIBPAM_MISC}
-endif
-
-PAMDIR?= /etc/pam.d
-PAMMODE?= 0644
-else ifneq (${MKPAM},)
-$(error if MKPAM is defined, it must be "pam")
-endif
diff --git a/mk/prog.mk b/mk/prog.mk
deleted file mode 100644
index 463a9508..00000000
--- a/mk/prog.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-# rules to build a program
-# based on FreeBSD's bsd.prog.mk
-
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-OBJS+= ${SRCS:.c=.o}
-
-# Some systems don't include /lib in their standard link path
-# so we should embed it if different
-# This is currently hardcoded for NetBSD which has two dynamic linkers
-# and we need to use the one in /libexec instead of /usr/libexec
-_DYNLINK_SH= if test "${PREFIX}" = "" && test -e /libexec/ld.elf_so; then \
- echo "-Wl,-dynamic-linker=/libexec/ld.elf_so"; \
- else \
- echo ""; \
- fi
-_DYNLINK:= $(shell ${_DYNLINK_SH})
-LDFLAGS+= ${_DYNLINK}
-LDFLAGS+= -Wl,-rpath=${PREFIX}/${LIBNAME}
-LDFLAGS+= ${PROGLDFLAGS}
-
-CLEANFILES+= ${OBJS} ${PROG}
-
-all: depend ${PROG}
-
-%.o: %.c
- ${CC} ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
-
-${PROG}: ${SCRIPTS} ${OBJS}
- ${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
-
-clean:
- rm -f ${CLEANFILES}
-
-extra_depend:
-
-include ${MK}/sys.mk
-include ${MK}/os.mk
-include ${MK}/depend.mk
-include ${MK}/gitignore.mk
diff --git a/mk/scripts.mk b/mk/scripts.mk
deleted file mode 100644
index 14220916..00000000
--- a/mk/scripts.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-# Install rules for our scripts
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-include ${MK}/sys.mk
-include ${MK}/os.mk
-
-OBJS+= ${SRCS:.in=}
-
-_PKG_SED_SH= if test "${PREFIX}" = "${PKG_PREFIX}"; then echo "-e 's:@PKG_PREFIX@::g'"; else echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; fi
-_PKG_SED:= $(shell ${_PKG_SED_SH})
-_LCL_SED_SH= if test "${PREFIX}" = "${LOCAL_PREFIX}"; then echo "-e 's:@LOCAL_PREFIX@::g'"; else echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; fi
-_LCL_SED:= $(shell ${_LCL_SED_SH})
-
-SED_REPLACE= -e 's:@SHELL@:${SH}:' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' -e 's:@BINDIR@:${BINDIR}:g' -e 's:@SBINDIR@:${SBINDIR}:g' ${_PKG_SED} ${_LCL_SED}
-
-# Tweak our shell scripts
-%.sh: %.sh.in
- ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
-
-%: %.in
- ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
-
-all: ${OBJS} ${TARGETS}
-
-realinstall: ${BIN} ${CONF} ${INC}
- @if test -n "${DIR}"; then \
- ${ECHO} ${INSTALL} -d ${DESTDIR}/${DIR}; \
- ${INSTALL} -d ${DESTDIR}/${DIR} || exit $$?; \
- fi
- @if test -n "${BIN}"; then \
- ${ECHO} ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${DIR}; \
- ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${DIR} || exit $$?; \
- fi
- @if test -n "${INC}"; then \
- ${ECHO} ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${DIR}; \
- ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${DIR} || exit $$?; \
- fi
- @for x in ${CONF}; do \
- if ! test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \
- ${ECHO} ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${DIR}; \
- ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${DIR} || exit $$?; \
- fi; \
- done
-
-install: all realinstall ${INSTALLAFTER}
-
-check test::
-
-# A lot of scripts don't have anything to clean
-# Also, some rm implentation require a file argument regardless of error
-# so we ensure that it has a bogus argument
-CLEANFILES+= ${OBJS}
-clean:
- @if test -n "${CLEANFILES}"; then echo "rm -f ${CLEANFILES}"; rm -f ${CLEANFILES}; fi
-
-include ${MK}/gitignore.mk
diff --git a/mk/subdir.mk b/mk/subdir.mk
deleted file mode 100644
index 6d8ecd98..00000000
--- a/mk/subdir.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Recursive rules
-# Adapted from FreeBSDs bsd.subdir.mk
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-_+_ ?= +
-ECHODIR ?= echo
-_SUBDIR = @${_+_}for x in ${SUBDIR}; do \
- if test -d $$x; then \
- ${ECHODIR} "===> ${DIRPRFX}$$x (${@:realinstall=install})"; \
- cd $$x; \
- ${MAKE} ${@:realinstall=install} \
- DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
- cd ..; \
- fi; \
-done
-
-all:
- ${_SUBDIR}
-clean:
- @if test -n "${CLEANFILES}"; then echo "rm -f ${CLEANFILES}"; rm -f ${CLEANFILES}; fi
- ${_SUBDIR}
-realinstall:
- ${_SUBDIR}
-install: realinstall ${INSTALLAFTER}
-check test::
- ${_SUBDIR}
-depend:
- ${_SUBDIR}
-ignore:
- ${_SUBDIR}
diff --git a/mk/sys.mk b/mk/sys.mk
deleted file mode 100644
index 777b60d9..00000000
--- a/mk/sys.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-# Generic system definitions
-# Copyright (c) 2008-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-AR?= ar
-CP?= cp
-PKG_CONFIG?= pkg-config
-ECHO?= echo
-INSTALL?= install
-RANLIB?= ranlib
-SED?= sed
-SH= /bin/sh
-
-PREFIX?=
-ifeq (${PREFIX},)
-UPREFIX= /usr
-else
-UPREFIX= ${PREFIX}
-ifeq (${MKPREFIX},yes)
-UPREFIX= ${PREFIX}/usr
-endif
-endif
-LOCAL_PREFIX= $(UPREFIX)/local
-
-PICFLAG?= -fPIC
-
-SYSCONFDIR?= ${PREFIX}/etc
-INITDIR?= ${SYSCONFDIR}/init.d
-CONFDIR?= ${SYSCONFDIR}/conf.d
-CONFMODE?= 0644
-LOCALDIR?= ${SYSCONFDIR}/local.d
-SYSCTLDIR?= ${SYSCONFDIR}/sysctl.d
-
-BINDIR?= ${PREFIX}/bin
-BINMODE?= 0755
-
-SBINDIR?= ${PREFIX}/sbin
-SBINMODE?= 0755
-
-INCDIR?= ${UPREFIX}/include
-INCMODE?= 0644
-
-_LIBNAME_SH= case `readlink /lib` in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
-_LIBNAME:= $(shell ${_LIBNAME_SH})
-LIBNAME?= ${_LIBNAME}
-LIBDIR?= ${UPREFIX}/${LIBNAME}
-LIBMODE?= 0644
-
-LIBEXECDIR?= ${PREFIX}/libexec/rc
-PKGCONFIGDIR?= ${UPREFIX}/${LIBNAME}/pkgconfig
-
-MANPREFIX?= ${UPREFIX}/share
-MANDIR?= ${MANPREFIX}/man
-MANMODE?= 0644
-
-BASHCOMPDIR?= ${UPREFIX}/share/bash-completion/completions
-
-DATADIR?= ${UPREFIX}/share/openrc
-DATAMODE?= 0644
-
-DOCDIR?= ${UPREFIX}/share/doc
-DOCMODE?= 0644
-
-ZSHCOMPDIR?= ${UPREFIX}/share/zsh/site-functions
diff --git a/mk/termcap.mk b/mk/termcap.mk
deleted file mode 100644
index 4890e35a..00000000
--- a/mk/termcap.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-ifeq (${MKTERMCAP},ncurses)
-TERMCAP_CFLAGS:= $(shell ${PKG_CONFIG} ncurses --cflags 2> /dev/null)
-LTERMCAP:= $(shell ${PKG_CONFIG} ncurses --libs 2> /dev/null)
-ifeq ($(LTERMCAP),)
-LIBTERMCAP?= -lncurses
-else
-LIBTERMCAP?= $(LTERMCAP)
-endif
-CPPFLAGS+= -DHAVE_TERMCAP ${TERMCAP_CFLAGS}
-LDADD+= ${LIBTERMCAP}
-else ifeq (${MKTERMCAP},termcap)
-LIBTERMCAP?= -ltermcap
-CPPFLAGS+= -DHAVE_TERMCAP
-LDADD+= ${LIBTERMCAP}
-else ifneq (${MKTERMCAP},)
-$(error If MKTERMCAP is defined, it must be ncurses or termcap)
-endif