Skip to content

Commit 93510cc

Browse files
committed
Add OPTLEVEL and EXTRA_LIBS Makefile variables
1 parent b5881a5 commit 93510cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GNUmakefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ LTOC = -flto
1919
# Uncomment to enable some verbose Makefile debugging
2020
#MKVERBOSE = 1
2121

22+
# Optimization flags for non-debugging builds
23+
OPTLEVEL ?= -O2
24+
2225
# Default libraries to use
23-
CURSESLIB = -lncurses -lutil
26+
CURSESLIB = -lncurses -lutil $(EXTRA_LIBS)
2427

2528
# Installation prefix
2629
PREFIX ?= /usr/local
@@ -39,7 +42,7 @@ ifdef DEBUG_VI
3942
CFLAGS += -DDEBUG=1 -g3 -ggdb -Og
4043
else
4144
# Optimizing
42-
CFLAGS += -O2 -fomit-frame-pointer
45+
CFLAGS += $(OPTLEVEL) -fomit-frame-pointer
4346
LDFLAGS += -s
4447
endif
4548

0 commit comments

Comments
 (0)