-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 796 Bytes
/
Makefile
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
.PHONY: build sim clean open
PRODUCT := CamlLib.xcframework
BUILD_DIR := _build
LIB_DIR := CamlLib
$(PRODUCT): $(BUILD_DIR)/libCamlLib.a
rm -rf $@
xcodebuild -create-xcframework -output $@ \
-library $(BUILD_DIR)/device.ios/$(LIB_DIR)/libCamlLib.a \
-library $^ \
-allow-internal-distribution
$(BUILD_DIR)/libCamlLib.a: build
lipo -create -output $@ \
$(BUILD_DIR)/simulator.ios/$(LIB_DIR)/libCamlLib.a \
$(BUILD_DIR)/simulator-arm.ios/$(LIB_DIR)/libCamlLib.a
build:
dune build @default
sim:
dune build @default --workspace dune-workspace.simulator
rm -rf CamlLib.xcframework
xcodebuild -create-xcframework -output CamlLib.xcframework \
-library _build/simulator.ios/CamlLib/libCamlLib.a \
-allow-internal-distribution
clean:
dune clean
open:
open CamlApp.xcodeproj