xref: /freebsd/sys/conf/Makefile.powerpc (revision 94d1731e73ccb97df5fc5928bb584cabb8e37f1f)
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
35CFLAGS+= -msoft-float
36CFLAGS.gcc+= -Wa,-many
37
38# Apply compiler-specific DPAA exceptions.
39.if "${COMPILER_TYPE}" == "clang"
40DPAAWARNFLAGS += \
41        -Wno-error=parentheses-equality \
42        -Wno-error=self-assign \
43        -Wno-error=incompatible-pointer-types-discards-qualifiers \
44        -Wno-error=non-literal-null-conversion \
45        -Wno-error=enum-conversion
46.elif "${COMPILER_TYPE}" == "gcc"
47DPAAWARNFLAGS += \
48	-Wno-error=int-in-bool-context
49.endif
50
51# Build position-independent kernel
52CFLAGS+= -fPIC
53LDFLAGS+= -pie
54
55.if !empty(DDB_ENABLED)
56CFLAGS+=	-fno-omit-frame-pointer
57.endif
58
59%BEFORE_DEPEND
60
61%OBJS
62
63%FILES.c
64
65%FILES.s
66
67%FILES.m
68
69%CLEAN
70
71%RULES
72
73.include "$S/conf/kern.post.mk"
74