Add sys.mk to define system locations.
This commit is contained in:
parent
abde759d5b
commit
28afeac09e
14
man/Makefile
14
man/Makefile
@ -1,4 +1,3 @@
|
||||
DIR= /usr/share/man
|
||||
_MAN3_SH= ls -1 *.3
|
||||
_MAN3!= ${_MAN3_SH}
|
||||
MAN3= ${_MAN3}$(shell ${_MAN3_SH})
|
||||
@ -14,23 +13,24 @@ MAKE_LINKS= suffix=$${man\#*.}; \
|
||||
-n -e '/^\.Sh NAME$$/,/\.Sh/ s/\.Nm //p' $${man}`; do \
|
||||
if test "$${link}" != "$${prefix}" ; then \
|
||||
ln -sf $${man} \
|
||||
${DESTDIR}/${DIR}/man$${suffix}/$${link}.$${suffix} ; \
|
||||
${DESTDIR}/${MANDIR}$${suffix}/$${link}.$${suffix} ; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
INSTALL?= install
|
||||
MK= ../mk
|
||||
include ${MK}/sys.mk
|
||||
|
||||
all:
|
||||
|
||||
install:
|
||||
${INSTALL} -d ${DESTDIR}/${DIR}/man3
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}3
|
||||
for man in ${MAN3}; do \
|
||||
${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man3 || exit $$?; \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}3 || exit $$?; \
|
||||
${MAKE_LINKS} \
|
||||
done
|
||||
${INSTALL} -d ${DESTDIR}/${DIR}/man8
|
||||
${INSTALL} -d ${DESTDIR}/${MANDIR}8
|
||||
for man in ${MAN8}; do \
|
||||
${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man8 || exit $$?; \
|
||||
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}8 || exit $$?; \
|
||||
${MAKE_LINKS} \
|
||||
done
|
||||
|
||||
|
17
mk/lib.mk
17
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
|
||||
|
3
mk/os.mk
3
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
|
||||
|
@ -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
|
||||
|
22
mk/sys.mk
Normal file
22
mk/sys.mk
Normal file
@ -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
|
@ -7,6 +7,7 @@ BOOTDIR= ${LEVELDIR}/boot
|
||||
DEFAULTDIR= ${LEVELDIR}/default
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/sys.mk
|
||||
include ${MK}/os.mk
|
||||
include Makefile.${OS}
|
||||
include Makefile.${SUBOS}
|
||||
|
Loading…
Reference in New Issue
Block a user