Conditionally define CC, CWARNOPTS, etc., so that `makeoptions' in

config files actually does something useful.
This commit is contained in:
wollman 1994-10-18 19:45:46 +00:00
parent ccd85e8003
commit 7e9c953924
3 changed files with 36 additions and 45 deletions

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz # Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91 # from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.44 1994/10/03 18:51:35 phk Exp $ # $Id: Makefile.i386,v 1.45 1994/10/03 23:03:38 rgrimes Exp $
# #
# Makefile for FreeBSD # Makefile for FreeBSD
# #
@ -20,19 +20,19 @@
# -DTRACE compile in kernel tracing hooks # -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas # -DQUOTA compile in file system quotas
# #
TOUCH= touch -f -c TOUCH?= touch -f -c
LD= /usr/bin/ld LD?= /usr/bin/ld
CC= cc CC?= cc
CPP= cpp CPP?= cpp
DBSYM= /usr/sbin/dbsym DBSYM?= /usr/sbin/dbsym
.if defined(DEBUG) .if defined(DEBUG)
.if defined(NOSTRIP) .if defined(NOSTRIP)
STRIP= echo '(skipping) strip' STRIP?= echo '(skipping) strip'
.else .else
STRIP= cp $@ $@.sym; strip STRIP?= cp $@ $@.sym; strip
.endif .endif
.else .else
STRIP= strip STRIP?= strip
.endif .endif
.if exists(./@/.) .if exists(./@/.)
@ -42,9 +42,8 @@ S= ../..
.endif .endif
I386= ${S}/i386 I386= ${S}/i386
.if !defined(CWARNFLAGS) CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
.endif
# #
# The following flag is next up for working on: # The following flag is next up for working on:
# -Wnested-externs # -Wnested-externs
@ -52,9 +51,7 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
# When working on removing warnings from code, the `-Werror' flag should be # When working on removing warnings from code, the `-Werror' flag should be
# of material assistance. # of material assistance.
# #
.if !defined(COPTFLAGS) COPTFLAGS?=-O
COPTFLAGS=-O
.endif
INCLUDES= -I. -I$S -I$S/sys INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS= ASFLAGS=

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz # Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91 # from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.44 1994/10/03 18:51:35 phk Exp $ # $Id: Makefile.i386,v 1.45 1994/10/03 23:03:38 rgrimes Exp $
# #
# Makefile for FreeBSD # Makefile for FreeBSD
# #
@ -20,19 +20,19 @@
# -DTRACE compile in kernel tracing hooks # -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas # -DQUOTA compile in file system quotas
# #
TOUCH= touch -f -c TOUCH?= touch -f -c
LD= /usr/bin/ld LD?= /usr/bin/ld
CC= cc CC?= cc
CPP= cpp CPP?= cpp
DBSYM= /usr/sbin/dbsym DBSYM?= /usr/sbin/dbsym
.if defined(DEBUG) .if defined(DEBUG)
.if defined(NOSTRIP) .if defined(NOSTRIP)
STRIP= echo '(skipping) strip' STRIP?= echo '(skipping) strip'
.else .else
STRIP= cp $@ $@.sym; strip STRIP?= cp $@ $@.sym; strip
.endif .endif
.else .else
STRIP= strip STRIP?= strip
.endif .endif
.if exists(./@/.) .if exists(./@/.)
@ -42,9 +42,8 @@ S= ../..
.endif .endif
I386= ${S}/i386 I386= ${S}/i386
.if !defined(CWARNFLAGS) CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
.endif
# #
# The following flag is next up for working on: # The following flag is next up for working on:
# -Wnested-externs # -Wnested-externs
@ -52,9 +51,7 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
# When working on removing warnings from code, the `-Werror' flag should be # When working on removing warnings from code, the `-Werror' flag should be
# of material assistance. # of material assistance.
# #
.if !defined(COPTFLAGS) COPTFLAGS?=-O
COPTFLAGS=-O
.endif
INCLUDES= -I. -I$S -I$S/sys INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS= ASFLAGS=

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz # Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91 # from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.44 1994/10/03 18:51:35 phk Exp $ # $Id: Makefile.i386,v 1.45 1994/10/03 23:03:38 rgrimes Exp $
# #
# Makefile for FreeBSD # Makefile for FreeBSD
# #
@ -20,19 +20,19 @@
# -DTRACE compile in kernel tracing hooks # -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas # -DQUOTA compile in file system quotas
# #
TOUCH= touch -f -c TOUCH?= touch -f -c
LD= /usr/bin/ld LD?= /usr/bin/ld
CC= cc CC?= cc
CPP= cpp CPP?= cpp
DBSYM= /usr/sbin/dbsym DBSYM?= /usr/sbin/dbsym
.if defined(DEBUG) .if defined(DEBUG)
.if defined(NOSTRIP) .if defined(NOSTRIP)
STRIP= echo '(skipping) strip' STRIP?= echo '(skipping) strip'
.else .else
STRIP= cp $@ $@.sym; strip STRIP?= cp $@ $@.sym; strip
.endif .endif
.else .else
STRIP= strip STRIP?= strip
.endif .endif
.if exists(./@/.) .if exists(./@/.)
@ -42,9 +42,8 @@ S= ../..
.endif .endif
I386= ${S}/i386 I386= ${S}/i386
.if !defined(CWARNFLAGS) CWARNFLAGS?=-W -Wreturn-type -Wcomment -Wredundant-decls
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
.endif
# #
# The following flag is next up for working on: # The following flag is next up for working on:
# -Wnested-externs # -Wnested-externs
@ -52,9 +51,7 @@ CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
# When working on removing warnings from code, the `-Werror' flag should be # When working on removing warnings from code, the `-Werror' flag should be
# of material assistance. # of material assistance.
# #
.if !defined(COPTFLAGS) COPTFLAGS?=-O
COPTFLAGS=-O
.endif
INCLUDES= -I. -I$S -I$S/sys INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS= ASFLAGS=