Files
mpc/Makefile

24 lines
700 B
Makefile
Raw Normal View History

2013-09-19 20:57:40 +01:00
CC = gcc
STND=-ansi
CFLAGS = $(STND) -pedantic -O3 -g -Werror -Wall -Wextra -Wformat=2 -Wshadow -Wno-long-long \
-Wno-overlength-strings -Wno-format-nonliteral -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs \
-Wmissing-include-dirs -Wswitch-default
2013-09-19 20:57:40 +01:00
TESTS = $(wildcard tests/*.c)
EXAMPLES = $(wildcard examples/*.c)
EXAMPLESEXE = $(EXAMPLES:.c=)
2013-09-19 20:57:40 +01:00
all: $(EXAMPLESEXE) check
2013-09-19 20:57:40 +01:00
check: $(TESTS) mpc.c
$(CC) $(filter-out -Werror, $(CFLAGS)) $^ -lm -o test
2013-09-19 20:57:40 +01:00
./test
examples/%: examples/%.c mpc.c
$(CC) $(CFLAGS) $^ -lm -o $@
2013-09-19 20:57:40 +01:00
clean:
rm -rf test examples/doge examples/lispy examples/maths examples/smallc