CFLAGS = -arch x86_64 -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

all: helloworld getaddrinfo bluetooth
.PHONY: all

helloworld: helloworld.c
	clang $(CFLAGS) -o $@ $<

getaddrinfo: getaddrinfo.c
	clang $(CFLAGS) -o $@ $<

bluetooth: bluetooth.m
	clang -x objective-c $(CFLAGS) -o $@ $< -lobjc -framework Foundation -framework IOBluetooth
