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).
This commit is contained in:
Jordan K. Hubbard 1994-09-16 14:30:25 +00:00
parent df9ab3049d
commit e82b0b99c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2827
5 changed files with 20 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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