From 60adb6e2f051ab72fb66541a8f48ef195317d403 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 27 Aug 2019 15:30:51 +0200 Subject: Initial commit Compute if a number is in Mandelbrot set. Print it to the terminal. --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..232508f --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +NAME = mandel +CC = gcc +CCFLAGS = -Wall -Wextra +LDFLAGS = -lm # $(shell sdl2-config --libs --cflags) + +HEADER = header.h +SRC = main.c graphics.c mandelbrot.c +OBJ = $(SRC:.c=.o) + +RM = rm -f + +.PHONY: all +all: $(NAME) + +$(NAME): $(OBJ) $(HEADER) + $(CC) $(LDFLAGS) $(CCFLAGS) -o $@ $(OBJ) + +%.o: %.c + $(CC) $(LDFLAGS) $(CCFLAGS) -c -o $@ $< + +.PHONY: debug +debug: CCFLAGS += -g +debug: re + +.PHONY: clean +clean: + $(RM) $(OBJ) + +.PHONY: fclean +fclean: clean + $(RM) $(NAME) + +.PHONY: re +re: fclean all -- cgit