@@ -12,9 +12,9 @@ CUSTOM_CFLAGS =
1212# used for the examples
1313CFLAGS =
1414
15- DX11_LIBS = -static -lgdi32 -lm - lwinmm -ldxgi -ld3d11 -luuid -ld3dcompiler
16- VULKAN_LIBS = -lgdi32 -lm - lwinmm -I $(VULKAN_SDK ) \Include -L $(VULKAN_SDK ) \Lib -lvulkan-1
17- LIBS := -static -luser32 -lgdi32 -lm - lopengl32 -lwinmm -ggdb
15+ DX11_LIBS = -static -lgdi32 -lwinmm -ldxgi -ld3d11 -luuid -ld3dcompiler
16+ VULKAN_LIBS = -lgdi32 -lwinmm -I $(VULKAN_SDK ) \Include -L $(VULKAN_SDK ) \Lib -lvulkan-1
17+ LIBS := -static -luser32 -lgdi32 -lopengl32 -lwinmm -ggdb
1818EXT = .exe
1919LIB_EXT = .dll
2020
@@ -34,16 +34,16 @@ ifeq (,$(filter $(CC),x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc x86_64-w64-min
3434 detected_OS := $(shell uname 2>/dev/null || echo Unknown)
3535
3636 ifeq ($(detected_OS),Darwin) # Mac OS X
37- LIBS := -lm - framework Foundation -framework AppKit -framework OpenGL -framework IOKit
38- VULKAN_LIBS = -lm -framework Foundation -framework AppKit -lvulkan
37+ LIBS := -framework Foundation -framework AppKit -framework OpenGL -framework IOKit
38+ VULKAN_LIBS = -framework Foundation -framework AppKit -lvulkan
3939 EXT =
4040 LIB_EXT = .dylib
4141 OS_DIR = /
4242 NO_VULKAN = 1
4343 endif
4444 ifeq ($(detected_OS),Linux)
45- LIBS := -lXrandr -lX11 -lm - lGL -ldl -lpthread
46- VULKAN_LIBS = -lX11 -lXrandr -lm - ldl -lpthread -lvulkan
45+ LIBS := -lXrandr -lX11 -lGL -ldl -lpthread
46+ VULKAN_LIBS = -lX11 -lXrandr -ldl -lpthread -lvulkan
4747 EXT =
4848 LIB_EXT = .so
4949 OS_DIR = /
5959endif
6060
6161ifeq ($(RGFW_WAYLAND ) ,1)
62- LIBS = -D RGFW_WAYLAND relative-pointer-unstable-v1-client-protocol.c xdg-decoration-unstable-v1.c xdg-shell.c -lwayland-cursor -lwayland-client -lEGL -lxkbcommon -lGL -lwayland-egl -lm
62+ LIBS = -D RGFW_WAYLAND relative-pointer-unstable-v1-client-protocol.c xdg-decoration-unstable-v1.c xdg-shell.c -lwayland-cursor -lwayland-client -lEGL -lxkbcommon -lGL -lwayland-egl
6363endif
6464
6565LINK_GL1 =
@@ -89,14 +89,15 @@ endif
8989
9090EXAMPLE_OUTPUTS = \
9191 examples/basic/basic \
92- examples/gamepad/gamepad \
9392 examples/buffer/buffer \
9493 examples/silk/silk \
9594 examples/events/events \
96- examples/callbacks/callbacks \
97- examples/first-person-camera/camera
95+ examples/callbacks/callbacks
96+
9897
9998EXAMPLE_OUTPUTS_CUSTOM = \
99+ examples/gamepad/gamepad \
100+ examples/first-person-camera/camera \
100101 examples/microui_demo/microui_demo \
101102 examples/gl33/gl33 \
102103 examples/portableGL/pgl \
@@ -155,7 +156,7 @@ endif
155156examples/metal/metal : examples/metal/metal.m RGFW.h
156157ifeq ($(detected_OS ) ,Darwin) # Mac OS X
157158 gcc $(CUSTOM_CFLAGS) -x c -c RGFW.h -D RGFW_NO_API -D RGFW_EXPORT -D RGFW_IMPLEMENTATION -o RGFW.o
158- gcc $(CUSTOM_CFLAGS) examples/metal/metal.m RGFW.o -I. -lm - framework Metal -framework Foundation -framework AppKit -framework Cocoa -framework IOKit -framework QuartzCore -o $@
159+ gcc $(CUSTOM_CFLAGS) examples/metal/metal.m RGFW.o -I. -framework Metal -framework Foundation -framework AppKit -framework Cocoa -framework IOKit -framework QuartzCore -o $@
159160else
160161 @echo metal is not supported on $(detected_OS)
161162endif
@@ -202,6 +203,13 @@ else
202203 $(CC) $(CFLAGS) -I. $< examples/microui_demo/microui.c -s USE_WEBGL2 $(LIBS) $(LINK_GL1) -o $@$(EXT)
203204endif
204205
206+ examples/gamepad/gamepad : examples/gamepad/gamepad.c RGFW.h
207+ $(CC ) $(CFLAGS ) $(WARNINGS ) -I. $< $(LIBS ) -lm $(LINK_GL1 ) -o $@ $(EXT )
208+
209+ examples/first-person-camera/camera : examples/first-person-camera/camera.c RGFW.h
210+ $(CC ) $(CFLAGS ) $(WARNINGS ) -I. $< $(LIBS ) -lm $(LINK_GL1 ) -o $@ $(EXT )
211+
212+
205213examples/gl33/gl33 : examples/gl33/gl33.c RGFW.h
206214 $(CC ) $(CFLAGS ) $(WARNINGS ) -I. $< $(LIBS ) $(LINK_GL3 ) -o $@ $(EXT )
207215
@@ -213,14 +221,16 @@ debug: all
213221 echo " Running $$ exe..." ; \
214222 .$(OS_DIR ) $$ exe$(EXT ) ; \
215223 done
216-
224+
225+ ./examples/gamepad/gamepad
226+ ./examples/first-person-camera/camera
217227 ./examples/portableGL/pgl$(EXT )
218228 ./examples/gl33/gl33$(EXT )
219229ifneq ($(NO_GLES ) , 1)
220230 ./examples/gles2/gles2$(EXT)
221231endif
222232ifneq ($(NO_OSMESA ) , 1)
223- ./examples/gles2/gles2 $(EXT)
233+ ./examples/osmesa/osmesa $(EXT)
224234endif
225235ifneq ($(NO_VULKAN ) , 1)
226236 ./examples/vk10/vk10$(EXT)
0 commit comments