2015-04-13 16:43:10 +02:00
|
|
|
# Makefile.arm64 -- with config changes.
|
|
|
|
# Copyright 1990 W. Jolitz
|
|
|
|
# from: @(#)Makefile.i386 7.1 5/10/91
|
|
|
|
# from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Makefile for FreeBSD
|
|
|
|
#
|
|
|
|
# This makefile is constructed from a machine description:
|
|
|
|
# config machineid
|
|
|
|
# Most changes should be made in the machine description
|
|
|
|
# /sys/arm64/conf/``machineid''
|
|
|
|
# after which you should do
|
|
|
|
# config machineid
|
|
|
|
# Generic makefile changes should be made in
|
|
|
|
# /sys/conf/Makefile.arm64
|
|
|
|
# after which config should be rerun for all machines.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Which version of config(8) is required.
|
2018-07-17 16:11:30 +02:00
|
|
|
%VERSREQ= 600012
|
2015-04-13 16:43:10 +02:00
|
|
|
|
|
|
|
.if !defined(S)
|
|
|
|
S= ../../..
|
|
|
|
.endif
|
|
|
|
.include "$S/conf/kern.pre.mk"
|
|
|
|
|
|
|
|
INCLUDES+= -I$S/contrib/libfdt
|
|
|
|
|
2019-12-07 17:14:23 +01:00
|
|
|
#SYSTEM_LD:= ${SYSTEM_LD:$S/conf/ldscript.$M=ldscript.$M}
|
|
|
|
#SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M}
|
|
|
|
|
2015-04-13 16:43:10 +02:00
|
|
|
.if !empty(DDB_ENABLED)
|
|
|
|
CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
|
|
|
|
.endif
|
|
|
|
|
2019-12-07 17:14:23 +01:00
|
|
|
SYSTEM_LD_ = ${LD} -m ${LD_EMULATION} -Bdynamic -T ldscript.$M.noheader \
|
|
|
|
${_LDFLAGS} --no-warn-mismatch --warn-common --export-dynamic \
|
|
|
|
--dynamic-linker /red/herring \
|
|
|
|
-o ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
|
|
|
|
SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// $(LDSCRIPT)\
|
|
|
|
>ldscript.$M.noheader;\
|
|
|
|
${SYSTEM_LD_}; \
|
|
|
|
${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \
|
|
|
|
${KERNEL_KO}.bin; \
|
|
|
|
rm ${FULLKERNEL}.noheader
|
|
|
|
|
2015-04-13 16:43:10 +02:00
|
|
|
%BEFORE_DEPEND
|
|
|
|
|
|
|
|
%OBJS
|
|
|
|
|
|
|
|
%FILES.c
|
|
|
|
|
|
|
|
%FILES.s
|
|
|
|
|
|
|
|
%FILES.m
|
|
|
|
|
|
|
|
%CLEAN
|
2019-12-07 17:14:23 +01:00
|
|
|
CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader
|
2015-04-13 16:43:10 +02:00
|
|
|
|
|
|
|
%RULES
|
|
|
|
|
|
|
|
.include "$S/conf/kern.post.mk"
|