This repository was archived by the owner on Aug 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (72 loc) · 2.35 KB
/
Makefile
File metadata and controls
88 lines (72 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Makefile for building Transport Services library for multiple platforms
.PHONY: all clean test build-all ios android linux windows macos
# Default target
all: build-all
# Build for all platforms
build-all: macos ios android linux windows
# macOS (both Intel and Apple Silicon)
macos:
@echo "Building for macOS (Apple Silicon)..."
cargo build --release --target aarch64-apple-darwin
@echo "Building for macOS (Intel)..."
cargo build --release --target x86_64-apple-darwin
@echo "Creating universal macOS library..."
@mkdir -p target/universal-macos/release
lipo -create \
target/aarch64-apple-darwin/release/libtransport_services.a \
target/x86_64-apple-darwin/release/libtransport_services.a \
-output target/universal-macos/release/libtransport_services.a
# iOS
ios:
@echo "Building for iOS..."
cargo build --release --target aarch64-apple-ios
# Android (multiple architectures)
android:
@echo "Building for Android (ARM64)..."
cargo build --release --target aarch64-linux-android
# Linux (multiple architectures)
linux:
@echo "Building for Linux (x86_64)..."
cargo build --release --target x86_64-unknown-linux-gnu
@echo "Building for Linux (ARM64)..."
cargo build --release --target aarch64-unknown-linux-gnu
# Windows (multiple architectures)
windows:
@echo "Building for Windows (x86_64)..."
cargo build --release --target x86_64-pc-windows-msvc
@echo "Building for Windows (ARM64)..."
cargo build --release --target aarch64-pc-windows-msvc
# Build with FFI support
ffi:
@echo "Building with FFI support..."
cargo build --release --features ffi
# Generate C headers
headers:
@echo "Generating C headers..."
cargo build --features ffi
cbindgen --config cbindgen.toml --crate transport_services --output transport_services.h
# Run tests
test:
cargo test --all-features
# Run clippy
clippy:
cargo clippy --all-features -- -D warnings
# Format code
fmt:
cargo fmt
# Clean build artifacts
clean:
cargo clean
rm -f transport_services.h
# Build documentation
doc:
cargo doc --all-features --no-deps --open
# Check all targets compile
check-all:
cargo check --target aarch64-apple-ios
cargo check --target aarch64-apple-darwin
cargo check --target x86_64-unknown-linux-gnu
cargo check --target aarch64-unknown-linux-gnu
cargo check --target aarch64-linux-android
cargo check --target x86_64-pc-windows-msvc
cargo check --target aarch64-pc-windows-msvc