aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 2d2407823209c5c66c0fed5444b4354fcb324dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
CFLAGS += -Wall -Wextra -Werror
LDFLAGS += -lm -lpthread

HEADERS = generator.h algorithms.h fractal-gen.h


all: fractal-gen symlinks

symlinks: fractal-gen
	ln -sf $< mandelbrot-gen
	ln -sf $< burning-ship-gen

fractal-gen: fractal-gen.o \
             algorithms/mandelbrot.o \
             algorithms/burning-ship.o \

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

clean: clean-object
	rm -f fractal-gen \
	   mandelbrot-gen \
	   burning-ship-gen

clean-object:
	rm -f *.o **/*.o

.PHONY: all clean clean-object symlinks