2023-03-30 08:46:31 -05:00
|
|
|
# ignore-cross-compile
|
2016-05-10 16:17:57 -05:00
|
|
|
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)
|
2017-03-02 18:09:35 -06:00
|
|
|
$(CC) $(CFLAGS) foo.c $(TMPDIR)/foo.dll.lib $(call OUT_EXE,foo)
|
2016-05-10 16:17:57 -05:00
|
|
|
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
|