From 5433aa28e702f96dc244f7d5d087cd04259d1e9b Mon Sep 17 00:00:00 2001 From: AKuHAK <621640+AKuHAK@users.noreply.github.com> Date: Tue, 25 May 2021 11:10:06 +0300 Subject: [PATCH] Fix for compilation on MSYS/MINGW32 toolchain --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c4f39a0..d0457e1 100644 --- a/Makefile +++ b/Makefile @@ -5,20 +5,28 @@ CFLAGS = -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include - ifeq "x$(MSYSTEM)" "x" + ifneq "MINGW" "$(findstring MINGW,$(MSYSTEM))" LIBS = -lpthread else - LIBS = -lwsock32 -lpthreadGC2 + LIBS = -lwsock32 endif ifeq "x$(PREFIX)" "x" PREFIX = $(PS2DEV) endif - all: bin/fsclient bin/ps2client + ifeq "MINGW" "$(findstring MINGW,$(MSYSTEM))" + all: + $(MAKE) -f Makefile.mingw32 all - clean: + clean: + $(MAKE) -f Makefile.mingw32 clean + else + all: bin/fsclient bin/ps2client + + clean: rm -f obj/*.o bin/*client* + endif install: bin/fsclient bin/ps2client strip bin/*client*