summaryrefslogtreecommitdiff
path: root/extra/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'extra/Makefile')
-rw-r--r--extra/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/Makefile b/extra/Makefile
index 0b6c7f7cf7..e7ef73ec00 100644
--- a/extra/Makefile
+++ b/extra/Makefile
@@ -6,10 +6,18 @@ PROG= lightbar
HEADERS= simulation.h
SRCS= main.c windows.c input.c ../common/lightbar.c
+# comment this out if you don't have libreadline installed
+HAS_GNU_READLINE=1
+
INCLUDE= -I. -I../include
CFLAGS= -g -Wall -Werror -pthread ${INCLUDE} -DLIGHTBAR_SIMULATION
LDFLAGS = -lX11 -lxcb -lrt
+ifneq ($(HAS_GNU_READLINE),)
+CFLAGS += -DHAS_GNU_READLINE
+LDFLAGS += -lreadline
+endif
+
all: ${PROG}
${PROG} : ${SRCS} ${HEADERS} Makefile