From e82b0b99c16e8b0ab90e40a59c94723a16c04282 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 16 Sep 1994 14:30:25 +0000 Subject: [PATCH] Add support for DEBUG_FLAGS. If you say something like: make DEBUG_FLAGS=-g2 You can compile something for debugging at debugging level 2. It will also take care not to strip the resulting executable(s). --- share/mk/bsd.lib.mk | 8 +++++++- share/mk/bsd.own.mk | 4 +++- share/mk/bsd.port.subdir.mk | 4 +++- share/mk/bsd.prog.mk | 6 ++++-- share/mk/bsd.subdir.mk | 4 +++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 2dad90714f56..8d9fac564489 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 -# $Id: bsd.lib.mk,v 1.5 1994/08/26 18:58:10 wollman Exp $ +# $Id: bsd.lib.mk,v 1.6 1994/08/28 15:37:39 bde Exp $ # .if exists(${.CURDIR}/../Makefile.inc) @@ -16,6 +16,10 @@ CFLAGS+= -I${DESTDIR}/usr/include CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX} .endif +.if defined(DEBUG_FLAGS) +CFLAGS+= ${DEBUG_FLAGS} +.endif + INSTALL?= install LIBDIR?= /usr/lib LINTLIBDIR?= /usr/libdata/lint @@ -23,7 +27,9 @@ LIBGRP?= bin LIBOWN?= bin LIBMODE?= 444 +.if !defined(DEBUG_FLAGS) STRIP?= -s +.endif BINGRP?= bin BINOWN?= bin diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index dc17f18f6785..e6ea911b44f9 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,10 +1,12 @@ -# $Id: bsd.own.mk,v 1.5 1994/03/19 22:02:35 jkh Exp $ +# $Id: bsd.own.mk,v 1.1 1994/08/04 21:10:08 wollman Exp $ BINGRP?= bin BINOWN?= bin BINMODE?= 555 +.if !defined(DEBUG_FLAGS) STRIP?= -s +.endif COPY?= -c diff --git a/share/mk/bsd.port.subdir.mk b/share/mk/bsd.port.subdir.mk index ef3e5671dfd2..ce81a18a5d97 100644 --- a/share/mk/bsd.port.subdir.mk +++ b/share/mk/bsd.port.subdir.mk @@ -1,9 +1,11 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $Id: bsd.port.subdir.mk,v 1.3 1994/08/22 13:02:16 jkh Exp $ +# $Id: bsd.port.subdir.mk,v 1.4 1994/09/14 16:42:37 jkh Exp $ .MAIN: all +.if !defined(DEBUG_FLAGS) STRIP?= -s +.endif BINGRP?= bin BINOWN?= bin diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 9d6c65738b51..a60a1ab02e4e 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.4 1994/08/28 15:32:10 bde Exp $ +# $Id: bsd.prog.mk,v 1.5 1994/09/11 21:28:30 rgrimes Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -7,13 +7,15 @@ .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S -CFLAGS+=${COPTS} +CFLAGS+=${COPTS} ${DEBUG_FLAGS} .if defined(DESTDIR) CFLAGS+= -I${DESTDIR}/usr/include CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX} .endif +.if !defined(DEBUG_FLAGS) STRIP?= -s +.endif BINGRP?= bin BINOWN?= bin diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 68d9c383245c..b712afe99dab 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -1,9 +1,11 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $Id: bsd.subdir.mk,v 1.2 1994/08/04 21:09:26 wollman Exp $ +# $Id: bsd.subdir.mk,v 1.3 1994/08/28 15:35:30 bde Exp $ .MAIN: all +.if !defined(DEBUG_FLAGS) STRIP?= -s +.endif BINGRP?= bin BINOWN?= bin