xref: /freebsd/sys/conf/Makefile.powerpc (revision 29363fb446372cb3f10bc98664e9767c53fbb457)
1c585bae1SBenno Rice# Makefile.powerpc -- with config changes.
25b81b6b3SRodney W. Grimes# Copyright 1990 W. Jolitz
32d717e4aSRodney W. Grimes# Makefile for FreeBSD
45b81b6b3SRodney W. Grimes#
55b81b6b3SRodney W. Grimes# This makefile is constructed from a machine description:
65b81b6b3SRodney W. Grimes#	config machineid
75b81b6b3SRodney W. Grimes# Most changes should be made in the machine description
8c585bae1SBenno Rice#	/sys/powerpc/conf/``machineid''
95b81b6b3SRodney W. Grimes# after which you should do
105b81b6b3SRodney W. Grimes#	 config machineid
115b81b6b3SRodney W. Grimes# Generic makefile changes should be made in
120df659afSRuslan Ermilov#	/sys/conf/Makefile.powerpc
135b81b6b3SRodney W. Grimes# after which config should be rerun for all machines.
145b81b6b3SRodney W. Grimes#
159081eec1SJohn Polstra
1648b29459SPeter Wemm# Which version of config(8) is required.
17e47edf50SKyle Evans%VERSREQ=	600012
1848b29459SPeter Wemm
1938d8a113SPoul-Henning KampSTD8X16FONT?=	iso
2038d8a113SPoul-Henning Kamp
217621bfffSMarcel Moolenaar.if !defined(S)
22f540b106SGarrett Wollman.if exists(./@/.)
23f540b106SGarrett WollmanS=	./@
24f540b106SGarrett Wollman.else
257ef33e2eSWarner LoshS=	../../..
26f540b106SGarrett Wollman.endif
277621bfffSMarcel Moolenaar.endif
28c3e289e1SNathan Whitehorn
29c3e289e1SNathan WhitehornLDSCRIPT_NAME?= ldscript.${MACHINE_ARCH}
30c3e289e1SNathan Whitehorn
3141c8eb30SWarner Losh.include "$S/conf/kern.pre.mk"
325b81b6b3SRodney W. Grimes
33d1d3233eSRafal JaworowskiINCLUDES+= -I$S/contrib/libfdt
34d1d3233eSRafal Jaworowski
35dc9b124dSJustin Hibbits.if "${MACHINE_ARCH}" == "powerpcspe"
36dc9b124dSJustin Hibbits# Force __SPE__, since the builtin will be removed later with -mno-spe
37e99c4e4dSBrandon BergrenCFLAGS.gcc+= -mabi=spe -D__SPE__
38e99c4e4dSBrandon BergrenCFLAGS.clang+= -mspe -D__SPE__ -m32
39dc9b124dSJustin Hibbits.endif
400b58112fSJustin HibbitsCFLAGS+= -msoft-float
410b58112fSJustin HibbitsCFLAGS.gcc+= -Wa,-many
422c6c8840SBenno Rice
43ab3f2a38SBrandon Bergren# Apply compiler-specific DPAA exceptions.
44ab3f2a38SBrandon Bergren.if "${COMPILER_TYPE}" == "clang"
45ab3f2a38SBrandon BergrenDPAAWARNFLAGS += \
46ab3f2a38SBrandon Bergren        -Wno-error=parentheses-equality \
47ab3f2a38SBrandon Bergren        -Wno-error=self-assign \
48ab3f2a38SBrandon Bergren        -Wno-error=incompatible-pointer-types-discards-qualifiers \
49ab3f2a38SBrandon Bergren        -Wno-error=non-literal-null-conversion \
50ab3f2a38SBrandon Bergren        -Wno-error=enum-conversion
51*fac6dee9SEric van Gyzen.elif "${COMPILER_TYPE}" == "gcc"
52ab3f2a38SBrandon BergrenDPAAWARNFLAGS += \
53ab3f2a38SBrandon Bergren	-Wno-error=int-in-bool-context
54ab3f2a38SBrandon Bergren.endif
55ab3f2a38SBrandon Bergren
565c845fdeSNathan Whitehorn# Build position-independent kernel
570fa22505SNathan WhitehornCFLAGS+= -fPIC
580fa22505SNathan WhitehornLDFLAGS+= -pie
590fa22505SNathan Whitehorn
60a7d30e5fSDavid E. O'Brien.if !empty(DDB_ENABLED)
61bd985cabSPeter GrehanCFLAGS+=	-fno-omit-frame-pointer
62bd985cabSPeter Grehan.endif
63bd985cabSPeter Grehan
6458e4304eSJustin T. Gibbs%BEFORE_DEPEND
6558e4304eSJustin T. Gibbs
665b81b6b3SRodney W. Grimes%OBJS
675b81b6b3SRodney W. Grimes
683f964411SPeter Wemm%FILES.c
695b81b6b3SRodney W. Grimes
703f964411SPeter Wemm%FILES.s
71c91d636eSDavid Greenman
723f964411SPeter Wemm%FILES.m
738afa373cSNicolas Souchu
740bf316f5SJustin T. Gibbs%CLEAN
750bf316f5SJustin T. Gibbs
765b81b6b3SRodney W. Grimes%RULES
773dfff24aSWarner Losh
783dfff24aSWarner Losh.include "$S/conf/kern.post.mk"
79