Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm26/conf Reduce unnecessary differences between t...



details:   https://anonhg.NetBSD.org/src/rev/b154cc1417da
branches:  trunk
changeset: 503892:b154cc1417da
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sat Feb 17 17:23:48 2001 +0000

description:
Reduce unnecessary differences between this and Makefile.arm32.
Also (more significantly), use the compiler's default -mcpu setting.  This
means I can now build APCS-32 kernels.  They work, too.

diffstat:

 sys/arch/arm26/conf/Makefile.arm26 |  66 +++++++++++++++++++++++++++++--------
 1 files changed, 52 insertions(+), 14 deletions(-)

diffs (138 lines):

diff -r c0248b29e8df -r b154cc1417da sys/arch/arm26/conf/Makefile.arm26
--- a/sys/arch/arm26/conf/Makefile.arm26        Sat Feb 17 16:29:13 2001 +0000
+++ b/sys/arch/arm26/conf/Makefile.arm26        Sat Feb 17 17:23:48 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.arm26,v 1.4 2000/12/17 15:52:40 jdolecek Exp $
+#      $NetBSD: Makefile.arm26,v 1.5 2001/02/17 17:23:48 bjh21 Exp $
 
 # Makefile for NetBSD/arm26
 #
@@ -23,7 +23,7 @@
 CC?=   gcc
 CPP?=  gcc -E
 LD?=   ld
-LORDER?= lorder
+LORDER?=lorder
 MKDEP?=        mkdep
 NM?=   nm
 RANLIB?=ranlib
@@ -39,10 +39,11 @@
 .endif
 ARM26= $S/arch/arm26
 
+HAVE_EGCS!=    ${CC} --version | egrep "^(2\.[89]|egcs)" ; echo 
 INCLUDES=      -I. -I$S/arch -I$S -nostdinc
 CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Darm26  -Wcomment
 CWARNFLAGS=    -Wall -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS=                -mcpu=arm2 -ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
+CFLAGS=                -ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
 AFLAGS=                -x assembler-with-cpp -D_LOCORE
 
 .ifdef ROMTEXTBASE
@@ -77,6 +78,7 @@
 # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
 
 NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+NOPROF_C=      ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
 NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
 
 HOSTED_C=      ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
@@ -92,8 +94,13 @@
 #      ${SYSTEM_LD_HEAD}
 #      ${SYSTEM_LD} swapxxx.o
 #      ${SYSTEM_LD_TAIL}
+.ifdef MONITOR
+SYSTEM_OBJ=    locore.o modedefs.o \
+               param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
+.else
 SYSTEM_OBJ=    locore.o \
-               param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
+               param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
+.endif
 SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
 SYSTEM_LD_HEAD=        rm -f $@
 SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
@@ -104,8 +111,9 @@
 .if ${DEBUG} == "-g"
 LINKFLAGS+=    -X
 SYSTEM_LD_TAIL+=; \
-               echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
-               echo ${STRIP} ${STRIPFLAGS} $@; ${STRIP} ${STRIPFLAGS} $@
+               echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
+               echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
+               ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
 .else
 #LINKFLAGS+=   -S
 LINKFLAGS+=    -x
@@ -135,14 +143,14 @@
 __CLEANKERNEL: .USE
        @echo "${.TARGET}ing the kernel objects"
        rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
-           [Ee]rrs linterrs makelinks assym.h.tmp assym.h
+           [Ee]rrs linterrs makelinks assym.h.tmp assym.h modedefs.c
 
 __CLEANDEPEND: .USE
        rm -f .depend
 
 clean: __CLEANKERNEL
 
-cleandir: __CLEANKERNEL __CLEANDEPEND
+cleandir distclean: __CLEANKERNEL __CLEANDEPEND
 
 lint:
        @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -160,13 +168,25 @@
          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        sh makelinks && rm -f dontlink
 
-SRCS=  ${ARM26}/arm26/locore.S \
-       param.c ioconf.c ${CFILES} ${SFILES}
+SRCS=  ${ARM26}/arm26/locore.S param.c ioconf.c ${CFILES} ${SFILES}
+.ifdef MONITOR
+SRCS+= modedefs.c
+.endif
 depend: .depend
-.depend: ${SRCS} assym.h
-       ${MKDEP} ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-       ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S ${SFILES}
-#      ${MKDEP} -a ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} ${ARM26}/arm26/genassym.c
+.depend: ${SRCS} assym.h param.c
+       ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S
+       ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
+       test -z "${SFILES}" || ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
+       sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
+           ${CPPFLAGS} < ${ARM26}/arm26/genassym.cf
+       @sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
+       @rm -f assym.dep
+.ifdef MONITOR
+       ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} modedefs.c
+.endif
+
+dependall: depend all
+
 
 # depend on root or device configuration
 autoconf.o conf.o: Makefile
@@ -184,4 +204,22 @@
 locore.o: ${ARM26}/arm26/locore.S assym.h
        ${NORMAL_S}
 
+modedefs.c: ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} Makefile
+       awk -f ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c
+
+modedefs.o: modedefs.c
+       ${NORMAL_C}
+
+# The install target can be redefined by putting a
+# install-kernel-${MACHINE_NAME} target into /etc/mk.conf
+MACHINE_NAME!=  uname -n
+install: install-kernel-${MACHINE_NAME}
+.if !target(install-kernel-${MACHINE_NAME}})
+install-kernel-${MACHINE_NAME}:
+       rm -f /onetbsd
+       ln /netbsd /onetbsd
+       cp netbsd /nnetbsd
+       mv /nnetbsd /netbsd
+.endif
+
 %RULES



Home | Main Index | Thread Index | Old Index