AUTOMAKE_OPTIONS =

RUST_SOURCES = \
	examples/font_panel.rs \
	src/headless/mod.rs \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__blank_screen.snap \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__blank_screen.snap.png \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__snowlamp_in_window.snap \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__snowlamp_in_window.snap.png \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__xeyes.snap \
	src/headless/snapshots/wings_rs_tests__headless__xvfb__tests__xeyes.snap.png \
	src/headless/snapshots/wings_rs_tests__headless__xwd__tests__snowlamp_encoded.snap \
	src/headless/snapshots/wings_rs_tests__headless__xwd__tests__snowlamp_encoded.snap.png \
	src/headless/snowlamp.xwd \
	src/headless/xvfb.rs \
	src/headless/xwd.rs \
	src/lib.rs \
	tests/font_panel_tests.rs \
	tests/snapshots/font_panel_tests__font_panel.snap \
	tests/snapshots/font_panel_tests__font_panel.snap.png

RUST_EXTRA = \
	Cargo.lock \
	Cargo.toml

Cargo.lock:
	cargo build

rustlib: $(RUST_SOURCES) $(RUST_EXTRA)
	cargo build

check-local: rustlib

clean-local:
	$(CARGO) clean

all: rustlib

# Tests run with cargo-nextest because it puts each application test in its own
# process, and WINGs currently assumes that it is running in a single-threaded
# environment.
test: rustlib
	LD_LIBRARY_PATH=../.libs:../../wrlib/.libs $(CARGO) nextest run
