Files
2019-06-05 21:23:39 +08:00

19 lines
335 B
Makefile

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