Makefile.hppa revision 1.2
1# $NetBSD: Makefile.hppa,v 1.2 2014/11/15 12:20:06 uebayasi 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
35
36.include "${HPPA}/spmath/Makefile.inc"
37
38.ifndef PROF
39LIBSPMATH=	${SPMATH}
40.else
41LIBSPMATH=	${SPMATH_PROF}
42.endif
43
44CFLAGS+=	-mno-space-regs -mfast-indirect-calls -mportable-runtime
45AFLAGS+=	-x assembler-with-cpp -P -traditional
46
47OPT_DDB=	%DDB%
48.if !empty(OPT_DDB)
49CFLAGS+=	-fno-omit-frame-pointer
50.endif
51
52##
53## (3) libkern and compat
54##
55KERN_AS=	obj
56
57##
58## (4) local objects, compile rules, and dependencies
59##
60MD_OBJS=	locore.o ${LIBSPMATH}
61MD_CFILES=
62MD_SFILES=	${HPPA}/hppa/locore.S
63
64locore.o: ${HPPA}/hppa/locore.S
65	${NORMAL_S}
66
67##
68## (5) link settings
69##
70LINKSCRIPT=	-T ${HPPA}/conf/ld.script
71TEXTADDR?=	00200000
72LINKFLAGS_NORMAL=       -X
73EXTRA_LINKFLAGS= -Map $@.map
74
75##
76## (6) port specific target dependencies
77##
78
79# depend on CPU configuration
80db_machdep.o machdep.o pmap.o vm_machdep.o: Makefile
81
82# depends on KGDBDEV, KGDBRATE, DDB, etc.
83com_gsc.o clock.o pdc.o autoconf.o machdep.o: Makefile
84
85##
86## (7) misc settings
87##
88
89##
90## (8) config(8) generated machinery
91##
92%INCLUDES
93
94%OBJS
95
96%CFILES
97
98%SFILES
99
100%LOAD
101
102%RULES
103
104##
105## (9) port independent kernel machinery
106##
107.include "$S/conf/Makefile.kern.inc"
108
109##
110## (10) Appending make options.
111##
112%MAKEOPTIONSAPPEND
113