1# $NetBSD: Makefile,v 1.8 2014/05/31 22:55:17 mrg Exp $ 2 3LIBISPRIVATE= yes 4 5# For ../Makefile.inc and bsd.own.mk 6.include <bsd.init.mk> 7 8LIB= frontend 9 10SRCS= gcc.c version.c prefix.c 11 12HOSTPROG_CXX= 1 13 14# XXX 15.if ${GCC_MACHINE_ARCH} == "x86_64" || ${GCC_MACHINE_ARCH} == "i386" 16SRCS+= driver-i386.c 17.PATH: ${DIST}/gcc/config/i386 18.endif 19.if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64" 20SRCS+= driver-rs6000.c 21.PATH: ${DIST}/gcc/config/rs6000 22.endif 23 24CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} -I. \ 25 ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ 26 -DPREFIX=\"/usr\" \ 27 -DDEFAULT_TARGET_VERSION=\"${G_version}\" \ 28 -DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \ 29 -DCONFIGURE_SPECS="\"\"" 30HOST_CPPFLAGS+= -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} 31 32DPSRCS+= specs.h 33 34${SRCS}: ${GCCARCH}/defs.mk 35 36MKPIC:= no 37MKPICLIB:= no 38 39.include <bsd.lib.mk> 40 41# Force using C++ for this 42HOST_CC:= ${HOST_CXX} 43CC:= ${CXX} 44CFLAGS:= ${CXXFLAGS} 45 46CFLAGS+= -Wno-stack-protector 47 48# XXX print-objdir fix me 49CPPFLAGS+= -I../backend 50 51.PATH: ${DIST}/gcc ${DIST}/gcc/common 52 53# Build the specs.h file 54CLEANFILES+= specs.h 55specs.h: Makefile 56 for f in cp objc; do \ 57 echo "#include \"$$f/lang-specs.h\""; \ 58 done > specs.h 59