21 lines
481 B
Makefile
21 lines
481 B
Makefile
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}
|