Skip to content

Commit 48d49e8

Browse files
don't compile no std (webasm)
1 parent 68baff8 commit 48d49e8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,27 +168,29 @@ else
168168
endif
169169

170170
examples/minimal_links/minimal_links: examples/minimal_links/minimal_links.c RGFW.h
171-
ifeq ($(detected_OS),Linux)
171+
ifeq ($(CC),emcc)
172+
@echo nostl is not supported on this platform
173+
else ifeq ($(detected_OS),Linux)
172174
$(CC) $(CFLAGS) -I. $< -o $@$(EXT)
173175
else ifeq ($(detected_OS),windows)
174176
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lgdi32 -o $@$(EXT)
175177
else ifeq ($(detected_OS),Darwin)
176178
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework Foundation -framework AppKit -o $@$(EXT)
177-
else ifeq ($(CC),emcc)
178-
$(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LIBS) $(LINK_GL3) -o $@$(EXT)
179179
else
180180
@echo minimal_links is not supported on this platform
181181
endif
182182

183183

184184
examples/nostl/nostl: examples/nostl/nostl.c RGFW.h
185-
ifeq ($(detected_OS),Linux)
185+
ifeq ($(CC),emcc)
186+
@echo nostl is not supported on this platform
187+
else ifeq ($(detected_OS),Linux)
186188
$(CC) $(CFLAGS) $(LIBS) -nostdlib -I. $< -o $@$(EXT)
187189
else ifeq ($(detected_OS),windows)
188190
$(CC) $(CFLAGS) $(WARNINGS) -nostdlib -I. $< -lgdi32 -o $@$(EXT)
189191
else ifeq ($(detected_OS),Darwin)
190192
$(CC) $(CFLAGS) $(WARNINGS) -nostdlib -I. $< -framework Foundation -framework AppKit -o $@$(EXT)
191-
else ifeq ($(CC),emcc)
193+
else
192194
@echo nostl is not supported on this platform
193195
endif
194196

0 commit comments

Comments
 (0)