Files
simple-rust-tests/__ffi/c2/Makefile
2020-12-27 15:09:31 +08:00

17 lines
472 B
Makefile

.PHONY: clean
libcfunctions.so: cfunctions.o
${CC} --shared -o $@ $<
cfunctions.o: cfunctions.h cfunctions.c
${CC} -fPIC -o $@ -c cfunctions.c -I.
something: something.rs libcfunctions.so
rustc -L. -lcfunctions something.rs -C link-arg='-Wl,-rpath,${PWD}'
@# The command below can be used if the library to link with is
@# specified in something.rs.
@#rustc -L. something.rs -C link-arg='-Wl,-rpath,${PWD}'
clean:
${RM} libcfunctions.so cfunctions.o something