Updated Developer guides (markdown)

Arun 2022-01-23 12:28:10 +05:30
parent c14f520b79
commit 75f5dd91a1

@ -194,6 +194,7 @@ In this example we will compile `nnn` on Ubuntu 20.04 with
- [netbsd-curses](https://github.com/sabotage-linux/netbsd-curses) - [netbsd-curses](https://github.com/sabotage-linux/netbsd-curses)
- [musl-fts](https://github.com/void-linux/musl-fts) - [musl-fts](https://github.com/void-linux/musl-fts)
- [musl libc](https://www.musl-libc.org/) - [musl libc](https://www.musl-libc.org/)
- [pcre](https://www.pcre.org/)
Discussion [thread](https://github.com/sabotage-linux/netbsd-curses/issues/46). Discussion [thread](https://github.com/sabotage-linux/netbsd-curses/issues/46).
See this [patch](https://github.com/jarun/nnn/issues/1081#issuecomment-868181380) to save some more on `terminfo`. See this [patch](https://github.com/jarun/nnn/issues/1081#issuecomment-868181380) to save some more on `terminfo`.
@ -228,6 +229,15 @@ See this [patch](https://github.com/jarun/nnn/issues/1081#issuecomment-868181380
make CC=musl-gcc CFLAGS=-O3 -j$(($(nproc)+1)) make CC=musl-gcc CFLAGS=-O3 -j$(($(nproc)+1))
sudo cp .libs/libfts.so.0.0.0 /opt/nnn-libs/libfts.so sudo cp .libs/libfts.so.0.0.0 /opt/nnn-libs/libfts.so
#### Get pcre and compile the shared and static binaries
wget https://downloads.sourceforge.net/pcre/pcre-8.45.tar.bz2
./configure --enable-unicode-properties --enable-pcre16 --enable-pcre32
make CFLAGS=-O3 CC=musl-gcc LDFLAGS=-static
sudo cp .libs/libpcre.a /opt/nnn-libs
make CFLAGS=-O3 CC=musl-gcc
sudo cp .libs/libpcre.so.1.2.13 /opt/nnn-libs
#### Compile `nnn` #### Compile `nnn`
# shared # shared
@ -236,7 +246,8 @@ See this [patch](https://github.com/jarun/nnn/issues/1081#issuecomment-868181380
# shared custom # shared custom
musl-gcc -O3 -DNORL -DNOLC -DNOMOUSE -DNOBATCH -DNOFIFO -DTOURBIN_QSORT -DNOSSN -DNOUG -DNOX11 -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 musl-gcc -O3 -DNORL -DNOLC -DNOMOUSE -DNOBATCH -DNOFIFO -DTOURBIN_QSORT -DNOSSN -DNOUG -DNOX11 -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
# Note: For static compilation append `-static` to the above commands # Note 1: For static compilation append `-static` to the above commands
# Note 2: To enable pcre, add `-I./pcre-8.45` and `-lpcre`
# strip the binary # strip the binary
strip nnn strip nnn