Files
rust-ffi-examples/swift-to-rust/Makefile
2019-01-07 09:21:18 +00:00

15 lines
354 B
Makefile

ifeq ($(shell uname),Darwin)
EXT := dylib
else
EXT := so
endif
all: target/debug/libdouble_input.$(EXT)
swiftc src/main.swift -import-objc-header src/double.h -L./target/debug -ldouble_input -o double
LD_LIBRARY_PATH=./target/debug ./double
target/debug/libdouble_input.$(EXT): src/lib.rs Cargo.toml
cargo build
clean:
rm -rf target double