1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 8 May 2025 01:36:50 +0200
Subject: Makefile: Use default rule to link pack_cis
Forwarded: https://git.kernel.org/pub/scm/utils/cis-tools/cis-tools.git/commit?id=6d80f5fe05be80aa86e3af07a8558d4c283e45c1
Currently we define our own rule to build pack_cis, which does not
include CFLAGS and LDFLAGS in the command. The only special thing
about pack_cis is that it uses floating-point function so needs the
-lm option (unlike dump_cis).
Intead of defining our own rule for pack_cis, just define LDLIBS
so that the default rule will work.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 1fceb75..d3327fa 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,8 @@ lex_cis.o: lex_cis.c yacc_cis.h
$(CC) -MD $(CFLAGS) -Wno-unused-function $(CPPFLAGS) -c $<
@mkdir -p .depfiles ; mv $*.d .depfiles
+pack_cis: LDLIBS := -lm
pack_cis: pack_cis.o lex_cis.o yacc_cis.o
- $(CC) $+ -o $@ -lm
parser: lex_cis.o yacc_cis.c
$(CC) $(CFLAGS) $(CPPFLAGS) -DDEBUG -o $@ $+
|