aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-28 02:31:10 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-28 02:31:10 +0200
commit48de208b5e29d9d43d68cf8a1392a673616d0c6a (patch)
tree533ecc8576ffb8684ca359cb89e1f9c5976fc7cc /Makefile
parenton configuring (diff)
downloadlibgamma-48de208b5e29d9d43d68cf8a1392a673616d0c6a.tar.gz
libgamma-48de208b5e29d9d43d68cf8a1392a673616d0c6a.tar.bz2
libgamma-48de208b5e29d9d43d68cf8a1392a673616d0c6a.tar.xz
fix order things in the makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 21 insertions, 22 deletions
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.