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