mirror of
https://github.com/Tiiffi/mcrcon.git
synced 2025-10-28 11:51:08 -04:00
Modify compilation flags:
- Remove "-s" flag - Change stack protector mode from "strong" to "all" - Change optimization level from "-Os" to "-O2"
This commit is contained in:
@ -5,7 +5,7 @@ Only dependency is C library and POSIX getopt support.
|
|||||||
|
|
||||||
Compiling with GCC or CLANG:
|
Compiling with GCC or CLANG:
|
||||||
|
|
||||||
cc -std=gnu99 -Wpedantic -Wall -Wextra -Os -s -o mcrcon mcrcon.c
|
cc -std=gnu99 -Wpedantic -Wall -Wextra -O2 -o mcrcon mcrcon.c
|
||||||
|
|
||||||
Note: on Windows remember to link with winsock by adding `-lws2_32` to your compiler command line.
|
Note: on Windows remember to link with winsock by adding `-lws2_32` to your compiler command line.
|
||||||
|
|
||||||
|
|||||||
8
Makefile
8
Makefile
@ -4,7 +4,7 @@
|
|||||||
# make
|
# make
|
||||||
#
|
#
|
||||||
# Windows cross compile:
|
# Windows cross compile:
|
||||||
# i686-w64-mingw32-gcc -std=gnu99 -Wall -Wextra -Wpedantic -Os -s -o mcrcon.exe mcrcon.c -lws2_32
|
# i686-w64-mingw32-gcc -std=gnu99 -Wall -Wextra -Wpedantic -O2 -o mcrcon.exe mcrcon.c -lws2_32
|
||||||
|
|
||||||
EXENAME = mcrcon
|
EXENAME = mcrcon
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
@ -14,8 +14,8 @@ LINKER =
|
|||||||
RM = rm -v -f
|
RM = rm -v -f
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Os -s
|
CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -O2
|
||||||
EXTRAFLAGS ?= -fstack-protector-strong
|
EXTRAFLAGS ?= -fstack-protector-all
|
||||||
|
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
LINKER = -lws2_32
|
LINKER = -lws2_32
|
||||||
@ -25,7 +25,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(shell uname), Darwin)
|
ifeq ($(shell uname), Darwin)
|
||||||
INSTALL = ginstall
|
INSTALL = ginstall
|
||||||
CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Os
|
CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -O2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|||||||
Reference in New Issue
Block a user