mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 08:37:22 +00:00
first try at theos Makefile for iOS
This commit is contained in:
parent
212073d4ed
commit
b4b58cb764
3
Makefile.iphone
Normal file
3
Makefile.iphone
Normal file
@ -0,0 +1,3 @@
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
SUBPROJECTS = src example PatchBlueTool PrefsBundle
|
||||
include $(FW_MAKEDIR)/aggregate.mk
|
@ -1,17 +0,0 @@
|
||||
CC = @CC@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
prefix = @prefix@
|
||||
|
||||
all: PatchBlueTool
|
||||
|
||||
PatchBlueTool: PatchBlueTool.c
|
||||
$(CC) $(CPPFLAGS) -o $@ $< $(LDFLAGS)
|
||||
@USE_LDID@ export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $@
|
||||
|
||||
clean:
|
||||
rm -f PatchBlueTool
|
||||
|
||||
install:
|
||||
echo "nothing to be done"
|
||||
|
@ -1,32 +0,0 @@
|
||||
NAME = SpringBoardAccess
|
||||
|
||||
CC = @CC@
|
||||
OBJC = @OBJC@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
prefix = @prefix@
|
||||
|
||||
LIB_LDFLAGS = -lobjc \
|
||||
-multiply_defined suppress \
|
||||
-framework CoreFoundation \
|
||||
-framework Foundation \
|
||||
-framework UIKit \
|
||||
-L../3rdparty -lsubstrate
|
||||
|
||||
APP_LDFLAGS = -framework CoreFoundation
|
||||
|
||||
all: $(NAME).dylib $(NAME)-test
|
||||
|
||||
clean:
|
||||
rm -f $(NAME).dylib $(NAME)-test
|
||||
|
||||
$(NAME).dylib: $(NAME)Extension.mm
|
||||
$(OBJC) $(CPPFLAGS) -dynamiclib -o $@ $(NAME)Extension.mm -init _$(NAME)Initialize $(LDFLAGS) $(LIB_LDFLAGS)
|
||||
@USE_LDID@ export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $@
|
||||
|
||||
$(NAME)-test: $(NAME)-test.c $(NAME).c
|
||||
$(OBJC) $(CPPFLAGS) -o $@ $(NAME).c $(NAME)-test.c $(LDFLAGS) $(APP_LDFLAGS)
|
||||
@USE_LDID@ export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $@
|
||||
|
||||
install:
|
||||
echo "SpringBoardAccess is not installed. Use .deb package"
|
13
config-iphone.sh
Executable file
13
config-iphone.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
echo "Configure BTstack for use with iOS using the theos build system"
|
||||
|
||||
# check if $THEOS is set
|
||||
|
||||
# remove autoconf created files
|
||||
rm -f config.h Makefile src/Makefile example/Makefile
|
||||
|
||||
# use theos Makefiles
|
||||
ln -s config-iphone.h config.h
|
||||
ln -s Makefile.iphone Makefile
|
||||
ln -s Makefile.iphone src/Makefile
|
||||
ln -s Makefile.iphone example/Makefile
|
29
example/Makefile.iphone
Normal file
29
example/Makefile.iphone
Normal file
@ -0,0 +1,29 @@
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
|
||||
ADDITIONAL_CFLAGS = -I.. -I../include
|
||||
ADDITIONAL_LDFLAGS = -L../src/obj -lBTstack
|
||||
|
||||
TOOL_NAME = inquiry
|
||||
inquiry_FILES = inquiry.c
|
||||
|
||||
# Note: don't know how to build all the tools from a single Makefile
|
||||
|
||||
# TOOL_NAME = test
|
||||
# test_FILES = test.c
|
||||
|
||||
# TOOL_NAME = rfcomm_echo
|
||||
# rfcomm_echo_FILES = rfcomm_echo.c
|
||||
|
||||
# TOOL_NAME = rfcomm-cat
|
||||
# rfcomm-cat_FILES = rfcomm-cat.c
|
||||
|
||||
# TOOL_NAME = rfcomm-test
|
||||
# rfcomm-test_FILES = rfcomm-test.c
|
||||
|
||||
# TOOL_NAME = l2cap-server
|
||||
# l2cap-server_FILES = l2cap-server.c
|
||||
|
||||
# TOOL_NAME = l2cap-throughput
|
||||
# l2cap-throughput_FILES = l2cap-throughput.c
|
||||
|
||||
include $(THEOS_MAKE_PATH)/tool.mk
|
30
src/Makefile.iphone
Normal file
30
src/Makefile.iphone
Normal file
@ -0,0 +1,30 @@
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
|
||||
LIBRARY_NAME = libBTstack
|
||||
libBTstack_FILES = btstack.c hci_cmds.c linked_list.c
|
||||
libBTstack_FILES += run_loop.c run_loop_cocoa.m run_loop_posix.c sdp_util.c socket_connection.c utils.c
|
||||
libBTstack_CFLAGS = -I../include -I..
|
||||
|
||||
TOOL_NAME = BTdaemon
|
||||
BTdaemon_FILES = $(libBTstack_FILES) \
|
||||
bt_control_iphone.m \
|
||||
platform_iphone.m \
|
||||
hci_transport_h4_iphone.c \
|
||||
btstack_memory.c \
|
||||
daemon.c \
|
||||
hci.c \
|
||||
hci_dump.c \
|
||||
hci_transport_h4.c \
|
||||
$(usb_sources) \
|
||||
l2cap.c \
|
||||
l2cap_signaling.c \
|
||||
memory_pool.c \
|
||||
remote_device_db_iphone.m \
|
||||
rfcomm.c \
|
||||
sdp.c \
|
||||
../SpringBoardAccess/SpringBoardAccess.c
|
||||
BTdaemon_CFLAGS = -I../include -I..
|
||||
BTdaemon_FRAMEWORKS = IOKit
|
||||
|
||||
include $(THEOS_MAKE_PATH)/library.mk
|
||||
include $(THEOS_MAKE_PATH)/tool.mk
|
Loading…
x
Reference in New Issue
Block a user