2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: Makefile,v 1.5 2013/08/22 00:17:48 matt Exp $
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
# For ../Makefile.inc and bsd.own.mk
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
2014-01-28 10:48:19 +01:00
|
|
|
.if defined(__MINIX)
|
|
|
|
# In case of installation of both clang and GCC, we want to be able to
|
|
|
|
# switch which one is the default by adapting the cc, c++ & cpp symlinks
|
|
|
|
PROG= gcpp
|
|
|
|
.else
|
2012-06-06 15:06:52 +02:00
|
|
|
PROG= cpp
|
2014-01-28 10:48:19 +01:00
|
|
|
.endif # defined(__MINIX)
|
2012-06-06 15:06:52 +02:00
|
|
|
SRCS= gcc.c cppspec.c prefix.c version.c
|
|
|
|
|
|
|
|
# XXX
|
2013-12-06 12:04:52 +01:00
|
|
|
.if ${GCC_MACHINE_ARCH} == "x86_64" || ${GCC_MACHINE_ARCH} == "i386"
|
2012-06-06 15:06:52 +02:00
|
|
|
SRCS+= driver-i386.c
|
|
|
|
.PATH: ${DIST}/gcc/config/i386
|
|
|
|
.endif
|
2013-12-06 12:04:52 +01:00
|
|
|
.if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64"
|
2012-06-06 15:06:52 +02:00
|
|
|
SRCS+= driver-rs6000.c
|
|
|
|
.PATH: ${DIST}/gcc/config/rs6000
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${BACKENDOBJ}
|
|
|
|
CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\"
|
|
|
|
|
|
|
|
CPPFLAGS.gcc.c+= -I${GCCARCH} -I${BACKENDOBJ} -I. \
|
|
|
|
${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
|
|
|
|
-DPREFIX=\"/usr\" \
|
|
|
|
-DDEFAULT_TARGET_VERSION=\"${G_version}\" \
|
|
|
|
-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
|
|
|
|
-DCONFIGURE_SPECS="\"\""
|
|
|
|
|
2014-01-28 10:48:19 +01:00
|
|
|
.if defined(__MINIX)
|
|
|
|
.if ${HAVE_LLVM:Uno} == "no"
|
|
|
|
SYMLINKS= gcpp ${BINDIR}/cpp
|
|
|
|
.endif # ${HAVE_LLVM:Uno} == "no"
|
|
|
|
.else
|
2012-06-06 15:06:52 +02:00
|
|
|
LINKS= ${BINDIR}/cpp ${BINDIR}/gcpp
|
2014-01-28 10:48:19 +01:00
|
|
|
.endif # defined(__MINIX)
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
TEXINFO= cpp.texi
|
|
|
|
INFOFLAGS= -I${DIST}/gcc/doc -I${DIST}/gcc/doc/include -I.
|
|
|
|
|
|
|
|
MAN= cpp.1
|
|
|
|
MLINKS+= cpp.1 gcpp.1 cpp.1 cccp.1
|
|
|
|
|
|
|
|
.include "../Makefile.frontend"
|
|
|
|
|
2013-04-24 18:57:59 +02:00
|
|
|
.if !defined(__MINIX)
|
2012-06-06 15:06:52 +02:00
|
|
|
LDADD+= -lintl
|
2013-04-24 18:57:59 +02:00
|
|
|
.endif # !defined(__MINIX)
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
COPTS+= -Wno-stack-protector
|
|
|
|
|
|
|
|
.include <bsd.info.mk>
|
|
|
|
|
|
|
|
.PATH: ${DIST}/gcc ${DIST}/gcc/doc
|
|
|
|
|
|
|
|
cpp.info: gcc-vers.texi
|