MODULE=Sample
BRIDGE=Sample-Bridging-Header.h
MINVERSION=10.10
CC=clang -arch x86_64 -mmacosx-version-min=$(MINVERSION)
SWIFTC=swiftc -target x86_64-apple-macosx$(MINVERSION)

ARect: MyRect.o main.o ARect.o
	$(SWIFTC) -o $@ main.o MyRect.o ARect.o
main.o ARect.o: main.swift ARect.swift $(BRIDGE)
	$(SWIFTC) -c main.swift ARect.swift \
		-module-name $(MODULE) -import-objc-header $(BRIDGE)
MyRect.o: MyRect.m
	$(CC) -c MyRect.m
clean:
	/bin/rm -f *.o ARect *.swiftdoc *.swiftmodule
