Fix a few things in Makefile guidelines - bitreich-style - Style guide for programmers.
(HTM) git clone git://bitreich.org/bitreich-style
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit f428b125ec23c9c03c88380e2ecde62c04a943bf
(DIR) parent 9753b870ed2a7e43799d1207e7a91d5828ebdb19
(HTM) Author: Quentin Rameau <quinq@fifth.space>
Date: Tue, 13 Jul 2021 23:40:15 +0200
Fix a few things in Makefile guidelines
- internal macros are only allowed in target command lines
- there's no need to specify -o with -c as the default is to use the
same name as the source
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M c/makefile-guideline.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/c/makefile-guideline.txt b/c/makefile-guideline.txt
@@ -176,10 +176,10 @@ Build the json.c file as a local reusable linkable library (libjson.a).
The default build rule: build the binary.
- 29 ${BIN}: ${LIB} ${@:=.o}
+ 29 ${BIN}: ${LIB} ${BIN:=.o}
30
-The binary depends on the own libjson library and object files.
+The binary depends on the libjson library and its own object file.
31 OBJ = ${SRC:.c=.o} ${LIBJSONOBJ}
32
@@ -199,7 +199,7 @@ Linking, use the system specified LDFLAGS.
37
38 .c.o:
- 39 ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<
+ 39 ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
Compiling, use the system specified CFLAGS and CPPFLAGS.