mirror of
https://github.com/zap-proto/java.git
synced 2026-10-30 15:04:51 +00:00
Complete the org.capnproto → org.zap rebrand across the Java port: runtime, compiler plugin, examples, benchmark, schemas (.capnp → .zap), docs and website. Zero capnp / Cap'n Proto content remains in source or build files; upstream Sandstorm MIT headers are preserved. pom.xml and Makefile reference zap (org.zap, zap-proto.io, zapc-java, libzap/kj). Bump build dependencies to the latest release within each major: - junit-jupiter 5.11.4 → 5.14.4 - maven-compiler-plugin 3.6.2/3.3 → 3.15.0 - maven-antrun-plugin 3.0.0 → 3.2.0 - build-helper-maven-plugin 3.1.0 → 3.6.1 - maven-source-plugin 2.2.1 → 2.4 - maven-javadoc-plugin 2.10.3 → 2.10.4 - nexus-staging-maven-plugin 1.6.6 → 1.7.0 CI: trigger on main (was master, the default branch had no gate); build and test the pure-Java runtime on Temurin JDK 8 and 21 (checkout@v4, setup-java@v4). The runtime has no native dependency and is the real gate. The native zapc-java + conformance suite require the published zap schema compiler toolchain and are reintroduced once it ships. runtime: mvn -B -pl runtime test → 27 run, 0 failures, 0 errors, 1 skipped.
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
PKG_CONFIG ?= pkg-config
|
|
ZAP_CXX_FLAGS=$(shell $(PKG_CONFIG) zap --cflags --libs)
|
|
|
|
ifeq ($(ZAP_CXX_FLAGS),)
|
|
$(warning "Warning: pkg-config failed to find compilation configuration for zap.")
|
|
$(warning "Falling back to a guess based on the location of the zap executable.")
|
|
ZAP_PREFIX=$(shell dirname $(shell which zap))/..
|
|
ZAP_CXX_FLAGS=-I $(ZAP_PREFIX)/include -L $(ZAP_PREFIX)/lib -lkj -lzap
|
|
endif
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
CXX ?= g++
|
|
CXX_FLAGS=-std=c++14 $(ZAP_CXX_FLAGS)
|
|
|
|
ZAPC_JAVA_SOURCES=compiler/src/main/cpp/zapc-java.c++
|
|
|
|
.PHONY: all clean
|
|
|
|
all : zapc-java
|
|
|
|
clean :
|
|
rm -f zapc-java zapc-java.exe
|
|
|
|
zapc-java : $(ZAPC_JAVA_SOURCES)
|
|
$(CXX) $(ZAPC_JAVA_SOURCES) $(CXX_FLAGS) $(CFLAGS) $(LDFLAGS) -o zapc-java
|
|
|
|
install:
|
|
mkdir -p ${PREFIX}/bin
|
|
mkdir -p ${PREFIX}/include/zap/
|
|
cp zapc-java ${PREFIX}/bin
|
|
cp compiler/src/main/schema/zap/java.zap ${PREFIX}/include/zap/
|
|
|
|
MINGW_LIBS=~/src/zap/c++/build-mingw/.libs/libzap.a ~/src/zap/c++/build-mingw/.libs/libkj.a
|
|
MINGW_CXX=i686-w64-mingw32-g++
|
|
MINGW_FLAGS=-O2 -DNDEBUG -I/usr/local/include -std=c++14 -static -static-libgcc -static-libstdc++
|
|
zapc-java.exe : $(ZAPC_JAVA_SOURCES)
|
|
$(MINGW_CXX) $(MINGW_FLAGS) $(ZAPC_JAVA_SOURCES) $(MINGW_LIBS) -o zapc-java.exe
|