xref: /minix3/external/gpl3/gcc/usr.bin/frontend/Makefile (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc#	$NetBSD: Makefile,v 1.9 2015/01/07 02:05:41 christos Exp $
218a5822eSThomas Veerman
318a5822eSThomas VeermanLIBISPRIVATE=	yes
418a5822eSThomas Veerman
518a5822eSThomas Veerman# For ../Makefile.inc and bsd.own.mk
618a5822eSThomas Veerman.include <bsd.init.mk>
718a5822eSThomas Veerman
818a5822eSThomas VeermanLIB=		frontend
918a5822eSThomas Veerman
10*0a6a1f1dSLionel SambucSRCS=		gcc.c version.c prefix.c
11*0a6a1f1dSLionel Sambuc
12*0a6a1f1dSLionel SambucHOSTPROG_CXX=	1
1318a5822eSThomas Veerman
1418a5822eSThomas Veerman# XXX
1584d9c625SLionel Sambuc.if ${GCC_MACHINE_ARCH} == "x86_64" || ${GCC_MACHINE_ARCH} == "i386"
1618a5822eSThomas VeermanSRCS+=		driver-i386.c
1718a5822eSThomas Veerman.PATH:		${DIST}/gcc/config/i386
1818a5822eSThomas Veerman.endif
1984d9c625SLionel Sambuc.if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64"
2018a5822eSThomas VeermanSRCS+=		driver-rs6000.c
2118a5822eSThomas Veerman.PATH:		${DIST}/gcc/config/rs6000
2218a5822eSThomas Veerman.endif
2318a5822eSThomas Veerman
2418a5822eSThomas VeermanCPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \
2518a5822eSThomas Veerman		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
2618a5822eSThomas Veerman		-DPREFIX=\"/usr\" \
2718a5822eSThomas Veerman		-DDEFAULT_TARGET_VERSION=\"${G_version}\" \
2818a5822eSThomas Veerman		-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
2918a5822eSThomas Veerman		-DCONFIGURE_SPECS="\"\""
3018a5822eSThomas VeermanHOST_CPPFLAGS+=	-I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
3118a5822eSThomas Veerman
3218a5822eSThomas VeermanDPSRCS+=	specs.h
3318a5822eSThomas Veerman
34*0a6a1f1dSLionel Sambuc${SRCS}: ${GCCARCH}/defs.mk
35*0a6a1f1dSLionel Sambuc
3618a5822eSThomas VeermanMKPIC:=		no
3718a5822eSThomas VeermanMKPICLIB:=	no
3818a5822eSThomas Veerman
3918a5822eSThomas Veerman.include <bsd.lib.mk>
4018a5822eSThomas Veerman
41*0a6a1f1dSLionel Sambuc# Force using C++ for this
42*0a6a1f1dSLionel SambucHOST_CC:=	${HOST_CXX}
43*0a6a1f1dSLionel SambucCC:=		${CXX}
44*0a6a1f1dSLionel SambucCFLAGS:=	${CXXFLAGS}
45*0a6a1f1dSLionel Sambuc
4618a5822eSThomas VeermanCFLAGS+=	-Wno-stack-protector
4718a5822eSThomas Veerman
48*0a6a1f1dSLionel Sambuc# XXX print-objdir fix me
49*0a6a1f1dSLionel SambucCPPFLAGS+=	-I../backend
50*0a6a1f1dSLionel Sambuc
51*0a6a1f1dSLionel Sambuc.PATH: ${DIST}/gcc ${DIST}/gcc/common
5218a5822eSThomas Veerman
5318a5822eSThomas Veerman# Build the specs.h file
5418a5822eSThomas VeermanCLEANFILES+=	specs.h
5518a5822eSThomas Veermanspecs.h: Makefile
56*0a6a1f1dSLionel Sambuc	for f in cp lto objc objcp; do \
5718a5822eSThomas Veerman		echo "#include \"$$f/lang-specs.h\""; \
5818a5822eSThomas Veerman	done > specs.h
59