2023-03-30 08:46:31 -05:00
|
|
|
# ignore-cross-compile
|
2022-08-22 19:00:00 -05:00
|
|
|
include ../tools.mk
|
2014-11-03 01:02:53 -06:00
|
|
|
|
2015-08-26 18:57:56 -05:00
|
|
|
TO_LINK := $(call DYLIB,bar)
|
|
|
|
ifdef IS_MSVC
|
2016-01-15 14:12:51 -06:00
|
|
|
LINK_ARG = $(TO_LINK:dll=dll.lib)
|
2015-08-26 18:57:56 -05:00
|
|
|
else
|
|
|
|
LINK_ARG = $(TO_LINK)
|
|
|
|
endif
|
|
|
|
|
2014-11-03 01:02:53 -06:00
|
|
|
all:
|
|
|
|
$(RUSTC) foo.rs
|
|
|
|
$(RUSTC) bar.rs
|
2015-08-26 18:57:56 -05:00
|
|
|
$(CC) main.c $(call OUT_EXE,main) $(LINK_ARG) $(EXTRACFLAGS)
|
2014-11-03 01:02:53 -06:00
|
|
|
rm $(TMPDIR)/*.rlib
|
|
|
|
rm $(call DYLIB,foo)
|
|
|
|
$(call RUN,main)
|