Skip to content

Commit a23abf6

Browse files
committed
- Updated makefile for build, copy clean targets
1 parent dc69630 commit a23abf6

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ Cargo.lock
99
/generated/*
1010
!/generated/minimuxer-Bridging-Header.h
1111
!/generated/minimuxer-helpers.swift
12+
13+
# generated sources
14+
*.a
15+
*.swift
16+
*.h
17+
module.modulemap*

Makefile

+20-8
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,37 @@ add_targets:
66
@echo "add_targets"
77
rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
88

9-
build:
9+
compile:
1010
@echo "build aarch64-apple-ios"
11-
@cargo build --release --target aarch64-apple-ios
12-
@cp target/aarch64-apple-ios/release/lib$(TARGET).a target/lib$(TARGET)-ios.a
11+
@# @cargo build --release --target aarch64-apple-ios
12+
@cargo build --target aarch64-apple-ios
13+
@# @cp target/aarch64-apple-ios/release/lib$(TARGET).a target/lib$(TARGET)-ios.a
14+
@cp target/aarch64-apple-ios/debug/lib$(TARGET).a target/lib$(TARGET)-ios.a
1315

1416
ifeq ($(SKIP_SIM),false)
1517
@echo "build aarch64-apple-ios-sim"
16-
@cargo build --release --target aarch64-apple-ios-sim
18+
@# @cargo build --release --target aarch64-apple-ios-sim
19+
@cargo build --target aarch64-apple-ios-sim
1720

1821
@echo "build x86_64-apple-ios"
19-
@cargo build --release --target x86_64-apple-ios
22+
@# @cargo build --release --target x86_64-apple-ios
23+
@cargo build --target x86_64-apple-ios
2024

2125
@echo "lipo"
26+
@# @lipo -create \
27+
@# -output target/lib$(TARGET)-sim.a \
28+
@# target/aarch64-apple-ios-sim/release/lib$(TARGET).a \
29+
@# target/x86_64-apple-ios/release/lib$(TARGET).a
2230
@lipo -create \
2331
-output target/lib$(TARGET)-sim.a \
24-
target/aarch64-apple-ios-sim/release/lib$(TARGET).a \
25-
target/x86_64-apple-ios/release/lib$(TARGET).a
32+
target/aarch64-apple-ios-sim/debug/lib$(TARGET).a \
33+
target/x86_64-apple-ios/debug/lib$(TARGET).a
2634
else
2735
@echo "skipping sim builds"
2836
endif
2937

3038
# TODO: remove/update once SPM gets merged
31-
copy: build
39+
copy:
3240
@echo "SIDESTORE_REPO: $(SIDESTORE_REPO)"
3341

3442
@echo "copying libraries"
@@ -40,6 +48,8 @@ copy: build
4048

4149
@touch "$(SIDESTORE_REPO)/Dependencies/.skip-prebuilt-fetch-minimuxer"
4250

51+
build: compile copy
52+
4353
clean:
4454
@echo "clean"
4555
@if [ -d "include" ]; then \
@@ -58,6 +68,8 @@ clean:
5868
echo "cleaning $(TARGET).xcframework.zip"; \
5969
rm $(TARGET).xcframework.zip; \
6070
fi
71+
@rm -f *.h *.swift
72+
@rm -f *.a
6173

6274
xcframework: build
6375
@echo "xcframework"

0 commit comments

Comments
 (0)