Skip to content

Commit d73549c

Browse files
committed
[fubuki] update Makefile for fubuki
1 parent a6840f2 commit d73549c

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,9 @@ test/src/test/java/io/vproxy/test/gen/packetfilters/*.java
7676

7777
# some submodules but not tracked with gitsubmodule
7878
submodules/msquic/
79+
80+
# cargo build cache
81+
/cargo-cache/git/*
82+
/cargo-cache/registry/*
83+
!/cargo-cache/git/.gitkeep
84+
!/cargo-cache/registry/.gitkeep

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
path = submodules/msquic-java
33
url = https://github.com/wkgcass/msquic-java
44
branch = panama
5+
6+
[submodule "submodules/fubuki"]
7+
path = submodules/fubuki
8+
url = https://github.com/xutianyi1999/fubuki
9+
branch = master

Makefile

+17-4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ clean: clean-jar
3333
rm -f ./*.so
3434
rm -f ./*.dylib
3535
rm -f ./*.dll
36+
cd ./submodules/fubuki/ && cargo clean
3637

3738
.PHONY: clean-docker-plugin-rootfs
3839
clean-docker-plugin-rootfs:
@@ -62,19 +63,21 @@ _add_linux_so_to_zip:
6263
cp ./base/src/main/c/xdp/libbpf/src/libbpf.so.0.6.0 ./io/vproxy/libbpf-$(LINUX_ARCH).so
6364
cp ./libmsquic.so ./io/vproxy/libmsquic-$(LINUX_ARCH).so
6465
cp ./base/src/main/c/libmsquic-java.so ./io/vproxy/libmsquic-java-$(LINUX_ARCH).so
66+
cp ./submodules/fubuki/target/release/libfubuki.so ./io/vproxy/libfubuki-$(LINUX_ARCH).so
6567
zip build/libs/vproxy.jar \
6668
./io/vproxy/libvfdposix-$(LINUX_ARCH).so \
6769
./io/vproxy/libvpxdp-$(LINUX_ARCH).so \
6870
./io/vproxy/libbpf-$(LINUX_ARCH).so \
6971
./io/vproxy/libmsquic-$(LINUX_ARCH).so \
70-
./io/vproxy/libmsquic-java-$(LINUX_ARCH).so
72+
./io/vproxy/libmsquic-java-$(LINUX_ARCH).so \
73+
./io/vproxy/libfubuki-$(LINUX_ARCH).so
7174
rm -r ./io
7275

7376
.PHONY: native
7477
ifeq ($(OS),Linux)
75-
native: vfdposix vpxdp quic
78+
native: vfdposix vpxdp quic fubuki
7679
else ifeq ($(OS),Darwin)
77-
native: vfdposix-linux vpxdp-linux quic-all vfdposix
80+
native: vfdposix-linux vpxdp-linux quic-all fubuki-linux fubuki vfdposix
7881
else
7982
native: vfdwindows
8083
endif
@@ -88,10 +91,12 @@ jar-with-lib: clean jar native _add_linux_so_to_zip
8891
cp ./base/src/main/c/libvfdposix.dylib ./io/vproxy/libvfdposix-$(ARCH).dylib
8992
cp ./libmsquic.dylib ./io/vproxy/libmsquic-$(ARCH).dylib
9093
cp ./base/src/main/c/libmsquic-java.dylib ./io/vproxy/libmsquic-java-$(ARCH).dylib
94+
cp ./submodules/fubuki/target/release/libfubuki.dylib ./io/vproxy/libfubuki-$(ARCH).dylib
9195
zip build/libs/vproxy.jar \
9296
./io/vproxy/libvfdposix-$(ARCH).dylib \
9397
./io/vproxy/libmsquic-$(ARCH).dylib \
94-
./io/vproxy/libmsquic-java-$(ARCH).dylib
98+
./io/vproxy/libmsquic-java-$(ARCH).dylib \
99+
./io/vproxy/libfubuki-$(ARCH).dylib
95100
rm -r ./io
96101
endif
97102

@@ -141,6 +146,11 @@ msquic-java:
141146
msquic:
142147
cd ./submodules/msquic/ && make
143148

149+
.PHONY: fubuki
150+
fubuki:
151+
cd ./submodules/fubuki/ && cargo update
152+
cd ./submodules/fubuki/ && cargo +nightly build --release
153+
144154
.PHONY: vfdposix-linux
145155
.PHONY: vpxdp-linux
146156
.PHONY: msquic-java-linux
@@ -150,6 +160,7 @@ vfdposix-linux: vfdposix
150160
vpxdp-linux: vpxdp
151161
msquic-java-linux: msquic-java
152162
msquic-linux: msquic
163+
fubuki-linux: fubuki
153164
else
154165
vfdposix-linux:
155166
docker run --rm -v $(shell pwd):/vproxy vproxyio/compile:latest make vfdposix
@@ -159,6 +170,8 @@ msquic-java-linux:
159170
docker run --rm -v $(shell pwd):/vproxy -v "$(shell pwd)/submodules/msquic/src/inc:/msquic/src/inc" -v "$(shell pwd)/submodules/msquic/build/bin/Release:/msquic/build/bin/Release" -e MSQUIC_INC=/msquic/src/inc -e MSQUIC_LD=/msquic/build/bin/Release vproxyio/compile:latest make msquic-java
160171
msquic-linux:
161172
docker run --rm -v $(shell pwd):/vproxy vproxyio/compile:latest /bin/bash -c 'cd submodules/msquic && make'
173+
fubuki-linux:
174+
docker run --rm -v $(shell pwd):/vproxy -v $(shell pwd)/cargo-cache/git:/root/.cargo/git -v $(shell pwd)/cargo-cache/registry:/root/.cargo/registry vproxyio/compile:latest /bin/bash -c 'make fubuki'
162175
endif
163176

164177
.PHONY: quic

cargo-cache/git/.gitkeep

Whitespace-only changes.

cargo-cache/registry/.gitkeep

Whitespace-only changes.

submodules/fubuki

Submodule fubuki added at f6372ac

0 commit comments

Comments
 (0)