elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
buildext.sh
File editor
#!/usr/bin/env bash # # buildext.sh - build application repositories and internal OWC/C86 apps and libraries # External repositories are cloned into extapps/. # If OpenWatcom C installed and WATCOM= present, external OWC apps are built, # The ELKS C Library is also built for OpenWatcom and C86, along with sample apps. # # This build script is used by CI jobs and local developers to fetch and build # external application repositories plus ELKS-side toolchain targets. # # Usage: ./buildext.sh [all | <project ...> ] # Currently supported projects are: # Name Compiler Desc # microwindows ia16-elf-gcc Nano-X Graphical Windowing Environment # microwindows_pc98 ia16-elf-gcc Nano-X Graphical Windowing Environment for PC-98 # dcc ia6-elf-gcc DCC self-compiling C compiler for ELKS # dflat ia16-elf-gcc D-Flat TUI memopad/library # elkirc ia16-elf-gcc IRC for ELKS # owc_libc OpenWatcom ELKS C Library compiled by OWC # owc_elkscmd OpenWatcom Some elkscmd/ programs compiled by OWC # c86_toolchain OpenWatcom/C86 C86 Toolchain, header files and examples # c86_elkscmd C86 Some elkscmd/ programs compiled by C86 # elksdoom OpenWatcom Doom for ELKS # ngircd_elks OpenWatcom IRC daemon for ELKS # elks_viewer OpenWatcom Image viewers (BMP, PPM, JPG) for ELKS # gzip OpenWatcom gzip compression utility # lua OpenWatcom Lua 5.5 interpreter # bobcat OpenWatcom Bobcat web browser (Lynx fork) # kilomacs OpenWatcom Kilo-based editor with Emacs-style keybindings # elksmoria OpenWatcom Roguelike game # dropbear ia16-elf-gcc Dropbear SSH client for ELKS (external repo) # bearssl ia16-elf-gcc BearSSL library and tlsget client for ELKS (external repo) # # Some projects may require prerequisites. # To only build the C86 toolchain, use './buildext.sh owc_libc c86_toolchain' # # 17 Jan 2026 Greg Haerr set -e XT_GIT_BASE_URL=${XT_GIT_BASE_URL:-https://www.xt-emporium.com/git} DROPBEAR_REPO_URL=${DROPBEAR_REPO_URL:-$XT_GIT_BASE_URL/ssh-daemon-project.git} BEARSSL_REPO_URL=${BEARSSL_REPO_URL:-$XT_GIT_BASE_URL/bearssl.git} doexit() { E="$1" test -z $1 && E=0 if [ $E -eq 0 ] then echo "Buildext.sh has completed successfully." else echo "Buildext.sh has terminated with error $E" fi exit $E } # Environment setup add_path() { if [[ ":$PATH:" != *":$1:"* ]]; then export PATH="$1:$PATH" fi } elks_environ() { SCRIPTDIR="$(dirname "$0")" . "$SCRIPTDIR/env.sh" [ $? -ne 0 ] && doexit 1 mkdir -p extapps } owc_environ() { # OWC should be setup outside this script! #export WATCOM=/Users/greg/net/open-watcom-v2/rel #add_path "$WATCOM/binl" # for Linux-32 #add_path "$WATCOM/binl64" # for Linux-64 #add_path "$WATCOM/bino64" # for macOS return 0 } c86_environ() { export C86=$TOPDIR/extapps/8086-toolchain add_path "$C86/host-bin" return 0 } owc_libc() { cd $TOPDIR make owclean make owlibc } c86_libc() { c86_environ cd $TOPDIR make c86clean make c86libc } c86_toolchain() { echo "Building 8086-toolchain..." cd $TOPDIR/extapps if [ ! -d 8086-toolchain ] ; then git clone https://github.com/ghaerr/8086-toolchain fi cd 8086-toolchain git pull make clean make host make elks c86_libc cd $C86/examples make echo "8086-toolchain build complete" } # build OWC apps in elkscmd/ owc_elkscmd() { echo "Building OWC apps in elkscmd/" cd $TOPDIR make -C elkscmd owclean make -C elkscmd owc echo "OWC apps in elkscmd/ build complete" } # build C86 apps in elkscmd/ c86_elkscmd() { echo "Building C86 apps in elkscmd/" cd $TOPDIR make -C elkscmd c86clean make -C elkscmd c86 echo "C86 apps in elkscmd/ build complete" } # external repositories microwindows() { echo "Building Nano-X..." cd $TOPDIR/extapps if [ ! -d microwindows ] ; then git clone https://github.com/ghaerr/microwindows.git fi cd microwindows/src git pull make -f Makefile.elks clean make -f Makefile.elks echo "Nano-X build complete" } microwindows_pc98() { echo "Building Nano-X for PC-98..." cd $TOPDIR/extapps if [ ! -d microwindows ] ; then git clone https://github.com/ghaerr/microwindows.git fi cd microwindows/src git pull make -f Makefile.elks clean CONFIG_ARCH_PC98=y make -f Makefile.elks echo "Nano-X for PC-98 build complete" } dcc() { echo "Building DeSmet C Compiler (DCC)..." cd $TOPDIR/extapps if [ ! -d dcc ] ; then git clone https://github.com/ghaerr/dcc fi cd dcc/src git pull make clean make echo "DCC build complete" } dflat() { echo "Building D-Flat..." cd $TOPDIR/extapps if [ ! -d dflat ] ; then git clone https://github.com/ghaerr/dflat.git fi cd dflat git pull make -f Makefile.elks clean make -f Makefile.elks echo "D-Flat build complete" } elksdoom() { echo "Building Doom..." cd $TOPDIR/extapps if [ ! -d elksdoom ] ; then git clone https://github.com/FrenkelS/elksdoom fi cd elksdoom git pull rm -f *.obj INCLUDE="$TOPDIR/libc/include:$TOPDIR/include:$TOPDIR/elks/include:$WATCOM/h" \ LIBC=$TOPDIR/libc/libcm.lib \ ./compelks.sh echo "Doom build complete" } ngircd_elks() { echo "Building ngircd-elks..." cd $TOPDIR/extapps if [ ! -d ngircd-elks ] ; then git clone https://github.com/parabyte/ngircd-elks fi cd ngircd-elks rm -f src/*/*.obj ngircd.os2 git pull NGIRCD_DIR=$TOPDIR/extapps/ngircd-elks make -e -f Makefile.owc clean NGIRCD_DIR=$TOPDIR/extapps/ngircd-elks make -e -f Makefile.owc echo "ngircd-elks build complete" } elkirc() { echo "Building elkirc..." cd $TOPDIR/extapps if [ ! -d elkirc ] ; then git clone https://github.com/sepen/elkirc fi cd elkirc git pull make clean make ELKS=1 echo "elkirc build complete" } elks_viewer() { echo "Building elks-viewer..." cd $TOPDIR/extapps if [ ! -d elks-viewer ] ; then git clone https://github.com/rafael2k/elks-viewer fi cd elks-viewer git pull make -f Makefile.owc clean make -f Makefile.owc echo "elks-viewer build complete" } gzip() { echo "Building gzip..." cd $TOPDIR/extapps if [ ! -d zlib ] ; then git clone https://github.com/rafael2k/zlib zlib fi cd zlib git pull make -f elks/Makefile.elks clean make -f elks/Makefile.elks echo "gzip build complete" } lua() { echo "Building Lua 5.5..." cd $TOPDIR/extapps if [ ! -d lua ] ; then git clone https://github.com/rafael2k/lua lua fi cd lua git pull make -f Makefile.elks clean make -f Makefile.elks echo "Lua 5.5 build complete" } bobcat() { echo "Building Bobcat web browser..." cd $TOPDIR/extapps if [ ! -d bobcat ] ; then git clone https://github.com/rafael2k/bobcat bobcat fi cd bobcat git pull cd src make -f Makefile.elks clean make -f Makefile.elks echo "Bobcat build complete" } kilomacs() { echo "Building kilomacs editor..." cd $TOPDIR/extapps if [ ! -d kilomacs ] ; then git clone https://github.com/rafael2k/kilomacs.git kilomacs fi cd kilomacs git pull make clean make echo "Kilomacs build complete" } elksmoria() { echo "Building ELKSmoria..." cd $TOPDIR/extapps if [ ! -d elksmoria ] ; then git clone https://github.com/tyama501/ELKSmoria.git elksmoria fi cd elksmoria git pull make clean make echo "ELKSmoria build complete" } dropbear() { echo "Building Dropbear SSH client..." cd $TOPDIR/extapps if [ ! -d dropbear ] ; then git clone "$DROPBEAR_REPO_URL" dropbear fi cd dropbear if [ -n "$(git status --porcelain 2>/dev/null)" ] ; then echo "Dropbear tree has local changes, skipping git pull" else git pull --ff-only fi make -f Makefile.elks clean make -f Makefile.elks echo "Dropbear SSH client build complete" } bearssl() { echo "Building BearSSL..." cd $TOPDIR/extapps if [ ! -d bearssl ] ; then git clone "$BEARSSL_REPO_URL" bearssl fi cd bearssl if [ -n "$(git status --porcelain 2>/dev/null)" ] ; then echo "BearSSL tree has local changes, skipping git pull" else git pull --ff-only fi make -f Makefile.elks clean make -f Makefile.elks echo "BearSSL build complete" } # build all extapps repos make_all() { microwindows dcc dflat elkirc dropbear bearssl if [ -n "$WATCOM" ] ; then owc_libc owc_elkscmd c86_toolchain c86_elkscmd elksdoom ngircd_elks elks_viewer gzip lua #bobcat kilomacs elksmoria fi } # script starts here if [ "$1" = "" ] ; then echo "Usage: $0 [all | <project ...>]" doexit 1 fi elks_environ #owc_environ #c86_environ if [ "$1" = "all" ] ; then make_all else for repo in $@ ; do $repo done fi doexit 0
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history