aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 55fbc8331404b97b1a9a9baaede21c8eebdafe71 (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
29
30
all: fractal-gen symlinks

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

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

	$(CC) -o $@ $^ -lm -lpthread

%.o: %.c
	$(CC) -c -o $@ $< -Wall -Wextra -Werror

.PHONY: all clean clean-object symlinks
clean: clean-object
	rm fractal-gen \
	   mandelbrot-gen \
	   burning-ship-gen \
	   burning-ship-lattice-gen \
	   tricorn-gen \
	   -f

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