2008-01-06 00:55:55 +05:30
|
|
|
# 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-10 22:05:59 +05:30
|
|
|
|
2008-01-11 01:20:01 +05:30
|
|
|
_SUBOS_SH= case `uname -s` in \
|
|
|
|
*BSD|DragonFly) echo "BSD";; \
|
|
|
|
*) uname -s;; \
|
|
|
|
esac
|
|
|
|
_SUBOS!= ${_SUBOS_SH}
|
2008-01-10 22:05:59 +05:30
|
|
|
SUBOS?= ${_SUBOS}$(shell ${_SUBOS_SH})
|
2008-01-06 00:55:55 +05:30
|
|
|
|
|
|
|
_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-01-06 00:55:55 +05:30
|
|
|
|
|
|
|
_DEF_SH= case `uname -s` in Linux) echo "-D_XOPEN_SOURCE=600 -D_BSD_SOURCE";; *) echo;; esac
|
2008-01-09 17:14:43 +05:30
|
|
|
_DEF!= ${_DEF_SH}
|
|
|
|
CFLAGS+= ${_DEF}$(shell ${_DEF_SH})
|
2008-01-06 00:55:55 +05:30
|
|
|
|
|
|
|
_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})
|
2008-01-06 00:55:55 +05:30
|
|
|
|
|
|
|
_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})
|