mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
75 lines
1.4 KiB
Makefile
75 lines
1.4 KiB
Makefile
|
# Makefile.mips
|
||
|
# $FreeBSD$
|
||
|
#
|
||
|
# Makefile for FreeBSD
|
||
|
#
|
||
|
# This makefile is constructed from a machine description:
|
||
|
# config machineid
|
||
|
# Most changes should be made in the machine description
|
||
|
# /sys/mips/conf/``machineid''
|
||
|
# after which you should do
|
||
|
# config machineid
|
||
|
# Generic makefile changes should be made in
|
||
|
# /sys/conf/Makefile.mips
|
||
|
# after which config should be rerun for all machines.
|
||
|
#
|
||
|
|
||
|
# Which version of config(8) is required.
|
||
|
%VERSREQ= 600004
|
||
|
|
||
|
STD8X16FONT?= iso
|
||
|
|
||
|
.if !defined(S)
|
||
|
.if exists(./@/.)
|
||
|
S= ./@
|
||
|
.else
|
||
|
S= ../../..
|
||
|
.endif
|
||
|
.endif
|
||
|
.include "$S/conf/kern.pre.mk"
|
||
|
|
||
|
# XXX: Such sweeping assumptions...
|
||
|
MACHINE=mips
|
||
|
MACHINE_ARCH=mips
|
||
|
|
||
|
MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH}
|
||
|
|
||
|
# We default to the MIPS32 ISA, if none specified in the
|
||
|
# kernel configuration file.
|
||
|
ARCH_FLAGS?=-march=mips32
|
||
|
|
||
|
HACK_EXTRA_FLAGS=-shared
|
||
|
.if defined(TARGET_BIG_ENDIAN)
|
||
|
CFLAGS+=-EB
|
||
|
SYSTEM_LD+=-EB
|
||
|
HACK_EXTRA_FLAGS+=-EB -Wl,-EB
|
||
|
.else
|
||
|
CFLAGS+=-EL
|
||
|
SYSTEM_LD+=-EL
|
||
|
HACK_EXTRA_FLAGS+=-EL -Wl,-EL
|
||
|
.endif
|
||
|
|
||
|
# We add the -fno-pic flag to kernels because otherwise performance
|
||
|
# is extremely poor, as well as -mno-abicalls to force no ABI usage.
|
||
|
CFLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS)
|
||
|
HACK_EXTRA_FLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS)
|
||
|
|
||
|
# XXX hardcoded kernel entry point
|
||
|
ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE
|
||
|
|
||
|
%BEFORE_DEPEND
|
||
|
|
||
|
%OBJS
|
||
|
|
||
|
%FILES.c
|
||
|
|
||
|
%FILES.s
|
||
|
|
||
|
%FILES.m
|
||
|
|
||
|
%CLEAN
|
||
|
|
||
|
%RULES
|
||
|
|
||
|
.include "$S/conf/kern.post.mk"
|