# $FreeBSD: head/Mk/Uses/alias.mk 391257 2015-07-03 16:54:08Z amdmi3 $ # # Add __FreeSBD__ definition to CFLAGS # Used by DPorts when masquerading as FreeBSD allows port to build without # additional patches # # Feature: alias # Usage: USES=alias or USES=alias:ARGS # Valid ARGS: 8, 9 (default), 10, 11 # # MAINTAINER: marino@FreeBSD.org .if !defined(_INCLUDE_USES_ALIAS_MK) _INCLUDE_USES_ALIAS_MK= yes .if ${OPSYS} != FreeBSD .if empty(alias_ARGS) CFLAGS+= -D__FreeBSD__=9 CFLAGS+= -D__FreeBSD_version__=903001 .else . if ${alias_ARGS} == 8 CFLAGS+= -D__FreeBSD__=8 CFLAGS+= -D__FreeBSD_version__=804001 . elif ${alias_ARGS} == 9 CFLAGS+= -D__FreeBSD__=9 CFLAGS+= -D__FreeBSD_version__=903001 . elif ${alias_ARGS} == 10 CFLAGS+= -D__FreeBSD__=10 CFLAGS+= -D__FreeBSD_version__=1003001 . elif ${alias_ARGS} == 11 CFLAGS+= -D__FreeBSD__=11 CFLAGS+= -D__FreeBSD_version__=1100001 . else IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias . endif .endif .endif # OPSYS != FreeBSD .endif