btstack/test/embedded/Makefile

76 lines
1.6 KiB
Makefile
Raw Normal View History

2019-09-23 11:12:35 +00:00
CC = g++
# Requirements: cpputest.github.io
BTSTACK_ROOT = ../..
CFLAGS = -g -Wall \
-I. \
2019-09-23 11:12:35 +00:00
-I${BTSTACK_ROOT}/src \
-I${BTSTACK_ROOT}/platform/embedded
CFLAGS += -fprofile-arcs -ftest-coverage
2019-09-23 11:12:35 +00:00
CFLAGS += -DHAVE_HAL_AUDIO
2019-09-23 11:12:35 +00:00
LDFLAGS += -lCppUTest -lCppUTestExt
VPATH += ${BTSTACK_ROOT}/src
VPATH += ${BTSTACK_ROOT}/src/ble
VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/platform/freertos
2019-09-23 11:12:35 +00:00
COMMON = \
btstack_em9304_spi_embedded.c \
2020-10-30 13:22:37 +00:00
btstack_memory.c \
btstack_run_loop.c \
2019-09-23 11:12:35 +00:00
btstack_run_loop_embedded.c \
btstack_stdin_embedded.c \
btstack_tlv_flash_bank.c \
btstack_uart_block_embedded.c \
hal_flash_bank_memory.c \
btstack_audio.c \
btstack_audio_embedded.c \
btstack_linked_list.c \
btstack_resample.c \
btstack_ring_buffer.c \
btstack_run_loop_base.c \
btstack_slip.c \
btstack_util.c \
2019-09-23 11:12:35 +00:00
hci_dump.c \
hci_transport_em9304_spi.c \
hci_transport_h4.c \
hci_transport_h5.c \
2019-09-23 11:12:35 +00:00
COMMON_OBJ = $(COMMON:.c=.o)
FREERTOS_OBJS = \
btstack_run_loop_freertos.o \
btstack_uart_block_freertos.o \
all: build-coverage/embedded_test build-coverage/freertos_test
2019-09-23 11:12:35 +00:00
build-coverage:
mkdir -p build-coverage
build-coverage/embedded_test: ${COMMON_OBJ} embedded_test.c | build-coverage
2019-09-23 11:12:35 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
build-coverage/freertos_test: ${COMMON_OBJ} ${FREERTOS_OBJS} freertos_test.c | build-coverage
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2019-09-23 11:12:35 +00:00
test: all
build-coverage/embedded_test
build-coverage/freertos_test
coverage: all
build-coverage/embedded_test
build-coverage/freertos_test
2019-09-23 11:12:35 +00:00
clean:
rm -f embedded_test
rm -f *.o
rm -rf *.dSYM build-coverage
2019-09-23 11:12:35 +00:00
rm -f *.gcno *.gcda