1# $NetBSD: Makefile.inc,v 1.19 2016/02/09 20:40:45 plunky Exp $ 2 3PCC_DIR:=${.PARSEDIR} 4PCC_DIST=${PCC_DIR}/dist/pcc 5PCC_LIBS=${PCC_DIR}/dist/pcc-libs 6 7# (these strings will be updated by the prepare-import.sh script) 8PCC_VERSION=1.2.0.DEVEL 9PCC_DATESTAMP=20160208 10 11TARGOS = netbsd 12 13.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" 14TARGMACH = mips 15.elif ${MACHINE_ARCH} == "x86_64" 16TARGMACH = amd64 17.else 18TARGMACH = ${MACHINE_ARCH} 19.endif 20 21.if !exists(${PCC_DIST}/arch/${TARGMACH}) 22ERROR!= echo "ERROR: ${TARGMACH} not yet supported - write code!" >&2;echo 23.endif 24 25VERSSTR="pcc ${PCC_VERSION} ${PCC_DATESTAMP} for ${TARGMACH}--${TARGOS}" 26 27CPPFLAGS+= -DGCC_COMPAT 28CPPFLAGS+= -DPCC_DEBUG 29CPPFLAGS+= -D_ISOC99_SOURCE 30CPPFLAGS+= -DVERSSTR=${VERSSTR:Q} 31CPPFLAGS+= -Dos_${TARGOS} 32CPPFLAGS+= -Dmach_${TARGMACH} 33CPPFLAGS+= -I${PCC_DIR}/include 34 35.include <bsd.endian.mk> 36 37# We only build binaries from here where the pcc host and target architectures 38# will be the same. For a cross-compiler, use the tools/pcc build. 39# 40.if ${TARGET_ENDIANNESS} == "1234" 41CPPFLAGS+= -DHOST_LITTLE_ENDIAN 42CPPFLAGS+= -DTARGET_LITTLE_ENDIAN 43.elif ${TARGET_ENDIANNESS} == "4321" 44CPPFLAGS+= -DHOST_BIG_ENDIAN 45CPPFLAGS+= -DTARGET_BIG_ENDIAN 46.else 47ERROR!= echo "ERROR: Unknown TARGET_ENDIANNESS" >&2;echo 48.endif 49 50# top-level Makefile.inc 51.include "../../../Makefile.inc" 52