From af5e88b528136f30efd7a86eee1bffb795eb36e3 Mon Sep 17 00:00:00 2001 From: Tiiffi Date: Sun, 22 Dec 2019 00:05:31 +0200 Subject: [PATCH] Update Makefile --- Makefile | 13 ++++++++----- mcrcon.c | 10 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 3d4b6ce..c755128 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -# if you want to cross compile -# export PATH=$PATH:/path/to/compiler/bin -# export CROSS_COMPILE=arm-none-linux-gnueabi- -# make +# if you want to cross compile: +# export PATH=$PATH:/path/to/compiler/bin +# export CROSS_COMPILE=arm-none-linux-gnueabi- +# make +# +# Windows cross compile: +# i686-w64-mingw32-gcc -std=gnu99 -Wall -Wextra -Wpedantic -Os -s -o mcrcon.exe mcrcon.c -lws2_32 EXENAME = mcrcon PREFIX ?= /usr/local @@ -10,7 +13,7 @@ INSTALL = install LINKER = RM = rm -v -f -CC = cc +CC = gcc CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Os -s EXTRAFLAGS ?= -fstack-protector-strong diff --git a/mcrcon.c b/mcrcon.c index a213bf5..5486ca7 100644 --- a/mcrcon.c +++ b/mcrcon.c @@ -493,15 +493,15 @@ void print_color(int color) }; /* 0x72: 'r' */ - if(color == 0 || color == 0x72) fputs("\033[0m", stdout); /* CANCEL COLOR */ + if (color == 0 || color == 0x72) fputs("\033[0m", stdout); /* CANCEL COLOR */ else #endif { - if(color >= 0x61 && color <= 0x66) color -= 0x57; - else if(color >= 0x30 && color <= 0x39) + if (color >= 0x61 && color <= 0x66) color -= 0x57; + else if (color >= 0x30 && color <= 0x39) color -= 0x30; - else if(color == 0x6e) - color=16; /* 0x6e: 'n' */ + else if (color == 0x6e) + color = 16; /* 0x6e: 'n' */ else return; #ifndef _WIN32