Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (22 sloc) 508 Bytes
VPATH=%VPATH%
CC ?= gcc
RUSTC ?= rustc
AR ?= ar
RUSTFLAGS ?=
RUST_SRC = $(shell find $(VPATH)/. -type f -name '*.rs')
.PHONY: all
all: libjs.dummy
libjs.dummy: js.rc $(RUST_SRC) libjsglue.a
$(RUSTC) $(RUSTFLAGS) $< -o $@
touch $@
js-test: js.rc $(RUST_SRC) libjsglue.a
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
libjsglue.a: jsglue.o
$(AR) rcs libjsglue.a jsglue.o
jsglue.o: jsglue.c
$(CC) $< -o $@ -c
check: js-test
./js-test
.PHONY: clean
clean:
rm -f js-test *.o *.a *.so *.dylib *.dll *.dummy