]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/conf/Makefile.mips
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / sys / conf / Makefile.mips
1 # Makefile.mips
2 # $FreeBSD$
3 #
4 # Makefile for FreeBSD
5 #
6 # This makefile is constructed from a machine description:
7 #       config machineid
8 # Most changes should be made in the machine description
9 #       /sys/mips/conf/``machineid''
10 # after which you should do
11 #        config machineid
12 # Generic makefile changes should be made in
13 #       /sys/conf/Makefile.mips
14 # after which config should be rerun for all machines.
15 #
16
17 # Which version of config(8) is required.
18 %VERSREQ=       600004
19
20 STD8X16FONT?=   iso
21
22 .if !defined(S)
23 .if exists(./@/.)
24 S=      ./@
25 .else
26 S=      ../../..
27 .endif
28 .endif
29 .include "$S/conf/kern.pre.mk"
30
31 # XXX: Such sweeping assumptions...
32 MACHINE=mips
33 MACHINE_ARCH=mips
34
35 MKMODULESENV+=  MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH}
36
37 # We default to the MIPS32 ISA, if none specified in the
38 # kernel configuration file.
39 ARCH_FLAGS?=-march=mips32
40
41 HACK_EXTRA_FLAGS=-shared
42 .if defined(TARGET_BIG_ENDIAN)
43 CFLAGS+=-EB
44 SYSTEM_LD+=-EB
45 HACK_EXTRA_FLAGS+=-EB -Wl,-EB
46 .else
47 CFLAGS+=-EL
48 SYSTEM_LD+=-EL
49 HACK_EXTRA_FLAGS+=-EL -Wl,-EL
50 .endif
51
52 # We add the -fno-pic flag to kernels because otherwise performance
53 # is extremely poor, as well as -mno-abicalls to force no ABI usage.
54 CFLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS)
55 HACK_EXTRA_FLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS)
56
57 # XXX hardcoded kernel entry point
58 ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE
59
60 %BEFORE_DEPEND
61
62 %OBJS
63
64 %FILES.c
65
66 %FILES.s
67
68 %FILES.m
69
70 %CLEAN
71
72 %RULES
73
74 .include "$S/conf/kern.post.mk"