-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
175 lines (143 loc) · 6.61 KB
/
Makefile
File metadata and controls
175 lines (143 loc) · 6.61 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# All examples will be built at a time.
#
EXAMPLE_DIRS += \
examples/glfw_opengl3 \
examples/glfw_opengl3_image_load \
examples/glfw_opengl3_imfileopendialog \
examples/glfw_opengl3_imgui_toggle \
examples/glfw_opengl3_imguicolortextedit \
examples/glfw_opengl3_imguizmo \
examples/glfw_opengl3_imknobs \
examples/glfw_opengl3_imnodes \
examples/glfw_opengl3_implot \
examples/glfw_opengl3_implot3d \
examples/glfw_opengl3_imspinner \
examples/glfw_opengl3_jp \
examples/iconFontViewer \
examples/imPlotDemo
EXAMPLE_DIRS_RAYLIB := \
examples/raylib_basic \
examples/raylib_cjk \
examples/rlimgui_basic
ifeq ($(OS),Windows_NT)
EXAMPLE_DIRS += \
examples/sdl3_opengl3 \
examples/sdl3_sdlgpu3 \
examples/win32_dx11
endif
all: std raylib
std:
@echo $(shell zig version)
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),all ))
raylib:
@echo $(shell zig version)
$(foreach exdir,$(EXAMPLE_DIRS_RAYLIB), $(call def_make,$(exdir),all ))
.PHONY: test clean gen cleanexe
sdl:
$(MAKE) -C examples/sdl3_opengl3
$(MAKE) -C examples/sdl3_sdlgpu3
clean:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),cleanall ))
$(foreach exdir,$(EXAMPLE_DIRS_RAYLIB), $(call def_make,$(exdir),cleanall ))
$(MAKE) -C src/libzig $@
cleanall: clean cleanexe
cleanexe:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),cleanexe ))
cleancache:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),cleancache ))
gen: copylibs
#
define def_make
@echo ==== $(1) ====
@-$(MAKE) -C $(1) $(2)
@echo ""
@#$(MAKE) -C $(1) cleancache
endef
MAKEFLAGS += --no-print-directory
#-------------------------
# Copy external libraries
#-------------------------
EXT_LIB_DIR = ../000imguin_dev/imguin_git/libs
TARGET_DIR = src/libc
copylibs: imgui implot imnodes imguizmo ImGuiFileDialog imgui_toggle implot3d copy_imspinner imCTE imgui-knobs
# ImGuiColorTextEdit
imCTE:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/ImGuiColorTextEdit
@-mkdir -p $(TARGET_DIR)/c$@/ImGuiColorTextEdit/vendor/regex
@cp -f $(EXT_LIB_DIR)/c$@/{*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/ImGuiColorTextEdit/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/ImGuiColorTextEdit/
@cp -f $(EXT_LIB_DIR)/c$@/ImGuiColorTextEdit/vendor/regex/*.* $(TARGET_DIR)/c$@/ImGuiColorTextEdit/vendor/regex/
@cp -rf $(EXT_LIB_DIR)/c$@/ImGuiColorTextEdit/vendor/regex/include $(TARGET_DIR)/c$@/ImGuiColorTextEdit/vendor/regex/include
imgui:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/$@
@-mkdir -p $(TARGET_DIR)/c$@/$@/backends
@cp -f $(EXT_LIB_DIR)/c$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/$@/{LICENSE.txt,*.cpp,*.h,docs/README.md} $(TARGET_DIR)/c$@/$@/
@cp -f $(EXT_LIB_DIR)/c$@/$@/backends/{*.cpp,*.h} $(TARGET_DIR)/c$@/$@/backends/
imgui_toggle:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/$@
@cp -f $(EXT_LIB_DIR)/c$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/libs/$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/$@/
ImGuiFileDialog:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/C$@/libs/ImGuiFileDialog/dirent
@-mkdir -p $(TARGET_DIR)/C$@/libs/ImGuiFileDialog/stb
@cp -f $(EXT_LIB_DIR)/CImGuiFileDialog/{LICENSE,README.md,*.h} $(TARGET_DIR)/cimguifiledialog/
@cp -f $(EXT_LIB_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/
@cp -f $(EXT_LIB_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/dirent/{LICENSE,*.h,README.md} $(TARGET_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/dirent/
@cp -f $(EXT_LIB_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/stb/{LICENSE,*.h,README.md} $(TARGET_DIR)/CImGuiFileDialog/libs/ImGuiFileDialog/stb/
imguizmo:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/ImGuizmo
@cp -f $(EXT_LIB_DIR)/c$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/ImGuizmo/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/ImGuizmo/
imnodes:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/$@
@cp -f $(EXT_LIB_DIR)/c$@/{README.md,*.cpp,*.h} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/$@/{LICENSE.md,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/$@/
implot:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/$@
@cp -f $(EXT_LIB_DIR)/c$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/$@/
implot3d:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/$@
@cp -f $(EXT_LIB_DIR)/c$@/{*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/$@/
copy_imspinner:
@echo copying [ $(EXT_LIB_DIR)/imspinner] to $(TARGET_DIR)/imspinner
@-mkdir -p $(TARGET_DIR)/imspinner
@cp -f $(EXT_LIB_DIR)/imspinner/{*.cpp,*.h,LICENSE.txt,*.md} $(TARGET_DIR)/imspinner
imgui-knobs:
@echo copying [ $(EXT_LIB_DIR)/c$@] to $(TARGET_DIR)/c$@
@-mkdir -p $(TARGET_DIR)/c$@/libs/$@
@cp -f $(EXT_LIB_DIR)/c$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/
@cp -f $(EXT_LIB_DIR)/c$@/libs/$@/{LICENSE,*.cpp,*.h,README.md} $(TARGET_DIR)/c$@/libs/$@/
#$(TARGET_DIR):
# -mkdir -p $@
.PHONY: cimgui cimplot cimnodes cimguizmo cimguifiledialog cimgui_toggle cimCTE
clonelibs: libs cimgui cimplot cimnodes cimguizmo cimgui_toggle cimplot3d imspinner cimCTE cimgui-knobs
cimgui:
git clone --recurse-submodules https://github.com/$@/$@ ../libs/$@
cimplot:
git clone --recurse-submodules https://github.com/cimgui/$@ ../libs/$@
cimnodes:
git clone --recurse-submodules https://github.com/cimgui/$@ ../libs/$@
cimguizmo:
git clone --recurse-submodules https://github.com/cimgui/$@ ../libs/$@
cimguifiledialog:
git clone --recurse-submodules https://github.com/dinau/CImGuiFileDialog ../libs/CImGuiFileDialog
cimgui_toggle:
git clone --recurse-submodules https://github.com/dinau/$@ ../libs/$@
cimplot3d:
git clone --recurse-submodules https://github.com/cimgui/$@ ../libs/$@
imspinner:
git clone --recurse-submodules https://github.com/dalerank/$@ ../libs/$@
cimCTE:
git clone --recurse-submodules https://github.com/cimgui/$@ ../libs/$@
cimgui-knobs:
git clone --recurse-submodules https://github.com/dinau/cimgui-knobs/$@ /../libs/$@