diff mbox

[blktests,v2,1/3] src/Makefile: Rename $(TARGETS) into $(C_TARGETS)

Message ID 20180627214908.26379-2-bart.vanassche@wdc.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bart Van Assche June 27, 2018, 9:49 p.m. UTC
Additionally, move -Wall from the C compilation rule to the $(CFLAGS)
variable.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
---
 src/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Johannes Thumshirn June 28, 2018, 6:41 a.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox

Patch

diff --git a/src/Makefile b/src/Makefile
index 612282d14af8..efbf393f4c58 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@ 
-TARGETS := \
+C_TARGETS := \
 	loblksize \
 	loop_get_status_null \
 	openclose \
@@ -6,14 +6,16 @@  TARGETS := \
 	sg/syzkaller1 \
 	nbdsetsize
 
-CFLAGS := -O2
+TARGETS := $(C_TARGETS)
+
+CFLAGS := -O2 -Wall
 
 all: $(TARGETS)
 
 clean:
 	rm -f $(TARGETS)
 
-$(TARGETS): %: %.c
-	$(CC) -Wall -o $@ $(CPPFLAGS) $(CFLAGS) $^
+$(C_TARGETS): %: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
 
 .PHONY: all clean