Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (28 sloc) 638 Bytes
VPATH=%VPATH%
CC ?= gcc
CXX ?= g++
CXXFLAGS ?=
AR ?= ar
RUSTC ?= rustc
RUSTFLAGS ?=
UNAME=$(shell uname)
RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs')
.PHONY: all
all: extlibs librustcairo.dummy
%.o: %.c
$(CC) $< -o $@ -c $(CFLAGS)
.PHONY: extlibs
extlibs:
@cp ../cairo/src/.libs/libcairo.a .
@cp ../pixman/pixman/.libs/libpixman-1.a .
librustcairo.dummy: cairo.rc $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< -o $@
touch $@
cairo-test: cairo.rc $(RUST_SRC)
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
.PHONY: check
check: extlibs cairo-test
./cairo-test
.PHONY: clean
clean:
rm -f *.o *.a *.so *.dylib *.dll *.dummy *-test