From 1a6ed8de3267260c80f8582915c1a5e6d99d9cb2 Mon Sep 17 00:00:00 2001 From: Dalton Woodard Date: Tue, 14 Oct 2014 22:33:21 -0700 Subject: [PATCH] Fixed make throwing error on repeated invokation of make clean, added example executables to clean list. Filtered out -Werror on compilation of ptest.c (was thowing errors). --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d36a7bf..d950655 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,18 @@ CC = gcc -CFLAGS = -ansi -pedantic -Wall -Wno-overlength-strings -Werror -O3 -g +CFLAGS = -std=c11 -Wall -Wextra -Werror -O3 -g TESTS = $(wildcard tests/*.c) EXAMPLES = $(wildcard examples/*.c) EXAMPLESEXE = $(EXAMPLES:.c=) all: $(EXAMPLESEXE) check - + check: $(TESTS) mpc.c - $(CC) $(CFLAGS) $^ -lm -o test + $(CC) $(filter-out -Werror, $(CFLAGS)) $^ -lm -o test ./test - + examples/%: examples/%.c mpc.c $(CC) $(CFLAGS) $^ -lm -o $@ clean: - rm test + rm -rf test examples/doge examples/lispy examples/maths examples/smallc