From 28afeac09e15c9983021d7afb7af523f8f62c5fa Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 11 Jan 2008 16:03:38 +0000 Subject: Add sys.mk to define system locations. --- mk/lib.mk | 17 +---------------- mk/os.mk | 3 --- mk/prog.mk | 4 +--- mk/sys.mk | 22 ++++++++++++++++++++++ 4 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 mk/sys.mk (limited to 'mk') 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 -- cgit v1.2.3