Windows build ready. Program icon, however, exceeds string length on MSVC.

This commit is contained in:
2026-05-27 00:07:06 -07:00
parent 5f663308d2
commit e72db80fb4
13 changed files with 270 additions and 141 deletions
+2 -14
View File
@@ -15,12 +15,6 @@ endif
CC = clang
UFLAGS =
# NOTE: This project's code bases itself on C89 (plain C) standard, however
# allowing a few convenient features of newer standards. Mid-scope
# variable declarations, comments that begin with '//', long long,
# designated initializers, compound literals, and anonymous structures
# are allowed as they are convenient. Everything else that has come out
# of modern standards is pretty much destructive and should not be used.
FLAGS = -Wall -Wextra \
-Wincompatible-pointer-types \
-Wint-conversion -Wimplicit-int-float-conversion -Wformat \
@@ -43,10 +37,6 @@ else ifeq ($(DETECTED_OS),linux)
INCLUDE = -I./sdl/include/
LIBS = ./sdl/lib/x86_64-linux/libSDL2.a -lm -lX11
FRAMEWORKS =
else ifeq ($(DETECTED_OS),windows)
INCLUDE =
LIBS =
FRAMEWORKS =
else
INCLUDE =
LIBS =
@@ -58,12 +48,10 @@ EXE=handmadehero
default: libhandmade $(EXE)
libhandmade: handmade.c
@ $(CC) $(FLAGS) $(UFLAGS) -fPIC -shared $(INCLUDE) $^ $(LIBS) \
$(FRAMEWORKS) -o libhandmade.so
@ $(CC) $(FLAGS) $(UFLAGS) -fPIC -shared $(INCLUDE) $^ $(LIBS) $(FRAMEWORKS) -o libhandmade.so
$(EXE): sdl_handmade.c libhandmade
@ $(CC) $(FLAGS) $(UFLAGS) $(INCLUDE) sdl_handmade.c $(LIBS) \
$(FRAMEWORKS) -o $@
@ $(CC) $(FLAGS) $(UFLAGS) $(INCLUDE) sdl_handmade.c $(LIBS) $(FRAMEWORKS) -o $@ $(ifneq $(filter $(DETECTED_OS), macos linux), /link /FORCE:MULTIPLE)
run:
@ ./$(EXE)