CFLAGS=-std=c99 -Wall -g -O2 INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2 TARGETS=approximate-pi linked-list mandelbrot mandelbrot.bmp threads circular-buffer structs .PHONY: all all: $(TARGETS) .PHONY: clean clean: rm -f $(TARGETS) *~ .PHONY: indent indent: indent $(INDENTOPTS) *.c mandelbrot: mandelbrot.c $(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm mandelbrot.bmp: mandelbrot ./mandelbrot threads: threads.c $(CC) $(CFLAGS) -o $@ $< -pthread