From 688afee41bd3439b06aeb0e59e0fc90dd8c63bab Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 26 Mar 2019 13:04:08 +1100 Subject: [PATCH] Only pass ncurses compilation flags to ncurses_ui.cc --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index af86e6c1..d1ec9de5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -60,7 +60,8 @@ os := $(shell uname) ifeq ($(os),Darwin) LIBS += -lncurses - CPPFLAGS += -I$(PREFIX)/opt/ncurses/include -I/opt/local/include + NCURSES_CFLAGS += -I$(PREFIX)/opt/ncurses/include + CPPFLAGS += -I/opt/local/include LDFLAGS += -L$(PREFIX)/opt/ncurses/lib -L/opt/local/lib else ifeq ($(os),FreeBSD) LIBS += -ltinfow -lncursesw @@ -81,7 +82,7 @@ else endif LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs ncursesw) - CPPFLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags ncursesw) + NCURSES_CFLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags ncursesw) LDFLAGS += -rdynamic endif @@ -100,6 +101,8 @@ kak$(suffix) : $(objects) .version.o .%$(suffix).o: %.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -MP -MF $(addprefix ., $(<:.cc=$(suffix).d)) -c -o $@ $< +.ncurses_ui$(suffix).o: CPPFLAGS += $(NCURSES_CFLAGS) + .version.o: .version.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<