From 7e0ddd7b783e17af13b1294887d461479a1faa47 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Oct 2017 01:12:30 +0200 Subject: Use basic config by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 1 + config.mk | 11 ++--------- optimised.mk | 13 +++++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 optimised.mk diff --git a/Makefile b/Makefile index f6bdc42..749e26e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .NONPOSIX: +# If possible, use CONFIGFILE=optimised.mk CONFIGFILE = config.mk diff --git a/config.mk b/config.mk index 0ad429a..71ccb0d 100644 --- a/config.mk +++ b/config.mk @@ -1,13 +1,6 @@ PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man -# These have not been extensively tested but appear to: -# * Produce produce false warnings -# * Slowdown the library's performance -# -flto -flto-compression-level -flto-partition={1to1,balanced,mix,none} -flto-report -flto-report-wpa -fwpa -CCOPTIMISE = -falign-functions=0 -fkeep-inline-functions -fmerge-all-constants -Ofast -LDOPTIMISE = - -CFLAGS = -std=c99 -Wall -Wextra $(CCOPTIMISE) +CFLAGS = -std=c99 -O3 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -LDFLAGS = $(LDOPTIMISE) +LDFLAGS = -s diff --git a/optimised.mk b/optimised.mk new file mode 100644 index 0000000..3891e85 --- /dev/null +++ b/optimised.mk @@ -0,0 +1,13 @@ +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man + +# These have not been extensively tested but appear to: +# * Produce false warnings +# * Slowdown the library's performance +# -flto -flto-compression-level -flto-partition={1to1,balanced,mix,none} -flto-report -flto-report-wpa -fwpa +CCOPTIMISE = -falign-functions=0 -fkeep-inline-functions -fmerge-all-constants -Ofast +LDOPTIMISE = -s + +CFLAGS = -std=c99 -Wall -Wextra $(CCOPTIMISE) +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 +LDFLAGS = $(LDOPTIMISE) -- cgit v1.2.3-70-g09d2