btstack/port/arduino/Makefile

51 lines
1.8 KiB
Makefile
Raw Normal View History

#
# Makefile to setup BTstack library in Arduino folder (OS X/Linux only) and create .zip archive
#
DIR=.
BTSTACK_ROOT=${DIR}/../..
DUMMY=$(shell )
VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' ${BTSTACK_ROOT}/platform/daemon/src/btstack_version.h`
2015-08-12 12:19:11 +00:00
BTSTACK_PACKAGE=/tmp/btstack
ARCHIVE=btstack-arduino-${VERSION}.zip
SRC_FILES = btstack_memory.c btstack_linked_list.c btstack_memory_pool.c btstack_run_loop.c
2017-09-19 13:01:39 +00:00
SRC_FILES += hci_dump.c hci.c hci_cmd.c btstack_util.c l2cap.c ad_parser.c hci_transport_h4.c
2016-09-29 14:08:33 +00:00
BLE_FILES = att_db.c att_server.c att_dispatch.c att_db_util.c le_device_db_memory.c gatt_client.c
BLE_FILES += sm.c ancs_client.h ancs_client.c
2016-01-21 14:41:16 +00:00
PORT_FILES = btstack_config.h bsp_arduino_em9301.cpp BTstack.cpp BTstack.h
2017-09-19 13:01:39 +00:00
EMBEDDED_FILES = btstack_run_loop_embedded.c btstack_uart_block_embedded.c
PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_FILES})
PATHS += $(filter-out ${BTSTACK_ROOT}/src/btstack.h, $(wildcard ${BTSTACK_ROOT}/src/*.h))
2015-11-13 14:04:41 +00:00
PATHS += $(addprefix ${BTSTACK_ROOT}/src/ble/, ${BLE_FILES})
PATHS += $(wildcard ${BTSTACK_ROOT}/src/ble/*.h)
PATHS += $(addprefix ${BTSTACK_ROOT}/platform/embedded/, ${EMBEDDED_FILES})
PATHS += $(wildcard ${BTSTACK_ROOT}/platform/embedded/*.h)
PATHS += $(wildcard ${BTSTACK_ROOT}/chipset/em9301/*)
2015-11-13 14:04:41 +00:00
PATHS += ${BTSTACK_ROOT}/port/arduino/examples
PATHS += $(addprefix ${DIR}/, ${PORT_FILES})
ARDUINO_LIBS=~/Documents/arduino/libraries/BTstack
all: release
2015-08-12 12:17:29 +00:00
clean:
rm -rf ${BTSTACK_PACKAGE}
update_version:
2015-11-13 14:04:41 +00:00
${BTSTACK_ROOT}/tool/get_version.sh
2015-05-18 19:32:55 +00:00
install: update_version
rm -rf ${ARDUINO_LIBS}
mkdir ${ARDUINO_LIBS}
cp -r ${PATHS} ${ARDUINO_LIBS}
release: update_version
rm -rf ${BTSTACK_PACKAGE}
mkdir ${BTSTACK_PACKAGE}
cp -r ${PATHS} ${BTSTACK_PACKAGE}
rm -f ${ARCHIVE}
2015-08-12 12:19:11 +00:00
zip -r ${ARCHIVE} ${BTSTACK_PACKAGE}
cp ${ARCHIVE} btstack-arduino-latest.zip