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