-# Export CFLAGS
-export CFLAGS = # empty
+build
+ # Export CFLAGS
+ export CFLAGS = # empty
-# Export CXXFLAGS
-export CXXFLAGS = %{CFLAGS}
+ # Export CXXFLAGS
+ export CXXFLAGS = %{CFLAGS}
-# Export LDFLAGS
-export LDFLAGS = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
+ # Export LDFLAGS
+ export LDFLAGS = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
-# Enable optimisation and compile in debugging information
-CFLAGS = -O2 -g
+ # Enable optimisation and compile in debugging information
+ CFLAGS = -O2 -g
-# Enable all compiler warnings
-CFLAGS += -Wall -Werror=format-security
+ # Enable all compiler warnings
+ CFLAGS += -Wall -Werror=format-security
-# Fortify Source
-CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3
+ # Fortify Source
+ CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3
-# Build Position Independent Code
-CFLAGS += -fPIC
+ # Build Position Independent Code
+ CFLAGS += -fPIC
-# Enable Stack Smashing Protection
-CFLAGS += -fstack-protector-strong
+ # Enable Stack Smashing Protection
+ CFLAGS += -fstack-protector-strong
-# Enable unwind tables
-CFLAGS += -funwind-tables -fasynchronous-unwind-tables
+ # Enable unwind tables
+ CFLAGS += -funwind-tables -fasynchronous-unwind-tables
-# Enable Stack Clash Protection
-CFLAGS += -fstack-clash-protection
+ # Enable Stack Clash Protection
+ CFLAGS += -fstack-clash-protection
-# Tell the compiler where the source will be put
-CFLAGS += -fdebug-prefix-map=%{DIR_SRC}=%{debugsourcedir}
+ # Tell the compiler where the source will be put
+ CFLAGS += -fdebug-prefix-map=%{DIR_SRC}=%{debugsourcedir}
-# Arch: x86_64
-CFLAGS_x86_64 = -m64 -march=x86-64-v2 -mtune=generic
+ # Arch: x86_64
+ CFLAGS_x86_64 = -m64 -march=x86-64-v2 -mtune=generic
-# Arch: aarch64
-CFLAGS_aarch64 = -mbranch-protection=standard
+ # Arch: aarch64
+ CFLAGS_aarch64 = -mbranch-protection=standard
-# Append architecture optimisations
-CFLAGS += %{CFLAGS_%{DISTRO_ARCH}}
+ # Append architecture optimisations
+ CFLAGS += %{CFLAGS_%{DISTRO_ARCH}}
-# Enable LTO
-LTO_CFLAGS = -flto=auto -ffat-lto-objects
-CFLAGS += %{LTO_CFLAGS}
+ # Enable LTO
+ LTO_CFLAGS = -flto=auto -ffat-lto-objects
+ CFLAGS += %{LTO_CFLAGS}
+end