summaryrefslogtreecommitdiff
path: root/sys/arch/socppc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:59:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:59:17 +0000
commit692ae6fe82dd7e240b408d4ac6bb900a9e450ac0 (patch)
treec99785bbaccc3c8595e5e85bafd04c13fccb569e /sys/arch/socppc
parent49384741ccb14f3d28d08ccd3395dfcabeee2828 (diff)
Reduce differences between the Makefile.* files for all architectures.
ok various people, tested by fewer people, tested by me on 15.
Diffstat (limited to 'sys/arch/socppc')
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc42
1 files changed, 19 insertions, 23 deletions
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index 26a855d4982..af2547b2df4 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.19 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.socppc,v 1.20 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -11,11 +11,11 @@
.include <bsd.own.mk>
MKDEP?= mkdep
-STRIP?= strip
SIZE?= size
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
-.ifndef S
+.ifndef S
S!= cd ../../../..; pwd
.endif
@@ -25,18 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -Wa,-many -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+
+CMACHFLAGS= -msoft-float -Wa,-many
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -D_LOCORE -Wa,-many
+AFLAGS= -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 200000 -e start --warn-common
STRIPFLAGS= -g -X -x
@@ -49,19 +53,11 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, 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.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
-
%OBJS
@@ -76,7 +72,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+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 $@
@@ -106,7 +102,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -119,13 +115,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
- ioconf.c param.c | \
- grep -v 'static function .* unused'
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"