aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/lib.mk17
-rw-r--r--mk/os.mk3
-rw-r--r--mk/prog.mk4
-rw-r--r--mk/sys.mk22
4 files changed, 24 insertions, 22 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index 7a570ebe..43856bf2 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -3,30 +3,14 @@
# Copyright 2008 Roy Marples
-LIBNAME?= lib
-
SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR}
SHLIB_LINK= lib${LIB}.so
-SHLIBDIR?= /${LIBNAME}
SONAME?= ${SHLIB_NAME}
OBJS+= ${SRCS:.c=.o}
SOBJS+= ${OBJS:.o=.So}
_LIBS= lib${LIB}.a ${SHLIB_NAME}
-ECHO?= echo
-AR?= ar
-RANLIB?= ranlib
-INSTALL?= install
-
-PICFLAG?= -fPIC
-
-INCDIR?= /usr/include
-INCMODE?= 0444
-
-LIBDIR?= /usr/${LIBNAME}
-LIBMODE?= 0444
-
.SUFFIXES: .So
.c.So:
@@ -62,4 +46,5 @@ install: all
clean:
rm -f ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK} ${CLEANFILES}
+include ${MK}/sys.mk
include ${MK}/depend.mk
diff --git a/mk/os.mk b/mk/os.mk
index f2499416..2de3bc61 100644
--- a/mk/os.mk
+++ b/mk/os.mk
@@ -29,6 +29,3 @@ LIBDL?= ${_LIBDL}$(shell ${_LIBDL_SH})
_LIBKVM_SH= case `uname -s` in *BSD) echo "-lkvm";; *) echo;; esac
_LIBKVM!= ${_LIBKVM_SH}
LIBKVM?= ${_LIBKVM}$(shell ${_LIBKVM_SH})
-
-# Maye as well define INSTALL here as everything uses us
-INSTALL?= install
diff --git a/mk/prog.mk b/mk/prog.mk
index 716707c6..75562508 100644
--- a/mk/prog.mk
+++ b/mk/prog.mk
@@ -3,11 +3,8 @@
# Copyright 2008 Roy Marples
-BINDIR?= /sbin
OBJS+= ${SRCS:.c=.o}
-INSTALL?= install
-
all: depend ${PROG}
${PROG}: ${SCRIPTS} ${OBJS}
@@ -16,4 +13,5 @@ ${PROG}: ${SCRIPTS} ${OBJS}
clean:
rm -f ${OBJS} ${PROG} ${CLEANFILES}
+include ${MK}/sys.mk
include ${MK}/depend.mk
diff --git a/mk/sys.mk b/mk/sys.mk
new file mode 100644
index 00000000..471b7064
--- /dev/null
+++ b/mk/sys.mk
@@ -0,0 +1,22 @@
+# Generic system definitions
+# Copyright 2008 Roy Marples
+
+AR?= ar
+ECHO?= echo
+INSTALL?= install
+RANLIB?= ranlib
+
+PICFLAG?= -fPIC
+
+BINDIR?= /sbin
+
+INCDIR?= /usr/include
+INCMODE?= 0444
+
+LIBNAME?= lib
+LIBDIR?= /usr/${LIBNAME}
+LIBMODE?= 0444
+SHLIBDIR?= /${LIBNAME}
+
+MANDIR?= /usr/share/man/man
+MANMODE?= 0444