Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/mandelbrot.git
CC = clang
CFLAGS = -O3 -Wall
LIBS = -lgd -lpng -lz -lm -lpthread

HEADERS = $(wildcard *.h)
SOURCES = $(wildcard *.c)
OBJECTS = $(SOURCES:.c=.o)

BINARY = mandelbrot

%.o: %.c $(HEADERS)
	$(CC) -c -o $@ $< $(CFLAGS)

main: $(OBJECTS)
	$(CC) -o $(BINARY) $^ $(CFLAGS) $(LIBS)
	strip $(BINARY)

.PHONY: clean

clean:
	rm -f *.o $(BINARY)