-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakeshared.mk
More file actions
40 lines (34 loc) · 1.04 KB
/
Makeshared.mk
File metadata and controls
40 lines (34 loc) · 1.04 KB
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
CC=g++
GLSLC=$(VULKAN_SDK)/bin/glslangValidator
PLATFORM=VK_USE_PLATFORM_XCB_KHR
#PLATFORM=VK_USE_PLATFORM_XLIB_KHR
THIRD_PARTY=../third-party
INCLUDE_DIR=-I$(VULKAN_SDK)/include -I$(THIRD_PARTY) -I$(THIRD_PARTY)/magma/src/third-party/pfr/include -I$(THIRD_PARTY)/rapid
LIB_DIR=-L$(VULKAN_SDK)/lib -L$(THIRD_PARTY)/magma -L$(THIRD_PARTY)/quadric
BASE_CFLAGS=-std=c++17 -m64 -msse4 -pthread -MD -D$(PLATFORM) $(INCLUDE_DIR)
DEBUG ?= 1
ifeq ($(DEBUG), 1)
CFLAGS=$(BASE_CFLAGS) -O0 -g -D_DEBUG
MAGMA=magmad
QUADRIC=quadricd
else
CFLAGS=$(BASE_CFLAGS) -O3 -DNDEBUG
MAGMA=magma
QUADRIC=quadric
endif
LDFLAGS=$(LIB_DIR) -l$(MAGMA) -lpthread -lxcb -lxcb-randr -lvulkan
#LDFLAGS=$(LIB_DIR) -l$(MAGMA) -lpthread -lX11 -lXrandr -lvulkan
FRAMEWORK=../framework
FRAMEWORK_OBJS= \
$(FRAMEWORK)/graphicsPipeline.o \
$(FRAMEWORK)/main.o \
$(FRAMEWORK)/utilities.o \
$(FRAMEWORK)/vulkanApp.o \
$(FRAMEWORK)/xcbApp.o
#$(FRAMEWORK)/xlibApp.o
%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.vert
$(GLSLC) -V $*.vert -o $*.o
%.o: %.frag
$(GLSLC) -V $*.frag -o $*.o