Protobuf: added generation of symlink to build script
This commit is contained in:
@@ -2,19 +2,22 @@ CXX = g++
|
|||||||
CXXFLAGS = -O2 -std=c++11
|
CXXFLAGS = -O2 -std=c++11
|
||||||
LDFLAGS = -lprotoc -lprotobuf
|
LDFLAGS = -lprotoc -lprotobuf
|
||||||
|
|
||||||
|
# Generated artifacts
|
||||||
BUILDDIR = build
|
BUILDDIR = build
|
||||||
EXE = $(BUILDDIR)/protoc
|
EXE = $(BUILDDIR)/protoc
|
||||||
JAR = $(BUILDDIR)/protokot-runtime.jar
|
JAR = $(BUILDDIR)/protokot-runtime.jar
|
||||||
|
SYMLINK = $(BUILDDIR)/sources
|
||||||
|
|
||||||
# C++ part
|
# C++ part
|
||||||
PROTOC_DIR = compiler/google/src/google/protobuf/compiler/kotlin
|
PROTOC_DIR = google/src/google/protobuf/compiler/kotlin
|
||||||
PROTOC_EXE = $(PROTOC_DIR)/protoc
|
PROTOC_EXE = $(PROTOC_DIR)/protoc
|
||||||
|
|
||||||
# Kotlin part
|
# Kotlin part
|
||||||
RUNTIME_DIR = compiler/runtime
|
RUNTIME_DIR = runtime
|
||||||
|
RUNTIME_SRC = $(RUNTIME_DIR)/src/main/kotlin
|
||||||
RUNTIME_JAR = $(RUNTIME_DIR)/build/libs/protokot-runtime.jar
|
RUNTIME_JAR = $(RUNTIME_DIR)/build/libs/protokot-runtime.jar
|
||||||
|
|
||||||
all: $(EXE) $(JAR)
|
all: $(EXE) $(JAR) $(SYMLINK)
|
||||||
|
|
||||||
# Place protoc* into build directory
|
# Place protoc* into build directory
|
||||||
$(EXE): $(BUILDDIR) $(PROTOC_EXE)
|
$(EXE): $(BUILDDIR) $(PROTOC_EXE)
|
||||||
@@ -32,6 +35,9 @@ $(JAR): $(BUILDDIR) gradle_invoke
|
|||||||
gradle_invoke:
|
gradle_invoke:
|
||||||
cd $(RUNTIME_DIR); gradle build
|
cd $(RUNTIME_DIR); gradle build
|
||||||
|
|
||||||
|
$(SYMLINK):
|
||||||
|
ln -nsf ../$(RUNTIME_SRC) $(SYMLINK)
|
||||||
|
|
||||||
# Create auxillary directories
|
# Create auxillary directories
|
||||||
$(BINDIR):
|
$(BINDIR):
|
||||||
mkdir -p $(BINDIR)
|
mkdir -p $(BINDIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user