fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1include ../tools.mk 2 3all: $(call RUN_BINFILE,foo) 4 $(call RUN,foo) 5 rm $(call DYLIB,foo) 6 $(RUSTC) foo.rs -C lto 7 $(call RUN,foo) 8 9ifdef IS_MSVC 10$(call RUN_BINFILE,foo): $(call DYLIB,foo) 11 $(CC) $(CFLAGS) foo.c $(TMPDIR)/foo.dll.lib $(call OUT_EXE,foo) 12else 13$(call RUN_BINFILE,foo): $(call DYLIB,foo) 14 $(CC) $(CFLAGS) foo.c -lfoo -o $(call RUN_BINFILE,foo) -L $(TMPDIR) 15endif 16 17$(call DYLIB,foo): 18 $(RUSTC) bar.rs 19 $(RUSTC) foo.rs