Reading input in zig

using a readline style library too.
This commit is contained in:
2025-03-25 19:30:49 -04:00
parent 353e7d599e
commit c46c50737f
6 changed files with 191 additions and 10 deletions

View File

@@ -1,18 +1,15 @@
LIBRARIES = -lreadline
RELEASE_ARGS = -DRELEASEBUILD
SOURCES = ./msh.c
OUTPUT_DIR = ./bin
OUTPUT_DIR = ./zig-out/bin
OUTPUT_BIN = ${OUTPUT_DIR}/PROG
OUTPUT = -o ${OUTPUT_BIN}
build: output_dir
gcc -Wall -std=gnu99 ${RELEASE_ARGS} ${SOURCES} ${OUTPUT:PROG=mash} ${LIBRARIES}
zig build install --release=fast
debug: output_dir
gcc -Wall -std=gnu99 -g ${SOURCES} ${OUTPUT:PROG=mash} ${LIBRARIES}
output_dir:
mkdir -p ${OUTPUT_DIR}
zig build
install:
mv ${OUTPUT_BIN:PROG=mash} /usr/sbin/blah