diff options
-rw-r--r-- | scripts/makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/makefile b/scripts/makefile index c1de16e..0b4f42b 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -4,6 +4,10 @@ OPTFLAGS != [ "$(RELEASE)" != "0" ] \ && echo "-O2" \ || echo "-O0" +LTO ?= 0 +LTOFLAGS != [ "$(LTO)" != "0" ] \ + && echo "-flto=auto" + DEBUG ?= 1 DEBUGFLAGS != [ "$(DEBUG)" != "0" ] \ && echo "-DDEBUG=1" \ @@ -34,8 +38,8 @@ OBFLAGS := -g # interpreter is allowed to have uninitialized values WARNFLAGS := -Wall -Wextra -Wno-maybe-uninitialized -COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(OBFLAGS) $(ASSERTFLAGS) \ - $(DEBUGFLAGS) +COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(LTOFLAGS) \ + $(OBFLAGS) $(ASSERTFLAGS) $(DEBUGFLAGS) INCLUDE_FLAGS := -I include |