Adding all tracks, I guess
This commit is contained in:
25
c/hello-world/makefile
Normal file
25
c/hello-world/makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
CFLAGS = -std=c99
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wextra
|
||||
CFLAGS += -pedantic
|
||||
CFLAGS += -Werror
|
||||
|
||||
VFLAGS = --quiet
|
||||
VFLAGS += --tool=memcheck
|
||||
VFLAGS += --leak-check=full
|
||||
VFLAGS += --error-exitcode=1
|
||||
|
||||
test: tests.out
|
||||
@./tests.out
|
||||
|
||||
memcheck: tests.out
|
||||
@valgrind $(VFLAGS) ./tests.out
|
||||
@echo "Memory check passed"
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.out *.out.dSYM
|
||||
|
||||
tests.out: test/test_hello_world.c src/hello_world.c src/hello_world.h
|
||||
@echo Compiling $@
|
||||
@$(CC) $(CFLAGS) src/hello_world.c test/vendor/unity.c test/test_hello_world.c -o tests.out
|
Reference in New Issue
Block a user