diff --git a/Makefile b/Makefile index 568945b..ef10598 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,8 @@ endif ifeq "$(shell uname)" "Linux" CFLAGS += -ffunction-sections -fdata-sections - CFLAGS += -DHAVE_READLINE LDFLAGS += -Wl,--gc-sections - LIBREADLINE += -lreadline + HAVE_READLINE := yes endif ifeq "$(build)" "debug" @@ -38,6 +37,11 @@ else LDFLAGS += -Wl,-s endif +ifeq "$(HAVE_READLINE)" "yes" + CFLAGS += -DHAVE_READLINE + LIBREADLINE += -lreadline +endif + CFLAGS += $(XCFLAGS) # You shouldn't need to edit anything below here.