diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 15:47:10 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 15:47:10 +0200 |
commit | 56563700df68816e8329b99f66ede5459cbbb23a (patch) | |
tree | 29c54fbb5eda48105462e878ce1ddc794a63374e /Makefile |
Initial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82fb62d --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +CC = gcc +CFLAGS = -Wall -Wextra -std=c11 -O2 -g -fwrapv -pthread +LDFLAGS = -lm -pthread + +.PHONY: all clean remake + +all: attract + +clean: + rm -f attract *.o + +remake: clean + $(MAKE) --no-print-directory all + + +attract: $(patsubst %.c,%.o,$(wildcard *.c)) + $(CC) $(LDFLAGS) -o $@ $^ + +%.o: %.c $(wildcard *.h) + $(CC) $(CFLAGS) -c -o $@ $< |