-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
51 lines (38 loc) · 1 KB
/
makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
CC=gcc
CFLAGS=-Wall -g -c
LDFLAGS=-lGL -lglfw -lGLEW
PROGRAM_NAME=fractal
.PHONY:default
default: build
.PHONY:build
build: bin/$(PROGRAM_NAME) bin/vertex_shader.glsl bin/mandelbrot_shader.glsl\
bin/mandelbrot_shader_fp64.glsl bin/julia_shader.glsl\
bin/julia_shader_fp64.glsl
.PHONY:clean
clean:
rm -rf bin
rm -f src/*.o
bin/$(PROGRAM_NAME): src/main.o src/app.o src/fractal.o
mkdir -p bin
$(CC) $(LDFLAGS) -o $@ $^
src/main.o: src/main.c src/app.h src/fractal.h
$(CC) $(CFLAGS) -o $@ $<
src/app.o: src/app.c src/app.h
$(CC) $(CFLAGS) -o $@ $<
src/fractal.o: src/fractal.c src/fractal.h
$(CC) $(CFLAGS) -o $@ $<
bin/vertex_shader.glsl: src/vertex_shader.glsl
mkdir -p bin
cp $< $@
bin/mandelbrot_shader.glsl: src/mandelbrot_shader.glsl
mkdir -p bin
cp $< $@
bin/mandelbrot_shader_fp64.glsl: src/mandelbrot_shader_fp64.glsl
mkdir -p bin
cp $< $@
bin/julia_shader.glsl: src/julia_shader.glsl
mkdir -p bin
cp $< $@
bin/julia_shader_fp64.glsl: src/julia_shader_fp64.glsl
mkdir -p bin
cp $< $@