kakoune/contrib/Tupfile
Frank LENORMAND 0b22938bce Remove the option that excludes the -pedantic flag from CXXFLAGS
Allowing compilation without the `-pedantic` flag was a temporary trick
to work around a bug involving `libstdc++` and `musl`. A fix has been
pushed for the issue in the appropriate repositories, we no longer need
the optional non-pedantic compilation option.
2017-01-14 11:55:20 +03:00

64 lines
1.2 KiB
Plaintext

##
## Tupfile for kakoune
## by lenormf
##
## How to use:
## Initialize a tup database in the main directory with `tup init`
## Create a symlink from `contrib/Tupfile` to `src/Tupfile`
## Start the build with the `tup` command
##
.gitignore
debug = yes
static = no
suffix = .opt
CXX = g++
CXXFLAGS = -pedantic -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -Wno-address
CPPFLAGS =
LDFLAGS =
LIBS =
ifeq ($(debug),yes)
CXXFLAGS += -g
CPPFLAGS += -DKAK_DEBUG
suffix = .debug
else
CXXFLAGS += -O3
endif
ifeq ($(static),yes)
LIBS += -ltinfo -lgpm
LDFLAGS += -static -pthread
endif
ifeq (@(TUP_PLATFORM),macosx)
LIBS += -lncurses -lboost_regex-mt
CPPFLAGS += -I/usr/local/opt/ncurses/include
LDFLAGS += -L/usr/local/opt/ncurses/lib
else
ifeq (@(TUP_PLATFORM),win32)
LIBS += -lncursesw -lboost_regex -ldbghelp
CPPFLAGS += -D_XOPEN_SOURCE=700
else
LIBS += -lncursesw -lboost_regex
CPPFLAGS += -I/usr/include/ncursesw
ifeq ($(CXX),g++)
LDFLAGS += -rdynamic
endif
endif
endif
ifeq ($(CXX),clang++)
CXXFLAGS += -Wno-unknown-attributes
endif
!cxx = |> $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c %f -o %o |>
!ld = |> $(CXX) $(LDFLAGS) $(LIBS) %f -o %o |>
:foreach *.cc |> !cxx |> obj/%B$(suffix).o {objects}
:{objects} |> !ld |> kak