From 48de208b5e29d9d43d68cf8a1392a673616d0c6a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 28 May 2014 02:31:10 +0200 Subject: fix order things in the makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b786ed0..ef203e7 100644 --- a/Makefile +++ b/Makefile @@ -25,13 +25,6 @@ LICENSEDIR ?= $(DATADIR)/licenses PKGNAME ?= libgamma -# Optimisation level (and debug flags.) -ifeq ($(DEBUG),y) -OPTIMISE = -Og -g -else -OPTIMISE = -Ofast -endif - # Enabled warnings. WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self \ -Wmissing-include-dirs -Wtrampolines -Wfloat-equal -Wshadow \ @@ -48,20 +41,6 @@ WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self \ # The C standard used in the code. STD = c99 -# C compiler debug flags. -DEBUG_FLAGS = -ifeq ($(DEBUG),y) -DEBUG_FLAGS += -D'DEBUG' -endif - -# Options for the C compiler for the test. -TEST_FLAGS = $(OPTIMISE) $(WARN) -std=$(STD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ - -ftree-vrp -fstrict-aliasing -fipa-pure-const -fstack-usage \ - -fstrict-overflow -funsafe-loop-optimizations -fno-builtin - -# Options for the C compiler for the library. -LIB_FLAGS = $(TEST_FLAGS) $(DEBUG_FLAGS) $(DEFINITIONS) -DLIBGAMMA_CONFIG_H - # Library linking flags for the linker. LIBS_LD = # Library linking flags for the C compiler. @@ -78,10 +57,30 @@ LIB_MAJOR = 1 LIB_MINOR = 0 LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR) - # Include configurations from `./configure`. include .config.mk +# Optimisation level (and debug flags.) +ifeq ($(DEBUG),y) +OPTIMISE = -Og -g +else +OPTIMISE = -Ofast +endif + +# C compiler debug flags. +DEBUG_FLAGS = +ifeq ($(DEBUG),y) +DEBUG_FLAGS += -D'DEBUG' +endif + +# Options for the C compiler for the test. +TEST_FLAGS = $(OPTIMISE) $(WARN) -std=$(STD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ + -ftree-vrp -fstrict-aliasing -fipa-pure-const -fstack-usage \ + -fstrict-overflow -funsafe-loop-optimizations -fno-builtin + +# Options for the C compiler for the library. +LIB_FLAGS = $(TEST_FLAGS) $(DEBUG_FLAGS) $(DEFINITIONS) -DLIBGAMMA_CONFIG_H + # Build rules. -- cgit v1.2.3-70-g09d2