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