xref: /netbsd-src/sys/arch/luna68k/conf/Makefile.luna68k (revision e8bec33be121040b935e764acaa45ddbf4d7353c)
1#	$NetBSD: Makefile.luna68k,v 1.23 2011/11/12 13:44:26 tsutsui 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/luna68k/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/luna68k/conf/Makefile.luna68k
13# after which config should be rerun for all machines of that type.
14# To specify debugging, add the config line: makeoptions DEBUG="-g"
15# A better way is to specify -g only for a few files.
16#
17#	makeoptions DEBUGLIST="uvm* trap if_*"
18
19MACHINE_ARCH=m68k
20USETOOLS?=	no
21NEED_OWN_INSTALL_TARGET?=no
22.include <bsd.own.mk>
23
24##
25## (1) port identification
26##
27LUNA68K=	$S/arch/luna68k
28GENASSYM_CONF=	${LUNA68K}/luna68k/genassym.cf
29
30##
31## (2) compile settings
32##
33CPPFLAGS+=	-Dluna68k
34CFLAGS+=	-msoft-float
35AFLAGS+=	-x assembler-with-cpp
36
37##
38## (3) libkern and compat
39##
40
41##
42## (4) local objects, compile rules, and dependencies
43##
44# for the Motorola 68040 Floating Point Software Product
45.include "$S/arch/m68k/fpsp/Makefile.inc"
46
47MD_OBJS=	locore.o ${FPSP}
48MD_CFILES=
49MD_SFILES=
50
51locore.o: ${LUNA68K}/luna68k/locore.s assym.h
52	${NORMAL_S}
53
54##
55## (5) link settings
56##
57LINKFORMAT=	-N -T ldscript
58.if (${OBJECT_FMT} == "ELF")
59# Need to convert the kernel from ELF to a.out so that PROM can load it.
60
61SYSTEM_LD_HEAD_EXTRA+=; \
62	( cat ${LUNA68K}/conf/kern.ldscript.head ; \
63	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
64	        ${SYSTEM_OBJ} ; \
65	  cat ${LUNA68K}/conf/kern.ldscript.tail ) > ldscript
66
67SYSTEM_LD_TAIL_EXTRA+=; \
68	echo "${ELF2AOUT} $@ $@.aout" ; \
69	    ${ELF2AOUT} $@ $@.aout
70.endif
71
72##
73## (6) port specific target dependencies
74##
75
76# depend on CPU configuration
77machdep.c trap.o: Makefile
78
79copy.o copypage.o lock_stubs.o: assym.h
80
81##
82## (7) misc settings
83##
84
85##
86## (8) config(8) generated machinery
87##
88%INCLUDES
89
90%OBJS
91
92%CFILES
93
94%SFILES
95
96%LOAD
97
98%RULES
99
100##
101## (9) port independent kernel machinery
102##
103.include "$S/conf/Makefile.kern.inc"
104
105##
106## (10) Appending make options.
107##
108%MAKEOPTIONSAPPEND
109