Initial commit

This commit is contained in:
Pin
2023-03-05 16:39:34 -05:00
commit 5121ead594
7 changed files with 386 additions and 0 deletions

20
Makefile Normal file
View File

@@ -0,0 +1,20 @@
LIBRARIES = -lreadline -Iinclude
RELEASE_ARGS = -DRELEASEBUILD
SOURCES = ./src/* ./cmd/dfs.c
OUTPUT_DIR = ./bin
OUTPUT_BIN = ${OUTPUT_DIR}/PROG
OUTPUT = -o ${OUTPUT_BIN}
INSTALL_NAME = dfsh
build: output_dir
gcc -Wall -std=gnu99 ${RELEASE_ARGS} ${SOURCES} ${OUTPUT:PROG=dfsh} ${LIBRARIES}
debug: output_dir
gcc -Wall -std=gnu99 -g ${SOURCES} ${OUTPUT:PROG=dfsh} ${LIBRARIES}
output_dir:
mkdir -p ${OUTPUT_DIR}
install:
mv ${OUTPUT_BIN:PROG=dfsh} /usr/sbin/${INSTALL_NAME}