Files
core-foundation-rs/Makefile.in
T
Jack Moffitt 55a92e9985 Cargoify rust-cocoa
This must build on non-mac platform too, since Cargo doesn't have
support for conditional dependencies yet.
2014-08-25 18:26:08 -06:00

33 lines
596 B
Makefile

VPATH=%VPATH%
CC ?= gcc
RUSTC ?= rustc
AR ?= ar
RUSTFLAGS ?=
CFLAGS += -Wall
RUST_SRC = $(shell find $(VPATH)/src -type f -name '*.rs')
.PHONY: all
all: libcocoa.dummy
libcocoa.dummy: src/lib.rs $(RUST_SRC) libmsgsend.a
$(RUSTC) $(RUSTFLAGS) $< --out-dir .
touch $@
cocoa-test: src/lib.rs $(RUST_SRC) libmsgsend.a
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
libmsgsend.a: msgsend.o
$(AR) rcs libmsgsend.a msgsend.o
msgsend.o: msgsend.m
$(CC) $(CFLAGS) $< -o $@ -c
check: cocoa-test
./cocoa-test
.PHONY: clean
clean:
rm -f cocoa-test *.a *.o *.so *.dylib *.rlib *.dll *.dummy cocoa-test