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

Bart Van Assche
2018-06-27T21:49:10Z

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(-)

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