diff options
Diffstat (limited to 'src/c/_Makefile')
-rw-r--r-- | src/c/_Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/c/_Makefile b/src/c/_Makefile new file mode 100644 index 0000000..d6e2bf1 --- /dev/null +++ b/src/c/_Makefile @@ -0,0 +1,30 @@ +# Minimal Makefile to compile main.c into an executable named main + +# Compiler +CC = gcc + + +# Flags +CFLAGS = -Wall -Wextra -O2 + + +# Default target +# Tells make what dependencies to compile +all: main + + +# Dependency 'main' +# main.c is the source file +main: main.c + $(CC) $(CFLAGS) -o main main.c + + +# Test target +test: main + @echo -n "main.c test............................" + @./main >/dev/null 2>&1 && echo "OK" || echo "FAILED" + + +# Clean target +clean: + rm -f main |