Skip to content

Commit

Permalink
Makefile: support specifying DEBUG=1
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Nov 21, 2024
1 parent 6b93651 commit 83303fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# PREFIX should be only writable by the root to avoid privilege escalation with launchd or sudo
PREFIX ?= /opt/socket_vmnet

DEBUG ?=

export SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
# https://reproducible-builds.org/docs/archives/
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
Expand All @@ -11,6 +13,9 @@ DIFFOSCOPE ?= diffoscope
STRIP ?= strip

CFLAGS ?= -O3
ifeq ($(DEBUG),1)
CFLAGS += -g
endif

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

0 comments on commit 83303fd

Please sign in to comment.