xref: /btstack/tool/metrics/Makefile (revision 7846277fa54fd21da9eb70e4d68bc13c0c7bf2e2)
1*7846277fSMatthias RingwaldC_HEADERS=/Projects/c_headers/include/
2*7846277fSMatthias RingwaldBTSTACK_ROOT=../..
3*7846277fSMatthias RingwaldVPATH=${BTSTACK_ROOT}/src
4*7846277fSMatthias Ringwald
5*7846277fSMatthias RingwaldINCLUDES= \
6*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/src \
7*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/micro-ecc/ \
8*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/md5 \
9*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include/ \
10*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include/ \
11*7846277fSMatthias Ringwald	-I ${BTSTACK_ROOT}/3rd-party/yxml \
12*7846277fSMatthias Ringwald	-I .
13*7846277fSMatthias Ringwald
14*7846277fSMatthias RingwaldSRC_FILES=$(wildcard ${BTSTACK_ROOT}/src/*.c)
15*7846277fSMatthias RingwaldSRC_BLE_FILES=$(wildcard ${BTSTACK_ROOT}/src/ble/*.c)
16*7846277fSMatthias RingwaldSRC_BLE_GATT_FILES_FILES=$(wildcard ${BTSTACK_ROOT}/src/ble/gatt-service/*.c)
17*7846277fSMatthias RingwaldSRC_CLASSIC_FILES=$(wildcard ${BTSTACK_ROOT}/src/classic/*.c)
18*7846277fSMatthias Ringwald
19*7846277fSMatthias RingwaldSRCS = ${SRC_FILES} ${SRC_BLE_FILES} ${SRC_BLE_GATT_SERVICE_FILES} ${SRC_CLASSIC_FILES}
20*7846277fSMatthias Ringwald
21*7846277fSMatthias Ringwaldall: metrics.txt
22*7846277fSMatthias Ringwald
23*7846277fSMatthias Ringwaldmetrics.tsv: ${SRCS}
24*7846277fSMatthias Ringwald	ccsm --disable-file --disable-global --exclude-std-headers --exclude-file=.h$$ --output-format=tsv --output-metrics=HIS_.* $^ -- -isystem ${C_HEADERS}/c90 -isystem ${C_HEADERS}/c99 ${INCLUDES} > $@
25*7846277fSMatthias Ringwald
26*7846277fSMatthias Ringwaldmetrics.txt: metrics.tsv metrics-ccsm.py
27*7846277fSMatthias Ringwald	./metrics-ccsm.py > metrics.txt
28*7846277fSMatthias Ringwald
29*7846277fSMatthias Ringwaldclean:
30*7846277fSMatthias Ringwald	rm -f metrics.tsv metrics.txt
31