summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k/conf/Makefile.mvme68k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme68k/conf/Makefile.mvme68k')
-rw-r--r--sys/arch/mvme68k/conf/Makefile.mvme68k74
1 files changed, 37 insertions, 37 deletions
diff --git a/sys/arch/mvme68k/conf/Makefile.mvme68k b/sys/arch/mvme68k/conf/Makefile.mvme68k
index a8dfe59c17a..4b929ef061f 100644
--- a/sys/arch/mvme68k/conf/Makefile.mvme68k
+++ b/sys/arch/mvme68k/conf/Makefile.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme68k,v 1.7 1996/05/27 22:11:36 chuck Exp $
+# $OpenBSD: Makefile.mvme68k,v 1.8 1997/03/31 00:23:54 downsj Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -23,17 +23,24 @@ AS?= as
CC?= cc
CPP?= cpp
LD?= ld
-STRIP?= strip -d
-TOUCH?= touch -f -c
+STRIP?= strip
+COPTS?= -O2
# source tree is located via $S relative to the compilation directory
S= ../../../..
MVME68K=../..
-INCLUDES= -I. -I$S/arch -I$S
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmvme68k
-CFLAGS= ${DEBUG} -O2 -Werror
+INCLUDES= -I. -I$S/arch -I$S -nostdinc
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dmvme68k
+CWARNFLAGS= -Werror
+CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} -msoft-float
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+LINKFLAGS= -Ttext 0x10000 -z -e start
+STRIPFLAGS= -d
+
+HOSTCC= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
@@ -54,19 +61,13 @@ LIBCOMPAT= ${COMPATLIB_PROF}
### for the Motorola 68040 Floating Point Software Product
.include "$S/arch/m68k/fpsp/Makefile.inc"
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
+# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
-DRIVER_C= ${CC} -c ${CFLAGS} ${CPPFLAGS} ${PROF} $<
-DRIVER_C_C= ${CC} -c ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
+
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -79,37 +80,37 @@ NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
+SYSTEM_OBJ= locore.o ${FPSP} \
+ param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
+SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
+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"
-LDX=-X
+LINKFLAGS+= -X
+SYSTEM_LD_TAIL+=; \
+ echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
+ echo ${STRIP} ${STRIPFLAGS} $@; ${STRIP} ${STRIPFLAGS} $@
.else
-LDX=-x
+LINKFLAGS+= -S
.endif
-SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o ${FPSP} \
- ${LIBKERN} ${LIBCOMPAT}
-SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
-SYSTEM_LD= @${LD} ${LDX} -Ttext 0x10000 -z -o $@ -e start \
- ${SYSTEM_OBJ} vers.o
-SYSTEM_LD_TAIL= @echo rearranging symbols; size $@; chmod 755 $@
%LOAD
-assym.h: genassym
- ./genassym >assym.h
-
-genassym: genassym.o
- ${CC} -o $@ genassym.o
-
-genassym.o: ${MVME68K}/mvme68k/genassym.c
- ${NORMAL_C_C}
+assym.h: $S/kern/genassym.sh ${MVME68K}/mvme68k/genassym.cf
+ sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
+ ${PARAM} < ${MVME68K}/mvme68k/genassym.cf > assym.h.tmp && \
+ mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
rm -f param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
ioconf.o: ioconf.c
${NORMAL_C}
@@ -121,7 +122,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
rm -f eddep bsd bsd.gdb tags *.o locore.i \
- [a-z]*.s [Ee]rrs linterrs makelinks genassym
+ [a-z]*.s [Ee]rrs linterrs makelinks assym.h
lint: /tmp param.c
@lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
@@ -148,7 +149,6 @@ depend:: .depend
mkdep ${AFLAGS} ${CPPFLAGS} ${MVME68K}/mvme68k/locore.s
mkdep -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${MVME68K}/mvme68k/genassym.c
# depend on root or device configuration
@@ -160,7 +160,7 @@ if_tun.o if_loop.o if_ethersubr.o: Makefile
in_proto.o: Makefile
# depend on maxusers
-genassym.o machdep.o: Makefile
+assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile