Comply with ansi C and clean up.

This commit is contained in:
2026-07-15 13:26:36 -07:00
parent ffc4310646
commit a829ac8647
7 changed files with 465 additions and 291 deletions
+7 -4
View File
@@ -14,8 +14,8 @@ endif
CC = clang
UFLAGS =
FLAGS = -Wall -Wextra \
UFLAGS =
FLAGS = -ansi -pedantic -pedantic-errors -Wno-long-long -Wall -Wextra \
-Wincompatible-pointer-types \
-Wint-conversion -Wimplicit-int-float-conversion -Wformat \
-Wno-strict-prototypes -Wno-missing-field-initializers \
@@ -48,10 +48,13 @@ EXE=handmadehero
default: tags 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 $@ $(ifneq $(filter $(DETECTED_OS), macos linux), /link /FORCE:MULTIPLE)
@ $(CC) $(FLAGS) $(UFLAGS) $(INCLUDE) sdl_handmade.c $(LIBS) \
$(FRAMEWORKS) -o $@ $(ifneq $(filter $(DETECTED_OS), macos linux), \
/link /FORCE:MULTIPLE)
run:
@ ./$(EXE)