mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-18 17:02:06 +03:00
66 lines
1.4 KiB
Plaintext
66 lines
1.4 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++14 -Wall -Wno-unused-parameter -Wno-reorder -Wno-sign-compare -Wno-address -Wno-noexcept-type -Wno-unknown-attributes -Wno-unknown-warning-option
|
|
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
|
|
CPPFLAGS += -I/usr/local/opt/ncurses/include
|
|
LDFLAGS += -L/usr/local/opt/ncurses/lib
|
|
else
|
|
ifeq (@(TUP_PLATFORM),win32)
|
|
LIBS += -lncursesw -ldbghelp
|
|
CPPFLAGS += -D_XOPEN_SOURCE=700
|
|
else
|
|
LIBS += `pkg-config --libs ncursesw`
|
|
CPPFLAGS += `pkg-config --cflags 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 |>
|
|
!ln = |> ln -sf %f %o |>
|
|
|
|
:foreach *.cc |> !cxx |> .%B$(suffix).o {objects}
|
|
:{objects} |> !ld |> kak$(suffix)
|
|
:kak$(suffix) |> !ln |> kak
|