commit 0053b2929e2c4190933a473a0306aa5ee20db323 Author: Marc barbier <43183491+Marc-Pierre-Barbier@users.noreply.github.com> Date: Tue Oct 13 10:43:18 2020 +0200 initial commit diff --git a/makefile b/makefile new file mode 100644 index 0000000..f2ad7b0 --- /dev/null +++ b/makefile @@ -0,0 +1,23 @@ +COMPILE_FLAG = -c +LD_FLAG = -o +OBJDIR=./objs/ +SRC=./src/ +SRCS=$(shell ls src/* | grep "\.c") + +ALL : build link clean + +build : + mkdir -p ${OBJDIR} + -@rm run + @echo "" + @echo "building :" + @cd objs && for src in ${SRCS}; do echo gcc ${COMPILE_FLAG} ../$$src &&gcc ${COMPILE_FLAG} ../$$src; done; + +link: + gcc objs/* ${LD_FLAG} run + + +clean : + @echo "" + @echo "cleaning : " + -rm ${OBJDIR}*