mirror of
https://github.com/jarun/nnn.git
synced 2024-09-11 13:06:14 +03:00
Updated Developer guides (markdown)
parent
bb0adb10e5
commit
2ba12f0483
@ -170,7 +170,11 @@ Install plugins and use the program option `-x`.
|
||||
|
||||
## Compile with musl libc
|
||||
|
||||
In this example we will compile `nnn` with [netbsd-curses](https://github.com/sabotage-linux/netbsd-curses) and [musl libc](https://www.musl-libc.org/) on Ubuntu 20.04.
|
||||
In this example we will compile `nnn` on Ubuntu 20.04 with
|
||||
|
||||
- [netbsd-curses](https://github.com/sabotage-linux/netbsd-curses)
|
||||
- [musl-fts](https://github.com/void-linux/musl-fts)
|
||||
- [musl libc](https://www.musl-libc.org/)
|
||||
|
||||
Discussion [thread](https://github.com/sabotage-linux/netbsd-curses/issues/46). The last known [good netbsd-curses commit](https://github.com/sabotage-linux/netbsd-curses/commit/f1fa19a1f36a25d0971b3d08449303e6af6f3da5) before a stuck cursor at status bar issue is introduced.
|
||||
|
||||
@ -180,27 +184,37 @@ Discussion [thread](https://github.com/sabotage-linux/netbsd-curses/issues/46).
|
||||
|
||||
sudo apt install musl musl-dev musl-tools
|
||||
|
||||
#### Get netbsd-curses
|
||||
|
||||
git clone https://github.com/sabotage-linux/netbsd-curses --depth=1
|
||||
|
||||
#### Compile the shared and static libraries
|
||||
#### Get netbsd-curses and compile the shared and static libraries
|
||||
|
||||
git clone https://github.com/sabotage-linux/netbsd-curses
|
||||
cd netbsd-curses
|
||||
sudo mkdir /opt/netbsd-curses
|
||||
git checkout f1fa19a1f36a25d0971b3d08449303e6af6f3da5
|
||||
make CC=musl-gcc CFLAGS="-O3 -Wall -fPIC" -j4 all
|
||||
sudo cp libcurses/libcurses.so libterminfo/libterminfo.so /opt/netbsd-curses/
|
||||
sudo mkdir /opt/nnn-libs
|
||||
sudo cp libcurses/libcurses.so libterminfo/libterminfo.so /opt/nnn-libs/
|
||||
make clean
|
||||
make CC=musl-gcc CFLAGS=-O3 LDFLAGS=-static all-static
|
||||
sudo cp libcurses/libcurses.a libterminfo/libterminfo.a /opt/netbsd-curses/
|
||||
sudo cp libcurses/libcurses.a libterminfo/libterminfo.a /opt/nnn-libs/
|
||||
|
||||
#### Get musl-fts and compile the shared and static binaries
|
||||
|
||||
git clone https://github.com/void-linux/musl-fts --depth=1
|
||||
cd musl-fts
|
||||
./bootstrap.sh
|
||||
./configure
|
||||
make CC=musl-gcc CFLAGS=-O3 LDFLAGS=-static -j$(($(nproc)+1))
|
||||
sudo cp .libs/libfts.a /opt/nnn-libs/
|
||||
mkae clean
|
||||
make CC=musl-gcc CFLAGS=-O3 -j$(($(nproc)+1))
|
||||
sudo cp .libs/libfts.so.0.0.0 /opt/nnn-libs/libfts.so
|
||||
|
||||
#### Compile `nnn`
|
||||
|
||||
# shared
|
||||
musl-gcc -O3 -DNORL -DNOMOUSE -std=c11 -Wall -Wextra -Wshadow -I/path_to/netbsd-curses/libcurses -o nnn src/nnn.c -Wl,-Bsymbolic-functions -L/opt/netbsd-curses -lcurses -lterminfo
|
||||
musl-gcc -O3 -DNORL -DNOMOUSE -std=c11 -Wall -Wextra -Wshadow -I/path_to/netbsd-curses/libcurses -I/path_to/musl-fts -o nnn src/nnn.c -Wl,-Bsymbolic-functions -lpthread -L/opt/nnn-libs -lcurses -lterminfo -lfts
|
||||
|
||||
# shared custom
|
||||
musl-gcc -O3 -DNORL -DNOLC -DNOMOUSE -DNOBATCH -DNOFIFO -DTOURBIN_QSORT -DNOSSN -DNOUG -DNOX11 -std=c11 -Wall -Wextra -Wshadow -march=corei7 -I/path_to/netbsd-curses/libcurses -o nnn src/nnn.c -Wl,-Bsymbolic-functions -L/opt/netbsd-curses -lcurses -lterminfo
|
||||
musl-gcc -O3 -DNORL -DNOLC -DNOMOUSE -DNOBATCH -DNOFIFO -DTOURBIN_QSORT -DNOSSN -DNOUG -DNOX11 -std=c11 -Wall -Wextra -Wshadow -march=corei7 -I/path_to/netbsd-curses/libcurses -I/path_to/musl-fts -o nnn src/nnn.c -Wl,-Bsymbolic-functions -lpthread -L/opt/nnn-libs -lcurses -lterminfo -lfts
|
||||
|
||||
# Note: For static compilation append `-static` to the above commands
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user