NAME = BTdaemon SRCDIR = src VPATH = src # These paths must be changed to match the compilation environment SDK_PATH = /Developer/Platforms/iPhoneOS.platform/Developer SDK_VERSION = 2.0 GCC_VERSION = 4.0.1 # CXX = $(SDK_PATH)/usr/bin/arm-apple-darwin9-gcc-$(GCC_VERSION) CXXFLAGS = -g0 -O2 -Wall -Werror -I. -Iinclude LDFLAGS = \ -multiply_defined suppress \ -I$(SDK_PATH)/SDKs/iPhoneOS$(SDK_VERSION).sdk/usr/include \ -I$(SDK_PATH)/SDKs/iPhoneOS$(SDK_VERSION).sdk/usr/lib/gcc/arm-apple-darwin9/4.0.1/include \ -L$(SDK_PATH)/SDKs/iPhoneOS$(SDK_VERSION).sdk/usr/lib \ SRCS = \ bt_control_iphone.c \ hci.c \ hci_transport_h4.c \ l2cap.c \ main.c \ HEADERS = \ bt_control.h \ bt_control_iphone.h \ hci.h \ hci_transport.h \ hci_transport_h4.h \ l2cap.h \ all: $(NAME) clean: rm -fr $(NAME) *.o $(SRCS): $(HEADERS) $(NAME): $(SRCS) $(CXX) $(CXXFLAGS) -o $(NAME) $(filter %.mm,$^) $(filter %.m,$^) $(filter %.c,$^) $(LDFLAGS) export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $(NAME) ssh root@192.168.3.102 rm BTdaemon scp $(NAME) root@192.168.3.102:. .PHONY: all clean