From c53ff4692e05d2dd926020b202558347f2bc32f2 Mon Sep 17 00:00:00 2001 From: Quinn Date: Sun, 12 Jan 2025 20:33:57 +0100 Subject: [PATCH] switch to clang compiler --- makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index 2b737d8..de184ec 100644 --- a/makefile +++ b/makefile @@ -14,9 +14,9 @@ clean: # sets the variables for the different targets linux-x86_64: - $(MAKE) build ARCH=linux-x86_64 CC=gcc PCFLAGS="-lSDL2" + $(MAKE) build ARCH=linux-x86_64 CC=clang PCFLAGS="-target x86_64-pc-linux-gnu -lSDL2" win-x86_64: - $(MAKE) build ARCH=win-x86-64 CC=x86_64-w64-mingw32-gcc PCFLAGS="-lmingw32 -lSDL2main -lSDL2 -mwindows" EXT=".exe" + $(MAKE) build ARCH=win-x86-64 CC=clang PCFLAGS="-target x86_64-pc-windows-gnu -lmingw32 -lSDL2main -lSDL2 -mwindows" EXT=".exe" web: $(MAKE) build ARCH=web CC=emcc PCFLAGS="-s USE_SDL=2" EXT=".html" @@ -26,10 +26,10 @@ build: dirs binary binary: $(OBJ) $(CC) -o $(TARGET) $^ $(CFLAGS) $(PCFLAGS) -# creates the object files +# creates the object files, include a flag for no unused command line arguments, because in this context it's unneeded $(DIR_OBJ)/$(ARCH)/%.o: src/%.c mkdir -p $(dir $@) - $(CC) -o $@ -c $< $(CFLAGS) $(PCFLAGS) + $(CC) -o $@ -c $< $(CFLAGS) $(PCFLAGS) -Wno-unused-command-line-argument dirs: mkdir -p $(DIR_BIN)/$(ARCH)