1#	$NetBSD: Makefile,v 1.4 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=		common-target
9
10SRCS=		prefix.c params.c opts.c opts-common.c options.c vec.c \
11		hooks.c common-targhooks.c hash-table.c file-find.c \
12		${G_common_out_file:T}
13
14CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \
15		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
16		-DPREFIX=\"/usr\" \
17		-DDEFAULT_TARGET_VERSION=\"${G_version}\" \
18		-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
19		-DCONFIGURE_SPECS="\"\"" \
20		-I${BACKENDOBJ}
21
22COPTS.prefix.c=		-Wno-stack-protector
23COPTS.opts-common.c=	-Wno-stack-protector
24
25GENPROG_ERROR_DEPENDS=errors.lo
26
27.include "../Makefile.options"
28.include "../../Makefile.hooks"
29
30${SRCS}: ${GCCARCH}/defs.mk
31
32${G_common_out_file:T:R}.o:  common/common-target-hooks-def.h
33
34DPSRCS+=	options.h
35
36HOST_CPPFLAGS+=	-I${BACKENDOBJ} -I${GCCARCH} -I. -I${DIST}/include -I${DIST}/gcc
37HOST_CPPFLAGS+=	-DGENERATOR_FILE
38
39MKPIC:=		no
40MKPICLIB:=	no
41
42HOSTPROG_CXX=	1
43
44.include <bsd.lib.mk>
45
46# Force using C++ for this
47HOST_CC:=	${HOST_CXX}
48CC:=		${CXX}
49CFLAGS:=	${CXXFLAGS}
50
51.PATH: ${DIST}/gcc ${DIST}/gcc/common
52.PATH: ${G_common_out_file:H}
53