summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/conf/Makefile.hp300
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-25 06:37:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-25 06:37:20 +0000
commite5f403bb164d8ffbcf3ed2dfb761fe37d9a5db7e (patch)
treef79a6c534d589d386f5fdf45e4c8fb5f2a221a2f /sys/arch/hp300/conf/Makefile.hp300
parentfdab626a6398ea411367b27d210f9c1b227f6283 (diff)
sync w/ Net 960424
Diffstat (limited to 'sys/arch/hp300/conf/Makefile.hp300')
-rw-r--r--sys/arch/hp300/conf/Makefile.hp300175
1 files changed, 92 insertions, 83 deletions
diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300
index 066f6bc6200..36cfc3ce640 100644
--- a/sys/arch/hp300/conf/Makefile.hp300
+++ b/sys/arch/hp300/conf/Makefile.hp300
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile.hp300,v 1.28 1995/10/22 06:05:21 thorpej Exp $
+# $OpenBSD: Makefile.hp300,v 1.6 1996/04/25 06:36:20 mickey Exp $
+# $NetBSD: Makefile.hp300,v 1.38 1996/03/01 17:03:17 scottr Exp $
-# @(#)Makefile.hp300 8.2 (Berkeley) 1/23/94
-#
# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
@@ -9,7 +8,7 @@
# Most changes should be made in the machine description
# /sys/arch/hp300/conf/``machineid''
# after which you should do
-# config machineid
+# config machineid
# Machine generic makefile changes should be made in
# /sys/arch/hp300/conf/Makefile.hp300
# after which config should be rerun for all machines of that type.
@@ -20,23 +19,25 @@
# -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas
+# DEBUG is set to -g if debugging.
+# PROF is set to -pg if profiling.
-# DEBUG is set to -g by config if debugging is requested (config -g).
-# PROF is set to -pg by config if profiling is requested (config -p).
-AS= as ${DEBUG}
-AWK= awk
-CC= cc ${DEBUG}
-CPP= cpp
-LD= ld
-TOUCH= touch -f -c
+AS?= as
+CC?= cc
+CPP?= cpp
+LD?= ld
+STRIP?= strip -d
+TOUCH?= touch -f -c
# source tree is located via $S relative to the compilation directory
S= ../../../..
HP300= ../..
-INCLUDES= -I. -I$S/arch -I$S -I$S/sys
-COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Dhp300 -DFPCOPROC
-CFLAGS= -O6 -Werror ${COPTS}
+INCLUDES= -I. -I$S/arch -I$S
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Dhp300 -DFPCOPROC
+CFLAGS= ${DEBUG} -O2 -Werror -msoft-float
+AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+LINKFLAGS= -n -Ttext 0 -e start
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
@@ -62,111 +63,119 @@ LIBCOMPAT= ${COMPATLIB_PROF}
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
# is marked as config-dependent.
-NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
-NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
-
-DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
-DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
+NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-PROFILE_C= ${CC} -S -c ${COPTS} $<; \
- sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
- ${AS} -o $@; \
- rm -f $*.s
+DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@
-NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
+NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
+NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
%OBJS
%CFILES
+#%SFILES
+
# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= locore.o ${FPSP} ${OBJS} param.o ioconf.o \
- ${LIBKERN} ${LIBCOMPAT}
+SYSTEM_OBJ= locore.o ${FPSP} \
+ param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
-SYSTEM_LD= -@if [ X${DEBUG} = X-g ]; \
- then strip=-X; \
- else strip=-x; \
- fi; \
- echo ${LD} $$strip -n -T 0 -o $@ -e start '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -n -T 0 -o $@ -e start ${SYSTEM_OBJ} vers.o
-SYSTEM_LD_TAIL= @size $@; chmod 755 $@; \
- [ X${DEBUG} = X-g ] && { \
+SYSTEM_LD_HEAD= @rm -f $@
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_TAIL= @size $@; chmod 755 $@
+
+DEBUG?=
+.if ${DEBUG} == "-g"
+LINKFLAGS+= -X
+SYSTEM_LD_TAIL+=; \
echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
- echo strip -d $@; strip -d $@; } || true
+ echo ${STRIP} $@; ${STRIP} $@
+.else
+LINKFLAGS+= -x
+.endif
%LOAD
-vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
- sh $S/conf/newvers.sh
- ${CC} ${CFLAGS} -c vers.c
+assym.h: genassym
+ ./genassym >assym.h
-clean::
- rm -f eddep *netbsd netbsd.gdb tags *.o locore.i \
- [a-z]*.s [Ee]rrs linterrs makelinks genassym
+genassym: genassym.o
+ ${CC} -o $@ genassym.o
-lint: /tmp param.c
- @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
- ${HP300}/hp300/Locore.c ${CFILES} ${HP300}/hp300/swapgeneric.c \
- ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
+genassym.o: ${HP300}/hp300/genassym.c
+ ${NORMAL_C_C}
-locore.o: assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s
-locore.o: ${HP300}/include/trap.h ${HP300}/include/psl.h ${HP300}/include/pte.h
-locore.o: ${HP300}/include/cpu.h
- ${CPP} -DLOCORE ${COPTS} ${HP300}/hp300/locore.s | ${AS} -o locore.o
+param.c: $S/conf/param.c
+ rm -f param.c
+ cp $S/conf/param.c .
-# the following is necessary because autoconf.o depends on #if GENERIC
-autoconf.o: Makefile
+param.o: param.c Makefile
+ ${NORMAL_C_C}
-# the following are necessary because the files depend on the types of
-# hp cpu's included in the system configuration
-machdep.o sys_machdep.o pmap.o pmap_bootstrap.o trap.o dma.o: Makefile
+ioconf.o: ioconf.c
+ ${NORMAL_C}
-# depend on network or filesystem configuration
-uipc_domain.o uipc_proto.o vfs_conf.o locore.o: Makefile
-if_tun.o if_loop.o if_ethersubr.o: Makefile
-in_proto.o: Makefile
+vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
+ sh $S/conf/newvers.sh
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
-# depend on maxusers
-assym.s: Makefile
-assym.s: genassym
- ./genassym >assym.s
+clean::
+ rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
+ [Ee]rrs linterrs makelinks genassym genassym.o assym.h
-genassym: ${HP300}/hp300/genassym.c Makefile
- ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \
- ${HP300}/hp300/genassym.c
+lint:
+ @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ ${HP300}/hp300/Locore.c ${CFILES} ${HP300}/hp300/swapgeneric.c \
+ ioconf.c param.c | \
+ grep -v 'static function .* unused'
-depend: assym.s param.c
- mkdep ${COPTS} ${CFILES} ioconf.c param.c
- mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c
+tags:
+ @echo "see $S/kern/Makefile for tags"
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
sort -u | comm -23 - dontlink | \
- sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
+ sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-tags:
- @echo "see $S/kern/Makefile for tags"
+SRCS= ${HP300}/hp300/locore.s \
+ param.c ioconf.c ${CFILES} ${SFILES}
+depend: .depend
+.depend: ${SRCS} assym.h param.c
+ mkdep ${AFLAGS} ${CPPFLAGS} ${HP300}/hp300/locore.s
+ mkdep -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
+ -if test -n "${SFILES}"; then \
+ mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
+ fi
+ mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${HP300}/hp300/genassym.c
+
+
+# depend on root or device configuration
+autoconf.o conf.o: Makefile
+
+# depend on network or filesystem configuration
+uipc_domain.o uipc_proto.o vfs_conf.o: Makefile
+if_tun.o if_loop.o if_ethersubr.o: Makefile
+in_proto.o: Makefile
-ioconf.o: ioconf.c
- ${CC} -c ${CFLAGS} ioconf.c
+# depend on maxusers
+genassym.o machdep.o: Makefile
-param.c: $S/conf/param.c
- rm -f param.c
- cp $S/conf/param.c .
+# depend on CPU configuration
+dma.o genassym.o hpux_machdep.o locore.o machdep.o pmap.o pmap_boostrap.o sys_machdep.o trap.o: Makefile
-param.o: param.c Makefile
- ${CC} -c ${CFLAGS} ${PARAM} param.c
+
+locore.o: ${HP300}/hp300/locore.s assym.h
+ ${NORMAL_S}
%RULES