Message ID | 20180709225643.10537-4-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/src/Makefile b/src/Makefile index 612282d14af8..7d15d115f6df 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -TARGETS := \ +C_TARGETS := \ loblksize \ loop_get_status_null \ openclose \ @@ -6,6 +6,8 @@ TARGETS := \ sg/syzkaller1 \ nbdsetsize +TARGETS := $(C_TARGETS) + CFLAGS := -O2 all: $(TARGETS) @@ -13,7 +15,7 @@ all: $(TARGETS) clean: rm -f $(TARGETS) -$(TARGETS): %: %.c +$(C_TARGETS): %: %.c $(CC) -Wall -o $@ $(CPPFLAGS) $(CFLAGS) $^ .PHONY: all clean
This patch does not change any functionality but will make it easier to add support for building C++ code. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)