$ git clone http://tcclient.ion.nu/tc_client.git
commit 08284b500b0725e965afe30b1361c2dbf558ecb6
Author: Alicia <...>
Date: Fri Feb 26 16:48:41 2016 +0100
Makefile: added some foolproofing for building on windows.
diff --git a/ChangeLog b/ChangeLog
index 2e2233d..1b63df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
0.38:
Handle multi-line messages.
Makefile: added missing sourcefiles for the tarball target.
+Makefile: added some foolproofing for building on windows.
tc_client-gtk: if HOME is not set use "." instead.
tc_client-gtk: windows compat: don't try to run empty commands.
tc_client-gtk: make timestamps gray and nicknames bold.
diff --git a/Makefile b/Makefile
index 1ab33d5..125d697 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,11 @@ PREFIX=/usr/local
CURL_LIBS=$(shell curl-config --libs)
ifneq ($(wildcard config.mk),)
include config.mk
+else
+ ifneq ($(findstring MINGW,$(shell uname -s)),)
+ err:
+ @echo 'Run ./configure first, make sure tc_client-gtk is enabled.'
+ endif
endif
OBJ=client.o amfparser.o rtmp.o numlist.o amfwriter.o idlist.o colors.o endian.o media.o
IRCHACK_OBJ=utilities/irchack/irchack.o utilities/compat.o
@@ -34,6 +39,10 @@ ifdef SWSCALE_LIBS
endif
endif
ifneq ($(findstring MINGW,$(shell uname -s)),)
+ ifeq ($(findstring mingw,$(shell $(CC) -v 2>&1 | grep Target)),)
+ err:
+ @echo "Error, you're in a mingw shell but $(CC) doesn't seem to be a mingw compiler"
+ endif
LDFLAGS+=-mwindows
# Using ESCAPI for cam support on windows, http://sol.gfxile.net/escapi/
ifneq ($(wildcard escapi),)
@@ -48,6 +57,10 @@ ifdef SWSCALE_LIBS
@echo 'To build the core (tc_client.exe), enter this directory from cygwin (or MSYS2 non-MinGW shell) and type make'
endif
ifneq ($(findstring MSYS,$(shell uname -s)),)
+ ifeq ($(findstring msys,$(shell $(CC) -v 2>&1 | grep Target)),)
+ err:
+ @echo "Error, you're in an msys shell but $(CC) doesn't seem to be an msys compiler"
+ endif
msystargets: tc_client
@echo
@echo 'To build the gtk+ GUI, enter this directory from a MinGW shell and type make'