-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (19 loc) · 705 Bytes
/
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
CC = gcc
CCFLAGS = -Wall -Wextra -Wpedantic
OMPFLAGS = -fopenmp
OPTFLAGS = -O2
INCLUDE = -I ./include
LIBS = -lm -lglfw
serial_src = src/glad.c src/window.c src/texture.c src/shader.c src/render.c src/lbm.c src/main.c
parallel_src = src/glad.c src/window.c src/texture.c src/shader.c src/render.c src/gpu.c src/main.c
target = parallel serial
all: $(target)
serial: $(serial_src)
$(CC) $(CCFLAGS) $(OMPFLAGS) $(OPTFLAGS) -DUSE_GLES2 $(INCLUDE) -o $@ $^ $(LIBS) -lEGL -lGL
parallel: $(parallel_src)
$(CC) $(CCFLAGS) $(INCLUDE) $(OPTFLAGS) -o $@ $^ $(LIBS)
run: parallel
./$^ data/input.txt output.bin
.PHONY: clean
clean:
rm -f $(serial_obj) $(parallel_obj) serial parallel