diff options
Diffstat (limited to 'tests/run-make/cdylib/Makefile')
-rw-r--r-- | tests/run-make/cdylib/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/run-make/cdylib/Makefile b/tests/run-make/cdylib/Makefile new file mode 100644 index 000000000..3c8b52695 --- /dev/null +++ b/tests/run-make/cdylib/Makefile @@ -0,0 +1,20 @@ +# ignore-cross-compile +include ../tools.mk + +all: $(call RUN_BINFILE,foo) + $(call RUN,foo) + rm $(call DYLIB,foo) + $(RUSTC) foo.rs -C lto + $(call RUN,foo) + +ifdef IS_MSVC +$(call RUN_BINFILE,foo): $(call DYLIB,foo) + $(CC) $(CFLAGS) foo.c $(TMPDIR)/foo.dll.lib $(call OUT_EXE,foo) +else +$(call RUN_BINFILE,foo): $(call DYLIB,foo) + $(CC) $(CFLAGS) foo.c -lfoo -o $(call RUN_BINFILE,foo) -L $(TMPDIR) +endif + +$(call DYLIB,foo): + $(RUSTC) bar.rs + $(RUSTC) foo.rs |