Builds ncurses; ignore ncurses resources
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/prebuilt
|
||||
/libevent-*
|
||||
/ncurses-*
|
||||
|
||||
53
Makefile
53
Makefile
@@ -12,9 +12,16 @@ BUILD_PREBUILT_TMUX = $(BUILD_DIR)/prebuilt/tmux
|
||||
LIBEVENT = libevent-$(LIBEVENT_VERSION)
|
||||
LIBEVENT_TGZ = $(LIBEVENT).tar.gz
|
||||
LIBEVENT_URL = https://github.com/libevent/libevent/releases/download/release-$(LIBEVENT_VERSION)/$(LIBEVENT_TGZ)
|
||||
LIBEVENT_LIB = $(BUILD_PREBUILT_DEP)/lib/libevent.a
|
||||
LIBEVENT_MAK = $(LIBEVENT)/Makefile
|
||||
LIBEVENT_A = $(LIBEVENT)/.libs/libevent.a
|
||||
|
||||
NCURSES_URL =
|
||||
|
||||
NCURSES = ncurses-$(NCURSES_VERSION)
|
||||
NCURSES_TGZ = $(NCURSES).tar.gz
|
||||
NCURSES_URL = https://invisible-mirror.net/archives/ncurses/$(NCURSES_TGZ)
|
||||
NCURSES_LIB = $(BUILD_PREBUILT_DEP)/lib/libncurses.a
|
||||
NCURSES_MAK = $(NCURSES)/Makefile
|
||||
NCURSES_A = $(NCURSES)/lib/libncurses.a
|
||||
|
||||
TMUX := tmux-$(TMUX_VERSION).musl-bin.tar.gz
|
||||
|
||||
@@ -29,28 +36,58 @@ help: ## Display this help message
|
||||
$(lastword $(MAKEFILE_LIST))
|
||||
|
||||
clean: ## Remove all build and dist directories
|
||||
-rm -rf prebuilt $(LIBEVENT)
|
||||
-rm -rf prebuilt $(LIBEVENT) $(NCURSES)
|
||||
|
||||
tmux: ## Build static tmux archive
|
||||
$(MAKE) $(TMUX)
|
||||
|
||||
####
|
||||
#### Libevent
|
||||
#### Ncurses
|
||||
####
|
||||
ncurses: ## Download and build the ncurses libraru
|
||||
$(MAKE) $(NCURSES_LIB)
|
||||
|
||||
$(NCURSES_LIB): $(NCURSES_A)
|
||||
$(MAKE) -C $(NCURSES) install
|
||||
|
||||
$(NCURSES_A): $(NCURSES_MAK)
|
||||
$(MAKE) -C $(NCURSES) -j4 all
|
||||
|
||||
$(NCURSES_MAK): $(NCURSES)
|
||||
cd $(NCURSES) \
|
||||
&& ./configure \
|
||||
--prefix="$(BUILD_PREBUILT_DEP)" \
|
||||
--without-cxx \
|
||||
--without-cxx-binding \
|
||||
--with-termlib \
|
||||
--enable-termcap \
|
||||
--enable-ext-colors \
|
||||
--enable-ext-mouse \
|
||||
--enable-bsdpad \
|
||||
--enable-opaque-curses \
|
||||
--with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo:/lib/terminfo \
|
||||
--with-termpath=/etc/termcap:/usr/share/misc/termcap \
|
||||
--with-fallbacks="linux,xterm,xterm-color,xterm-256color,vt100"
|
||||
|
||||
$(NCURSES): $(NCURSES_TGZ)
|
||||
tar xzf $(NCURSES_TGZ)
|
||||
|
||||
$(NCURSES_TGZ):
|
||||
curl -Lk $(NCURSES_URL) -o $(NCURSES_TGZ)
|
||||
|
||||
####
|
||||
#### Libevent
|
||||
####
|
||||
libevent: ## Download and build libevent library
|
||||
$(MAKE) $(BUILD_PREBUILT_DEP)/lib/libevent.a
|
||||
$(MAKE) $(LIBEVENT_LIB)
|
||||
|
||||
$(BUILD_PREBUILT_DEP)/lib/libevent.a: $(LIBEVENT)/.libs/libevent.a
|
||||
$(LIBEVENT_LIB): $(LIBEVENT_A)
|
||||
$(MAKE) -C $(LIBEVENT) install
|
||||
|
||||
$(LIBEVENT)/.libs/libevent.a: $(LIBEVENT)/Makefile
|
||||
$(LIBEVENT_A): $(LIBEVENT_MAK)
|
||||
$(MAKE) -C $(LIBEVENT) -j4 all
|
||||
|
||||
$(LIBEVENT)/Makefile: $(LIBEVENT)
|
||||
$(LIBEVENT_MAK): $(LIBEVENT)
|
||||
cd $(LIBEVENT) \
|
||||
&& ./configure \
|
||||
--prefix="$(BUILD_PREBUILT_DEP)" \
|
||||
|
||||
Reference in New Issue
Block a user