xref: /btstack/tool/metrics/Makefile (revision 1b81ae2adc4ae081fa9c6427c173f36f7c908803)
1b59454f6SMatthias RingwaldC_HEADERS    ?= ~/Projects/c_headers/include/
26360ea13SMatthias RingwaldBTSTACK_ROOT ?= ../..
36360ea13SMatthias Ringwald
47846277fSMatthias RingwaldVPATH=${BTSTACK_ROOT}/src
57846277fSMatthias Ringwald
67846277fSMatthias RingwaldINCLUDES= \
77846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/src \
8*1b81ae2aSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/micro-ecc \
9*1b81ae2aSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/rijndael \
10*1b81ae2aSMatthias Ringwald	-I ${BTSTACK_ROOT}/platform/embedded \
11*1b81ae2aSMatthias Ringwald	-I ${BTSTACK_ROOT}/platform/freertos \
127846277fSMatthias Ringwald	-I .
137846277fSMatthias Ringwald
14*1b81ae2aSMatthias RingwaldSRCS = \
15*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/3rd-party/micro-ecc/uECC.c \
16*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/3rd-party/rijndael/rijndael.c \
17*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ad_parser.c \
18*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/att_db.c \
19*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/att_db_util.c \
20*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/att_dispatch.c \
21*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/att_server.c \
22*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt_client.c \
23*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt-service/ancs_client.c \
24*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt-service/battery_service_server.c \
25*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt-service/battery_service_client.c \
26*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt-service/device_information_service_server.c \
27*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/gatt-service/device_information_service_client.c \
28*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/le_device_db_tlv.c \
29*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/ble/sm.c \
30*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_crypto.c \
31*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_linked_list.c \
32*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_memory.c \
33*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_memory_pool.c \
34*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_run_loop.c \
35*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_run_loop_base.c \
36*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_tlv.c \
37*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/btstack_util.c \
38*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/hci.c \
39*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/hci_cmd.c \
40*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/hci_dump.c \
41*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/hci_transport_h4.c \
42*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/l2cap.c \
43*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/src/l2cap_signaling.c \
44*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/platform/embedded/btstack_stdin_embedded.c \
45*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/platform/embedded/btstack_run_loop_embedded.c \
46*1b81ae2aSMatthias Ringwald	${BTSTACK_ROOT}/platform/embedded/btstack_uart_block_embedded.c \
477846277fSMatthias Ringwald
48227c17e4SMatthias Ringwaldall: metrics.md metrics.html
497846277fSMatthias Ringwald
507846277fSMatthias Ringwaldmetrics.tsv: ${SRCS}
51b59454f6SMatthias Ringwald	ccsm --disable-file --disable-global --exclude-std-headers --exclude-file=.h$$ --output-format=tsv --output-metrics=HIS_.* $^ -- -DuECC_NO_DEFAULT_RNG -isystem ${C_HEADERS}/c90 -isystem ${C_HEADERS}/c99 ${INCLUDES} > $@
527846277fSMatthias Ringwald
53227c17e4SMatthias Ringwaldmetrics.md: metrics.tsv metrics-ccsm.py
54227c17e4SMatthias Ringwald	./metrics-ccsm.py > metrics.md
55227c17e4SMatthias Ringwald
56227c17e4SMatthias Ringwaldmetrics.html: metrics.md
57227c17e4SMatthias Ringwald	pandoc --from markdown --to html -o metrics.html metrics.md
587846277fSMatthias Ringwald
597846277fSMatthias Ringwaldclean:
60227c17e4SMatthias Ringwald	rm -f metrics.tsv metrics.md
61