2001-03-04 19:15:50 +03:00
|
|
|
# $NetBSD: Makefile,v 1.10 2001/03/04 16:15:50 tsutsui Exp $
|
2001-01-30 15:42:43 +03:00
|
|
|
|
2001-01-30 17:21:49 +03:00
|
|
|
.include <bsd.own.mk>
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
COMMON= ${.CURDIR}/../common
|
2001-01-07 11:38:01 +03:00
|
|
|
COMMONOBJ!= cd ${COMMON} && ${PRINTOBJDIR}
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
.PATH: ${COMMON}
|
|
|
|
|
|
|
|
PROG= boot
|
|
|
|
SRCS= locore.S boot.c devopen.c
|
|
|
|
SRCS+= romcalls.S putchar.c
|
|
|
|
MKMAN= no
|
|
|
|
STRIPFLAG=
|
|
|
|
BINMODE= 444
|
|
|
|
|
|
|
|
SIZE?= size
|
2000-02-01 08:25:24 +03:00
|
|
|
STRIP?= strip
|
2000-04-13 18:44:02 +04:00
|
|
|
OBJCOPY?= objcopy
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
|
2001-03-04 19:15:50 +03:00
|
|
|
LDFLAGS= -x -N -Ttext 3e0000 -e start
|
1999-12-09 17:53:00 +03:00
|
|
|
CFLAGS= -Os -Wall
|
|
|
|
|
2000-04-13 18:19:57 +04:00
|
|
|
CPPFLAGS+= -D_STANDALONE # -DBOOT_DEBUG
|
1999-12-09 17:53:00 +03:00
|
|
|
CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S}
|
|
|
|
AFLAGS= -D_LOCORE
|
|
|
|
|
2000-01-23 20:04:03 +03:00
|
|
|
CLEANFILES+= ${PROG}.tmp machine m68k
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
L= ${COMMONOBJ}/lib
|
|
|
|
LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
|
|
|
|
|
2000-01-23 20:04:03 +03:00
|
|
|
.BEGIN: machine m68k
|
|
|
|
.NOPATH: machine m68k
|
|
|
|
realdepend realall: machine m68k
|
1999-12-09 17:53:00 +03:00
|
|
|
|
2000-01-23 20:04:03 +03:00
|
|
|
machine::
|
1999-12-09 17:53:00 +03:00
|
|
|
-rm -f $@
|
|
|
|
ln -s ${S}/arch/${MACHINE}/include $@
|
|
|
|
|
2000-01-23 20:04:03 +03:00
|
|
|
m68k::
|
1999-12-09 17:53:00 +03:00
|
|
|
-rm -f $@
|
|
|
|
ln -s ${S}/arch/m68k/include $@
|
|
|
|
|
2000-01-23 20:04:03 +03:00
|
|
|
${PROG}: ${OBJS} machine m68k
|
1999-12-09 17:53:00 +03:00
|
|
|
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
|
|
|
|
-${SIZE} ${PROG}
|
2000-02-01 08:25:24 +03:00
|
|
|
${STRIP} ${PROG}
|
2000-04-13 18:44:02 +04:00
|
|
|
${OBJCOPY} -O binary ${PROG} ${PROG}.tmp
|
1999-12-09 17:53:00 +03:00
|
|
|
mv ${PROG}.tmp ${PROG}
|
2001-01-30 17:21:49 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|