Skip to content

Commit

Permalink
Merge pull request #33 from jserv/build-debug
Browse files Browse the repository at this point in the history
Add config to switch debug/release build
  • Loading branch information
WEI, CHEN committed Mar 24, 2018
2 parents daa4145 + dfcaa6b commit 9a9c82f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
OUT ?= ./build
SRC := src

CFLAGS = -Os -fPIC -g
CFLAGS = -Wall -fPIC
LDFLAGS = -lpthread

-include $(OUT)/local.mk

ifeq ("$(BUILD_DEBUG)","1")
CFLAGS += -Og -g
else
# Enable all the optimizations in release build
CFLAGS += -Ofast
endif

# FIXME: avoid hardcoded architecture flags. We might support advanced SIMD
# instructions for Intel and Arm later.
ifeq ("$(BUILD_AVX)","1")
Expand Down
3 changes: 3 additions & 0 deletions mk/defs.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Debug or release build
BUILD_DEBUG ?= 0

# Build AVX backend or not
BUILD_AVX ?= 0

Expand Down

0 comments on commit 9a9c82f

Please sign in to comment.