scalc: Separate LDFLAGS and LIBS v1 APPLIED

Steven Guikal: 1
 Separate LDFLAGS and LIBS

 2 files changed, 3 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~arivigo/scalc-devel/patches/23277/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH scalc] Separate LDFLAGS and LIBS Export this patch

Paraphrasing from a conversation with Eli Schwartz:

The purpose of LDFLAGS is to allow users and packagers to modify
non-critical flags when compiling. LIBS, on the other hand, are required
for compilation.

 Makefile  | 2 +-
 config.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 594116e..a07a21a 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ strlcpy.o: strlcpy.h
${OBJ}: config.mk

scalc: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS}
	${CC} -o $@ ${OBJ} ${LDFLAGS} ${LIBS}

	rm -f scalc ${OBJ} scalc-${VERSION}.tar.gz
diff --git a/config.mk b/config.mk
index 511993c..f2e5375 100644
--- a/config.mk
+++ b/config.mk
@@ -14,8 +14,8 @@ LIBS = -lm
#CFLAGS = -g -std=c99 -Wpedantic -Wall -Wextra ${CPPFLAGS}
CFLAGS = -std=c99 -Wpedantic -Wall -Wextra ${CPPFLAGS}
#LDFLAGS = -static ${LIBS}
#LDFLAGS = -static

# Compiler and linker
CC = cc
Dear Steven,
Thank for your patch. Very informative indeed! I've applied it already.

This seems important enough for packaging purposes as per releasing
scalc 0.2.1 with this patch included. I will wait a couple of hours to
do so, just in case anything else related to the build system arises in 
the meantime.


Ariadna Vigo
Web: <https://ariadnavigo.xyz>
PGP: 0xA3B1324836A669BD