Commit 40688d19 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: Use PROTO_ prefix for protobuf targets

It's easier to handle things if we know that names
in makefiles are never intersected.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d88eebc9
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment