Files
core-foundation-rs/Makefile.in
T
2013-08-16 14:46:53 -07:00

33 lines
577 B
Makefile

VPATH=%VPATH%
CC=gcc
RUSTC ?= rustc
AR ?= ar
RUSTFLAGS ?=
CFLAGS=-Wall
RUST_SRC = $(shell find $(VPATH)/. -type f -name '*.rs')
.PHONY: all
all: libcocoa.dummy
libcocoa.dummy: cocoa.rc $(RUST_SRC) libmsgsend.a
$(RUSTC) $(RUSTFLAGS) $< --out-dir .
touch $@
cocoa-test: cocoa.rc $(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 *.dll *.dummy cocoa-test