xref: /freebsd/sys/conf/Makefile.powerpc (revision 0b37c1590418417c894529d371800dfac71ef887)
1# Makefile.powerpc -- with config changes.
2# Copyright 1990 W. Jolitz
3#	from: @(#)Makefile.i386	7.1 5/10/91
4# $FreeBSD$
5#
6# Makefile for FreeBSD
7#
8# This makefile is constructed from a machine description:
9#	config machineid
10# Most changes should be made in the machine description
11#	/sys/powerpc/conf/``machineid''
12# after which you should do
13#	 config machineid
14# Generic makefile changes should be made in
15#	/sys/conf/Makefile.powerpc
16# after which config should be rerun for all machines.
17#
18
19# Which version of config(8) is required.
20%VERSREQ=	600012
21
22STD8X16FONT?=	iso
23
24.if !defined(S)
25.if exists(./@/.)
26S=	./@
27.else
28S=	../../..
29.endif
30.endif
31
32LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH}
33
34.include "$S/conf/kern.pre.mk"
35
36INCLUDES+= -I$S/contrib/libfdt
37
38.if "${MACHINE_ARCH}" == "powerpcspe"
39# Force __SPE__, since the builtin will be removed later with -mno-spe
40CFLAGS.gcc+= -mabi=spe -D__SPE__
41CFLAGS.clang+= -mspe -D__SPE__ -m32
42HACK_EXTRA_FLAGS= -shared -m32 -mspe -D__SPE__
43.endif
44CFLAGS+= -msoft-float
45CFLAGS.gcc+= -Wa,-many
46
47# Apply compiler-specific DPAA exceptions.
48.if "${COMPILER_TYPE}" == "clang"
49DPAAWARNFLAGS += \
50        -Wno-error=parentheses-equality \
51        -Wno-error=self-assign \
52        -Wno-error=incompatible-pointer-types-discards-qualifiers \
53        -Wno-error=non-literal-null-conversion \
54        -Wno-error=enum-conversion
55.elif "${COMPILER_TYPE}" == "gcc" && ${COMPILER_VERSION} >= 50200
56DPAAWARNFLAGS += \
57	-Wno-error=redundant-decls \
58	-Wno-error=int-in-bool-context
59.endif
60
61# Build position-independent kernel
62CFLAGS+= -fPIC
63LDFLAGS+= -pie
64
65.if !empty(DDB_ENABLED)
66CFLAGS+=	-fno-omit-frame-pointer
67.endif
68
69%BEFORE_DEPEND
70
71%OBJS
72
73%FILES.c
74
75%FILES.s
76
77%FILES.m
78
79%CLEAN
80
81%RULES
82
83.include "$S/conf/kern.post.mk"
84