Add dart to rust example
This commit is contained in:
18
dart-to-rust/Makefile
Normal file
18
dart-to-rust/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
ifeq ($(shell uname),Darwin)
|
||||
LDFLAGS := -Wl,-dead_strip
|
||||
else
|
||||
LDFLAGS := -Wl,--gc-sections -lpthread -ldl
|
||||
endif
|
||||
|
||||
all: target/debug/librust_add.so
|
||||
dart src/main.dart
|
||||
|
||||
target/debug/librust_add.so: src/lib.rs Cargo.toml
|
||||
cargo build
|
||||
|
||||
target/main.o: src/main.c | target
|
||||
$(CC) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
rm -rf target
|
||||
rm -rf Cargo.lock
|
||||
Reference in New Issue
Block a user