From 37b2580b9f1153c140ab684825442fec0c7840ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 21 Mar 2016 16:37:21 +0100 Subject: build: reorder some variables --- Makefile | 2 +- configure | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7d10205..dab804b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CONFIG_LUA ?= 1 CONFIG_ACL ?= 0 CONFIG_SELINUX ?= 0 -CFLAGS_STD ?= -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG -Os +CFLAGS_STD ?= -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG LDFLAGS_STD ?= -lc CFLAGS_VIS = $(CFLAGS_AUTO) $(CFLAGS_TERMKEY) $(CFLAGS_CURSES) $(CFLAGS_ACL) \ diff --git a/configure b/configure index 0281354..d55588f 100755 --- a/configure +++ b/configure @@ -198,7 +198,7 @@ tryflag CFLAGS_TRY -Werror=unused-command-line-argument tryldflag LDFLAGS_TRY -Werror=unknown-warning-option tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument -CFLAGS_STD="-std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG -Os" +CFLAGS_STD="-std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG" LDFLAGS_STD="-lc" OS=$(uname) @@ -209,13 +209,16 @@ Darwin) CFLAGS_STD+=-D_BSD_SOURCE ;; AIX) CFLAGS_STD+=-D_ALL_SOURCE ;; esac +tryflag CFLAGS_AUTO -pipe + +# Try flags to optimize binary size +tryflag CFLAGS_AUTO -Os + have_pkgconfig=no printf "checking for pkg-config... " cmdexists pkg-config && have_pkgconfig=yes printf "%s\n" "$have_pkgconfig" -tryflag CFLAGS_AUTO -pipe - # libcurses is a mandatory dependency printf "checking for libcurses...\n" @@ -430,12 +433,11 @@ MANPREFIX = $mandir SHAREPREFIX = $sharedir CC = $CC CFLAGS = $CFLAGS +LDFLAGS = $LDFLAGS CFLAGS_STD = $CFLAGS_STD LDFLAGS_STD = $LDFLAGS_STD CFLAGS_AUTO = $CFLAGS_AUTO LDFLAGS_AUTO = $LDFLAGS_AUTO -LDFLAGS = $LDFLAGS -LDFLAGS_AUTO = $LDFLAGS_AUTO CFLAGS_CURSES = $CFLAGS_CURSES LDFLAGS_CURSES = $LDFLAGS_CURSES CFLAGS_TERMKEY = $CFLAGS_TERMKEY -- cgit v1.2.3