From e85a9ee9498e99fc5c7fbf7cbc1902ce6bcdd14d Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 4 Mar 2001 14:50:05 +0000 Subject: [PATCH] this is a sparc64 program. so -DSUN4U, machine -> sparc64. cleanup. --- sys/arch/sparc/stand/ofwboot/Makefile | 38 +++++++++++++++------------ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/sys/arch/sparc/stand/ofwboot/Makefile b/sys/arch/sparc/stand/ofwboot/Makefile index 0ee94459b379..fbd11727b3e2 100644 --- a/sys/arch/sparc/stand/ofwboot/Makefile +++ b/sys/arch/sparc/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2000/08/20 14:58:37 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2001/03/04 14:50:05 mrg Exp $ CURDIR= ${.CURDIR} S= ${CURDIR}/../../../.. @@ -13,14 +13,9 @@ PROG?= ofwboot SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c .PATH: ${S}/arch/sparc64/sparc64 -.if CROSS -CEXTRAFLAGS?= -nostdinc -.else -CEXTRAFLAGS?= -D_LP64 -.endif CWARNFLAGS+= -Wno-main -CFLAGS+= ${COPTS} -D__ELF__ ${CEXTRAFLAGS} -CPPFLAGS+= -D_STANDALONE +CFLAGS+= ${COPTS} ${CEXTRAFLAGS} +CPPFLAGS+= -D_STANDALONE -DSUN4U #CPPFLAGS+= -DNETIF_DEBUG MKMAN= no @@ -70,16 +65,16 @@ SAMISCMAKEFLAGS= SA_USE_CREAD=yes .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -.NOPATH: machine sparc -${SRCS}: machine sparc +.NOPATH: machine sparc64 +${SRCS}: machine sparc64 machine: rm -f machine - ln -s ${.CURDIR}/../../../${MACHINE}/include machine + ln -s sparc64 machine -sparc: - rm -f sparc - ln -s ${.CURDIR}/../../../sparc/include sparc +sparc64: + rm -f sparc64 + ln -s ${.CURDIR}/../../../sparc64/include sparc64 vers.c: version sh ${S}/conf/newvers_stand.sh ${CURDIR}/version "sparc64" ${NEWVERSWHAT} @@ -96,11 +91,20 @@ ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} .include -.if CROSS -AFLAGS= -x assembler-with-cpp -Wa,-Av9a -traditional-cpp -D_LOCORE -D__ELF__ +.if ${MACHINE_ARCH} == "sparc64" +AFLAGS+= -Wa,-Av9a +CEXTRAFLAGS?= -D_LP64 .else -AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D__ELF__ -Wa,-Av9a ${CEXTRAFLAGS} #-Wa,-Av8plusa +AFLAGS+= -Wa,-Av8plusa .endif + +.if CROSS +AFLAGS+= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D__ELF__ +CEXTRAFLAGS?= -D_LP64 +.else +AFLAGS+= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D__ELF__ ${CEXTRAFLAGS} +.endif + NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< srt0.o: srt0.s ${NORMAL_S}