-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
17 lines (14 loc) · 700 Bytes
/
Makefile
File metadata and controls
17 lines (14 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC := clang
# CFLAGS := -Wall -Wextra -pedantic -g -fsanitize=address
CFLAGS := -Wall -Wextra -pedantic -g -fsanitize=address -D_CRT_SECURE_NO_WARNINGS
# LFLAGS := -lX11 -lXrandr -lm -lGL
LFLAGS := -lwinmm -lgdi32
TPOBJS := build/glad.o build/stb_image.o build/stb_truetype.o
build/eden: $(TPOBJS) src/common.c src/eden.c src/ren.c src/buffer.c src/buffer_impl_array.c src/fontatlas.c
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
build/glad.o: src/tp/glad.c
$(CC) $(CFLAGS) -O3 -c -o $@ $^
build/stb_image.o: src/tp/stb_image.h
$(CC) $(CFLAGS) -DSTB_IMAGE_IMPLEMENTATION -O3 -x c -c -o $@ $^
build/stb_truetype.o: src/tp/stb_truetype.h
$(CC) $(CFLAGS) -DSTB_TRUETYPE_IMPLEMENTATION -O3 -x c -c -o $@ $^