Makefile.hppa revision 1.7
1# $NetBSD: Makefile.hppa,v 1.7 2020/09/07 02:22:27 mrg Exp $
2
3# Makefile for NetBSD
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/arch/hppa/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/hppa/conf/Makefile.hppa
13# after which config should be rerun for all machines of that type.
14#
15# To specify debugging, add the config line: makeoptions DEBUG="-g"
16# A better way is to specify -g only for a few files.
17#
18#	makeoptions DEBUGLIST="uvm* trap if_*"
19
20MACHINE_ARCH=hppa
21NEED_OWN_INSTALL_TARGET?=no
22.include <bsd.own.mk>
23
24##
25## (1) port identification
26##
27HPPA=		$S/arch/hppa
28GENASSYM_CONF=	${HPPA}/hppa/genassym.cf
29
30##
31## (2) compile settings
32##
33CPPFLAGS+=	-Dhppa
34CFLAGS+=	-mpa-risc-1-1 -msoft-float -mdisable-fpregs
35CWARNFLAGS.gcc+=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :}
36
37.include "${HPPA}/spmath/Makefile.inc"
38
39.ifndef PROF
40LIBSPMATH=	${SPMATH}
41.else
42LIBSPMATH=	${SPMATH_PROF}
43.endif
44
45CFLAGS+=	-mno-space-regs -mfast-indirect-calls -mportable-runtime
46AFLAGS+=	-x assembler-with-cpp -P -traditional
47
48OPT_DDB=	%DDB%
49.if !empty(OPT_DDB)
50CFLAGS+=	-fno-omit-frame-pointer
51.endif
52
53##
54## (3) libkern and compat
55##
56OPT_MODULAR=	%MODULAR%
57
58##
59## (4) local objects, compile rules, and dependencies
60##
61MD_OBJS=	locore.o
62MD_LIBS=	${LIBSPMATH}
63MD_CFILES=
64MD_SFILES=	${HPPA}/hppa/locore.S
65
66locore.o: ${HPPA}/hppa/locore.S
67	${NORMAL_S}
68
69##
70## (5) link settings
71##
72KERNLDSCRIPT=	${HPPA}/conf/ld.script
73TEXTADDR?=	00200000
74LINKFLAGS_NORMAL=       -X
75EXTRA_LINKFLAGS= -Map $@.map
76
77##
78## (6) port specific target dependencies
79##
80
81# depend on CPU configuration
82db_machdep.o machdep.o pmap.o vm_machdep.o: Makefile
83
84# depends on KGDBDEV, KGDBRATE, DDB, etc.
85com_gsc.o clock.o pdc.o autoconf.o machdep.o: Makefile
86
87##
88## (7) misc settings
89##
90
91##
92## (8) config(8) generated machinery
93##
94%INCLUDES
95
96%OBJS
97
98%CFILES
99
100%SFILES
101
102%LOAD
103
104%RULES
105
106##
107## (9) port independent kernel machinery
108##
109.include "$S/conf/Makefile.kern.inc"
110
111##
112## (10) Appending make options.
113##
114%MAKEOPTIONSAPPEND
115