Additionally, move -Wall from the C compilation rule to the $(CFLAGS)
variable.

Signed-off-by: Bart Van Assche <[email protected]>
---
 src/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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
-- 
2.17.1

Reply via email to