-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmakefile
110 lines (97 loc) · 1.61 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
!IF [if /I "%Platform%" EQU "x64" exit 1]
PLATFORM = windows
!ELSE
PLATFORM = windows32
!ENDIF
BIN_NAME = \
cddNES.exe
OBJS = \
src/cart.obj \
src/apu.obj \
src/cpu.obj \
src/nes.obj \
src/ppu.obj \
ui/main.obj \
ui/api.obj \
ui/fs.obj \
ui/args.obj \
ui/settings.obj \
ui/audio.obj \
ui/render/render.obj \
ui/render/gl.obj \
ui/render/glproc.obj \
ui/render/d3d9.obj \
ui/render/d3d11.obj \
ui/render/d3d12.obj \
ui/render/ui.obj \
ui/render/ui-d3d12-shim.obj
RESOURCES = \
ui\assets\icon.res
RFLAGS = \
/nologo
CFLAGS = \
-Iui/include \
-DWIN32_LEAN_AND_MEAN \
-D_CRT_SECURE_NO_WARNINGS \
/nologo \
/wd4204 \
/wd4121 \
/GS- \
/W4 \
/O2 \
/MT \
/MP
!IFDEF DEBUG
CFLAGS = $(CFLAGS) /Oy- /Ob0 /Zi
!ELSE
CFLAGS = $(CFLAGS) /GL
!ENDIF
CPPFLAGS = $(CFLAGS)
LIBS = \
ui/lib/$(PLATFORM)/SDL2.lib \
ui/lib/$(PLATFORM)/imgui.lib \
ui/lib/$(PLATFORM)/libuncurl.lib \
ui/lib/$(PLATFORM)/cJSON.lib \
ui/lib/$(PLATFORM)/libssl.lib \
ui/lib/$(PLATFORM)/libcrypto.lib \
libvcruntime.lib \
libucrt.lib \
libcmt.lib \
kernel32.lib \
gdi32.lib \
winmm.lib \
imm32.lib \
shell32.lib \
advapi32.lib \
ole32.lib \
oleaut32.lib \
opengl32.lib \
d3d9.lib \
d3d11.lib \
d3d12.lib \
dxgi.lib \
user32.lib \
uuid.lib \
version.lib \
d3dcompiler.lib \
ws2_32.lib
LD_FLAGS = \
/subsystem:windows \
/nodefaultlib \
/nologo
!IFDEF DEBUG
LD_FLAGS = $(LD_FLAGS) /debug
!ELSE
LD_FLAGS = $(LD_FLAGS) /LTCG
!ENDIF
all: clean clear $(OBJS) $(RESOURCES)
link *.obj $(LIBS) $(RESOURCES) /out:$(BIN_NAME) $(LD_FLAGS)
clean:
-rd /s /q .vs
del $(RESOURCES)
del *.obj
del *.exe
del *.ilk
del *.pdb
clear:
cls