[CRIU] [PATCH 3/4] make: Use PROTO_ prefix for protobuf targets
Cyrill Gorcunov
gorcunov at openvz.org
Sat Sep 1 08:39:23 EDT 2012
It's easier to handle things if we know that names
in makefiles are never intersected.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
protobuf/Makefile | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/protobuf/Makefile b/protobuf/Makefile
index ff869fb..9a9ba22 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -1,6 +1,6 @@
include ../Makefile.inc
-LIBRARY := protobuf-lib.o
+PROTO_LIBRARY := protobuf-lib.o
PROTO_FILES += inventory.proto
PROTO_FILES += fdinfo.proto
@@ -39,9 +39,9 @@ PROTO_FILES += vma.proto
PROTO_FILES += core.proto
PROTO_FILES += netdev.proto
-HDRS := $(patsubst %.proto,%.pb-c.h,$(PROTO_FILES))
-SRCS := $(patsubst %.proto,%.pb-c.c,$(PROTO_FILES))
-OBJS := $(patsubst %.c,%.o,$(SRCS))
+PROTO_HDRS := $(patsubst %.proto,%.pb-c.h,$(PROTO_FILES))
+PROTO_SRCS := $(patsubst %.proto,%.pb-c.c,$(PROTO_FILES))
+PROTO_OBJS := $(patsubst %.c,%.o,$(PROTO_SRCS))
.DEFAULT_GOAL := protobuf
@@ -55,15 +55,14 @@ OBJS := $(patsubst %.c,%.o,$(SRCS))
.SECONDARY:
-$(LIBRARY): $(OBJS)
+$(PROTO_LIBRARY): $(PROTO_OBJS)
$(E) " LINK "$@
- $(Q) ld -r -o $@ $(OBJS)
+ $(Q) ld -r -o $@ $(PROTO_OBJS)
.PHONY: protobuf
-protobuf: $(LIBRARY)
+protobuf: $(PROTO_LIBRARY)
clean:
$(E) " CLEAN PROTOBUF"
- $(Q) rm -f $(SRCS) $(HDRS) $(OBJS) $(LIBRARY)
-
+ $(Q) rm -f $(PROTO_SRCS) $(PROTO_HDRS) $(PROTO_OBJS) $(PROTO_LIBRARY)
--
1.7.7.6
More information about the CRIU
mailing list