-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (24 loc) · 869 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
override CFLAGS := -std=gnu11 -march=native -O3 -flax-vector-conversions $(CFLAGS)
# override CFLAGS := -std=gnu11 -march=native -g -fsanitize=address -fno-omit-frame-pointer -flax-vector-conversions $(CFLAGS)
ifneq ($(shell command -v gcc-9),)
CC = gcc-9
endif
ifneq ($(TRACE),)
override CFLAGS := -DTRACE=$(TRACE) $(CFLAGS)
SUF = -trace$(TRACE)
endif
# pkg-config is missing -framework OpenGL on macos
ifeq ($(OS),)
OS := $(shell uname)
endif
ifeq ($(OS),Darwin)
GLFW3 = `pkg-config --cflags --static --libs glfw3` -framework OpenGL
else
GLFW3 = `pkg-config --cflags --static --libs glfw3`
endif
edge264_test$(SUF): edge264*.c edge264*.h Makefile
$(CC) -c -o edge264$(SUF).o $(CFLAGS) edge264.c
$(CC) -o edge264_test$(SUF) $(GLFW3) $(CFLAGS) edge264_test.c edge264$(SUF).o
.PHONY: clean clear
clean clear:
rm edge264*.o edge264_test edge264_test-trace*