diff options
Diffstat (limited to 'src/os.mk')
-rw-r--r-- | src/os.mk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/os.mk b/src/os.mk new file mode 100644 index 00000000..6b8b56d9 --- /dev/null +++ b/src/os.mk @@ -0,0 +1,24 @@ +# Copyright 2008 Roy Marples + +# Generic definitions + +_OS_SH= u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac +_OS!= $(_OS_SH) +OS?= $(_OS)$(shell $(_OS_SH)) + +_LIBNAME_SH= l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac +_LIBNAME!= $(_LIBNAME_SH) +LIBNAME?= $(_LIBNAME)$(shell $(_LIBNAME_SH)) +RC_LIB= /$(LIB)/rc + +_DEF_SH= case `uname -s` in Linux) echo "-D_XOPEN_SOURCE=600 -D_BSD_SOURCE";; *) echo;; esac +_DEF!= $(_DEF_SH) +CPPFLAGS+= $(_DEF)$(shell $(_DEF_SH)) + +_LIBDL_SH= case `uname -s` in Linux) echo "-Wl,-Bdynamic -ldl";; *) echo;; esac +_LIBDL!= $(_LIBDL_SH) +LIBDL?= $(_LIBDL)$(shell $(_LIBDL_SH)) + +_LIBKVM_SH= case `uname -s` in *BSD) echo "-lkvm";; *) echo;; esac +_LIBKVM!= $(_LIBKVM_SH) +LIBKVM?= $(_LIBKVM)$(shell $(_LIBKVM_SH)) |