| @@ -1,30 +1,34 @@ | | | @@ -1,30 +1,34 @@ |
1 | # $NetBSD: Makefile.inc,v 1.24 2014/01/12 15:26:31 tsutsui Exp $ | | 1 | # $NetBSD: Makefile.inc,v 1.25 2014/07/26 17:24:04 tsutsui Exp $ |
2 | | | 2 | |
3 | # Must have S=/usr/src/sys (or equivalent) | | 3 | # Must have S=/usr/src/sys (or equivalent) |
4 | # But note: this is w.r.t. a subdirectory | | 4 | # But note: this is w.r.t. a subdirectory |
5 | S= ${.CURDIR}/../../../.. | | 5 | S= ${.CURDIR}/../../../.. |
6 | | | 6 | |
7 | .if defined(SA_PROG) | | 7 | .if defined(SA_PROG) |
8 | | | 8 | |
9 | .include <bsd.own.mk> | | 9 | .include <bsd.own.mk> |
10 | | | 10 | |
11 | WARNS?= 2 | | 11 | WARNS?= 2 |
12 | | | 12 | |
13 | LIBSA!=cd ${.CURDIR}/../libsa && ${PRINTOBJDIR} | | 13 | LIBSA!=cd ${.CURDIR}/../libsa && ${PRINTOBJDIR} |
14 | | | 14 | |
15 | MDEC_DIR?=/usr/mdec | | 15 | MDEC_DIR?=/usr/mdec |
16 | | | 16 | |
| | | 17 | .if ${MACHINE} == "sun3" |
| | | 18 | RELOC?= 280000 |
| | | 19 | .else |
17 | RELOC?= 240000 | | 20 | RELOC?= 240000 |
| | | 21 | .endif |
18 | DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t | | 22 | DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t |
19 | INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S} | | 23 | INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S} |
20 | | | 24 | |
21 | .if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 | | 25 | .if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 |
22 | # gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas | | 26 | # gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas |
23 | # which works for -march=68010 but breaks for -mcpu=68010 | | 27 | # which works for -march=68010 but breaks for -mcpu=68010 |
24 | CPUFLAGS= -march=68010 | | 28 | CPUFLAGS= -march=68010 |
25 | .else | | 29 | .else |
26 | CPUFLAGS= -mc68000 -Wa,-mc68010 | | 30 | CPUFLAGS= -mc68000 -Wa,-mc68010 |
27 | .endif | | 31 | .endif |
28 | COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables | | 32 | COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables |
29 | CFLAGS= -msoft-float | | 33 | CFLAGS= -msoft-float |
30 | CPPFLAGS= ${DEFS} ${DEBUG} ${INCL} | | 34 | CPPFLAGS= ${DEFS} ${DEBUG} ${INCL} |