From 0fbc51f034f5f8882f366b7288732061bebffae6 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 12:22:53 +0000 Subject: Apply patch 0023-Allow-overriding-build-settings-from-the-environment.patch patch_name: 0023-Allow-overriding-build-settings-from-the-environment.patch present_in_specfile: true --- diff --git a/Makefile b/Makefile index 194a523..7aa729d 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,13 @@ # (at your option) any later version. # -CC = gcc -CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ +CC ?= gcc +# Base CFLAGS can be overridden by environment +CFLAGS ?= -O2 +# When debugging, disable -O2 and enable -g +#CFLAGS ?= -g + +CFLAGS += -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef # Let lseek and mmap support 64-bit wide offsets @@ -22,12 +27,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 #CFLAGS += -DBIGENDIAN #CFLAGS += -DALIGNMENT_WORKAROUND -# When debugging, disable -O2 and enable -g. -CFLAGS += -O2 -#CFLAGS += -g - -# Pass linker flags here -LDFLAGS = +# Pass linker flags here (can be set from environment too) +LDFLAGS ?= DESTDIR = prefix = /usr/local