|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
|
|
|
CFLAGS = -I $(ROOT_DIR)/include -I/usr/local/include -O0 -g -Wall -Wextra -fsanitize=address
|
|
|
|
|
CFLAGS = -I $(ROOT_DIR)/include -I/usr/local/include -O0 -g -Wall -Wextra
|
|
|
|
|
LDFLAGS = -lfreetype -lz -lglfw -lvulkan -ldl -Xlinker -rpath -Xlinker /opt/homebrew/lib
|
|
|
|
|
|
|
|
|
|
SOURCES = src/main.c src/draw.c src/ui.c src/gpu.c lib/spng.c lib/vma.cpp
|
|
|
|
@ -13,6 +13,7 @@ EXTRA_DEBUG_REQUIREMENTS :=
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
|
ifeq ($(UNAME_S),Linux)
|
|
|
|
|
GDB = gdb
|
|
|
|
|
CFLAGS += -I /usr/include/freetype2
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
|
export MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=1
|
|
|
|
@ -32,7 +33,7 @@ roleplay: $(OBJECTS)
|
|
|
|
|
$(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
|
$(CXX) $(CFLAGS) -std=c++14 -Wno-nullability-completeness -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-private-field -Wno-unused-variable -c -o $@ $<
|
|
|
|
|
$(CXX) $(CFLAGS) -std=c++17 -Wno-nullability-completeness -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-private-field -Wno-unused-variable -c -o $@ $<
|
|
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|