Skip to content

Commit 49fcbc5

Browse files
committed
Makefile: support specifying DEBUG=1
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 6b93651 commit 49fcbc5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# PREFIX should be only writable by the root to avoid privilege escalation with launchd or sudo
22
PREFIX ?= /opt/socket_vmnet
33

4+
# DEBUG=1 is known to break reproducible builds
5+
DEBUG ?=
6+
47
export SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
58
# https://reproducible-builds.org/docs/archives/
69
TAR ?= gtar --sort=name --mtime="@$(SOURCE_DATE_EPOCH)" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
@@ -11,6 +14,9 @@ DIFFOSCOPE ?= diffoscope
1114
STRIP ?= strip
1215

1316
CFLAGS ?= -O3
17+
ifeq ($(DEBUG),1)
18+
CFLAGS += -g
19+
endif
1420

1521
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
1622
VERSION_TRIMMED := $(VERSION:v%=%)

0 commit comments

Comments
 (0)