2008-03-26 17:53:37 +00:00
|
|
|
# Copyright 2008 Roy Marples <roy@marples.name>
|
|
|
|
# All rights reserved. Released under the 2-clause BSD license.
|
2008-01-05 19:25:55 +00:00
|
|
|
|
|
|
|
# Generic definitions
|
|
|
|
|
2008-01-10 19:50:01 +00:00
|
|
|
_OS_SH= uname -s
|
|
|
|
_OS!= ${_OS_SH}
|
|
|
|
OS?= ${_OS}$(shell ${_OS_SH})
|
2008-03-19 15:22:20 +00:00
|
|
|
include ${MK}/os-${OS}.mk
|
2008-01-05 19:25:55 +00:00
|
|
|
|
2008-01-10 19:50:01 +00:00
|
|
|
RC_LIB= /$(LIBNAME)/rc
|
2008-01-05 19:25:55 +00:00
|
|
|
|
2008-02-28 11:08:49 +00:00
|
|
|
_PREFIX_SH= if test -n "${PREFIX}" && test "${PREFIX}" != "/"; then echo "-DPREFIX=\\\"${PREFIX}\\\""; else echo ""; fi
|
|
|
|
_PREFIX!= ${_PREFIX_SH}
|
|
|
|
CFLAGS+= ${_PREFIX}$(shell ${_PREFIX_SH})
|
|
|
|
|
2008-03-19 17:11:50 +00:00
|
|
|
_PKG_PREFIX_SH= if test -n "${PKG_PREFIX}" && test "${PKG_PREFIX}" != "/" && test "${PKG_PREFIX}" != "${PREFIX}"; then echo "-DPKG_PREFIX=\\\"${PKG_PREFIX}\\\""; else echo ""; fi
|
2008-02-28 11:08:49 +00:00
|
|
|
_PKG_PREFIX!= ${_PKG_PREFIX_SH}
|
|
|
|
CFLAGS+= ${_PKG_PREFIX}$(shell ${_PKG_PREFIX_SH})
|
2008-03-19 15:22:20 +00:00
|
|
|
|
2008-03-20 17:52:07 +00:00
|
|
|
_LCL_PREFIX_SH= if test -n "${LOCAL_PREFIX}" && test "${LOCAL_PREFIX}" != "/" && test "${LOCAL_PREFIX}" != "${PREFIX}"; then echo "-DLOCAL_PREFIX=\\\"${LOCAL_PREFIX}\\\""; else echo ""; fi
|
2008-03-19 15:22:20 +00:00
|
|
|
_LCL_PREFIX!= ${_LCL_PREFIX_SH}
|
|
|
|
CFLAGS+= ${_LCL_PREFIX}$(shell ${_LCL_PREFIX_SH})
|