@@ -50,6 +50,10 @@ ifeq (,$(filter $(CC),x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc x86_64-w64-min
5050 NO_GLES = 0
5151 NO_OSMESA = 0
5252 endif
53+
54+ ifeq (,$(filter $(detected_OS),Linux Darwin))
55+ detected_OS := windows
56+ endif
5357else
5458 OS_DIR = /
5559endif
@@ -100,7 +104,8 @@ EXAMPLE_OUTPUTS_CUSTOM = \
100104 examples/vk10/vk10 \
101105 examples/dx11/dx11 \
102106 examples/metal/metal \
103- examples/webgpu/webgpu
107+ examples/webgpu/webgpu \
108+ examples/minimal_links/minimal_links
104109
105110all : xdg-shell.c $(EXAMPLE_OUTPUTS ) $(EXAMPLE_OUTPUTS_CUSTOM ) libRGFW$(LIB_EXT ) libRGFW.a
106111
@@ -124,7 +129,7 @@ examples/osmesa/osmesa: examples/osmesa/osmesa.c RGFW.h
124129ifneq ($(NO_GLES ) , 1)
125130 $(CC) $(CFLAGS) -I. $< $(LIBS) $(LINK_GL2) -lOSMesa -o $@$(EXT)
126131else
127- @echo gles has been disabled
132+ @echo osmesa has been disabled
128133endif
129134
130135examples/vk10/vk10 : examples/vk10/vk10.c RGFW.h
@@ -161,6 +166,20 @@ else
161166 @echo webgpu is not supported on $(detected_OS)
162167endif
163168
169+ examples/minimal_links/minimal_links : examples/minimal_links/minimal_links.c RGFW.h
170+ ifeq ($(detected_OS ) ,Linux)
171+ $(CC) $(CFLAGS) $(WARNINGS) -I. $< -lm -o $@$(EXT)
172+ else ifeq ($(detected_OS),windows)
173+ $(CC) $(CFLAGS) $(WARNINGS) -I. $< -lgdi32 -o $@$(EXT)
174+ else ifeq ($(detected_OS),Darwin)
175+ $(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework Foundation -framework AppKit -o $@$(EXT)
176+ else ifeq ($(CC),emcc)
177+ $(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LIBS) $(LINK_GL3) -o $@$(EXT)
178+ else
179+ @echo not sure what this platform is
180+ endif
181+
182+
164183examples/microui_demo/microui_demo : examples/microui_demo/microui_demo.c RGFW.h
165184ifneq ($(CC ) , emcc)
166185 $(CC) $(CFLAGS) -I. $< examples/microui_demo/microui.c $(LIBS) -o $@$(EXT)
0 commit comments