diff options
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 $@ $< |