openrc/mk/os.mk

32 lines
892 B
Makefile
Raw Normal View History

# Copyright 2008 Roy Marples
# Generic definitions
2008-01-11 01:20:01 +05:30
_OS_SH= uname -s
_OS!= ${_OS_SH}
OS?= ${_OS}$(shell ${_OS_SH})
2008-01-11 01:20:01 +05:30
_SUBOS_SH= case `uname -s` in \
*BSD|DragonFly) echo "BSD";; \
*) uname -s;; \
esac
_SUBOS!= ${_SUBOS_SH}
SUBOS?= ${_SUBOS}$(shell ${_SUBOS_SH})
_LIBNAME_SH= l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
2008-01-11 01:20:01 +05:30
_LIBNAME!= ${_LIBNAME_SH}
LIBNAME?= ${_LIBNAME}$(shell ${_LIBNAME_SH})
RC_LIB= /$(LIBNAME)/rc
2008-02-20 00:35:18 +05:30
_DEF_SH= case `uname -s` in Linux) echo "-D_BSD_SOURCE -D_XOPEN_SOURCE=600";; *) echo;; esac
2008-01-09 17:14:43 +05:30
_DEF!= ${_DEF_SH}
CFLAGS+= ${_DEF}$(shell ${_DEF_SH})
_LIBDL_SH= case `uname -s` in Linux) echo "-Wl,-Bdynamic -ldl";; *) echo;; esac
2008-01-09 17:14:43 +05:30
_LIBDL!= ${_LIBDL_SH}
LIBDL?= ${_LIBDL}$(shell ${_LIBDL_SH})
_LIBKVM_SH= case `uname -s` in *BSD) echo "-lkvm";; *) echo;; esac
2008-01-09 17:14:43 +05:30
_LIBKVM!= ${_LIBKVM_SH}
LIBKVM?= ${_LIBKVM}$(shell ${_LIBKVM_SH})