forked from snowcone-ltd/libmatoya
-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
134 lines (115 loc) · 2.4 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
TARGET = windows
ARCH = %%Platform%%
NAME = matoya
.SUFFIXES : .ps .vs .fragvk .vertvk
.vs.h:
@fxc $(FXCFLAGS) /Fh $@ /T vs_4_0 /Vn $(*B) $<
.ps.h:
@fxc $(FXCFLAGS) /Fh $@ /T ps_4_0 /Vn $(*B) $<
.vertvk.h:
@deps\bin\glslangValidator -S vert -V --vn VERT $< -o $@
.fragvk.h:
@deps\bin\glslangValidator -S frag -V --vn FRAG $< -o $@
!IFDEF STEAM
WEBVIEW_OBJ = src\swebview.obj
!ELSE
WEBVIEW_OBJ = src\windows\webview.obj
!ENDIF
OBJS = \
src\app.obj \
src\async.obj \
src\crypto.obj \
src\dtls.obj \
src\file.obj \
src\hash.obj \
src\http.obj \
src\image.obj \
src\json.obj \
src\list.obj \
src\log.obj \
src\memory.obj \
src\queue.obj \
src\resample.obj \
src\system.obj \
src\thread.obj \
src\tlocal.obj \
src\version.obj \
src\gfx\vk\vk.obj \
src\gfx\vk\vk-ctx.obj \
src\gfx\vk\vk-ui.obj \
src\hid\hid.obj \
src\hid\utils.obj \
src\windows\aes-gcm.obj \
src\windows\appw.obj \
src\windows\audio.obj \
src\windows\compress.obj \
src\windows\cryptow.obj \
src\windows\dialog.obj \
src\windows\dtlsw.obj \
src\windows\filew.obj \
src\windows\hidw.obj \
src\windows\imagew.obj \
src\windows\memoryw.obj \
src\windows\request.obj \
src\windows\systemw.obj \
src\windows\threadw.obj \
src\windows\time.obj \
src\windows\ws.obj \
src\windows\gfx\d3d12.obj \
src\windows\gfx\d3d12-ctx.obj \
src\windows\gfx\d3d12-ui.obj \
src\windows\gfx\d3d11.obj \
src\windows\gfx\d3d11-ctx.obj \
src\windows\gfx\d3d11-ui.obj \
$(WEBVIEW_OBJ)
SHADERS = \
src\gfx\vk\shaders\fs.h \
src\gfx\vk\shaders\vs.h \
src\gfx\vk\shaders\fsui.h \
src\gfx\vk\shaders\vsui.h \
src\windows\gfx\shaders\ps.h \
src\windows\gfx\shaders\vs.h \
src\windows\gfx\shaders\psui.h \
src\windows\gfx\shaders\vsui.h
INCLUDES = \
-Ideps \
-Isrc \
-Isrc\windows
DEFS = \
-DUNICODE \
-DWIN32_LEAN_AND_MEAN \
-DMTY_VK_WIN32
FXCFLAGS = \
/O3 \
/Ges \
/nologo
FLAGS = \
/W4 \
/MT \
/MP \
/volatile:iso \
/wd4100 \
/wd4152 \
/wd4201 \
/nologo
LIB_FLAGS = \
/nologo
!IFDEF DEBUG
FLAGS = $(FLAGS) /Ob0 /Zi /Oy-
DEFS = $(DEFS) -DMTY_VK_DEBUG
!ELSE
FLAGS = $(FLAGS) /O2 /GS- /Gw
!ENDIF
CFLAGS = $(INCLUDES) $(DEFS) $(FLAGS)
all: clean-build clear $(SHADERS) $(OBJS)
mkdir bin\$(TARGET)\$(ARCH)
lib /out:bin\$(TARGET)\$(ARCH)\$(NAME).lib $(LIB_FLAGS) *.obj
clean: clean-build
@-del /q $(SHADERS) 2>nul
clean-build:
@-rmdir /s /q bin 2>nul
@-del /q *.obj 2>nul
@-del /q *.lib 2>nul
@-del /q *.pdb 2>nul
clear:
@cls