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