1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-22 19:11:40 +03:00

Update the Tupfile

Compiling with `clang++` was also tweaked, in order to avoid unknown
attributes warnings.
This commit is contained in:
Frank LENORMAND 2016-12-22 10:06:57 +03:00
parent 3a6167ae62
commit aac665f2b3

View File

@ -11,25 +11,42 @@
.gitignore .gitignore
debug = yes debug = yes
static = no
pedantic = yes
suffix = .opt
CXX = g++ CXX = g++
CXXFLAGS = -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -pedantic CXXFLAGS = -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -Wno-address
CPPFLAGS = CPPFLAGS =
LDFLAGS = LDFLAGS =
LIBS = LIBS =
ifeq ($(debug),yes) ifeq ($(debug),yes)
CXXFLAGS += -O0 -g CXXFLAGS += -g
CPPFLAGS += -DKAK_DEBUG CPPFLAGS += -DKAK_DEBUG
suffix = .debug
else else
CXXFLAGS += -O3 CXXFLAGS += -O3
endif endif
ifeq ($(static),yes)
LIBS += -ltinfo -lgpm
LDFLAGS += -static -pthread
endif
ifeq ($(pedantic),yes)
CXXFLAGS += -pedantic
endif
ifeq (@(TUP_PLATFORM),macosx) ifeq (@(TUP_PLATFORM),macosx)
LIBS += -lncurses -lboost_regex-mt LIBS += -lncurses -lboost_regex-mt
CPPFLAGS += -I/usr/local/opt/ncurses/include
LDFLAGS += -L/usr/local/opt/ncurses/lib
else else
ifeq (@(TUP_PLATFORM),win32) ifeq (@(TUP_PLATFORM),win32)
LIBS += -lncursesw -lboost_regex -ldbghelp LIBS += -lncursesw -lboost_regex -ldbghelp
CPPFLAGS += -D_XOPEN_SOURCE=700
else else
LIBS += -lncursesw -lboost_regex LIBS += -lncursesw -lboost_regex
CPPFLAGS += -I/usr/include/ncursesw CPPFLAGS += -I/usr/include/ncursesw
@ -40,8 +57,12 @@ else
endif endif
endif endif
ifeq ($(CXX),clang++)
CXXFLAGS += -Wno-unknown-attributes
endif
!cxx = |> $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c %f -o %o |> !cxx = |> $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c %f -o %o |>
!ld = |> $(CXX) $(LDFLAGS) $(LIBS) %f -o %o |> !ld = |> $(CXX) $(LDFLAGS) $(LIBS) %f -o %o |>
:foreach *.cc |> !cxx |> obj/%B.o {objects} :foreach *.cc |> !cxx |> obj/%B$(suffix).o {objects}
:{objects} |> !ld |> kak :{objects} |> !ld |> kak