Comply with ansi C and clean up.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user