tool: sort files alphabetically, replace dash with undescore in defines

This commit is contained in:
Milanka Ringwald 2018-11-13 11:40:52 +01:00
parent ed83c15790
commit a442c325e9
4 changed files with 64 additions and 62 deletions

View File

@ -1,24 +1,25 @@
# Makefile to collect all C source files of src
SRC_FILES = \
btstack_ring_buffer.c \
btstack_hid_parser.c \
ad_parser.c \
hci_transport_h4.c \
l2cap.c \
btstack_memory.c \
btstack_util.c \
hci_dump.c \
btstack_memory_pool.c \
btstack_run_loop.c \
hci_cmd.c \
btstack_linked_list.c \
l2cap_signaling.c \
hci_transport_em9304_spi.c \
hci.c \
btstack_slip.c \
btstack_audio.c \
hci_transport_h5.c \
btstack_tlv.c \
btstack_base64_decoder.c \
btstack_crypto.c \
btstack_hid_parser.c \
btstack_linked_list.c \
btstack_memory.c \
btstack_memory_pool.c \
btstack_ring_buffer.c \
btstack_run_loop.c \
btstack_slip.c \
btstack_tlv.c \
btstack_util.c \
hci.c \
hci_cmd.c \
hci_dump.c \
hci_transport_em9304_spi.c \
hci_transport_h4.c \
hci_transport_h5.c \
l2cap.c \
l2cap_signaling.c \

View File

@ -1,13 +1,13 @@
# Makefile to collect all C source files of src/ble
SRC_BLE_FILES = \
att_server.c \
ancs_client.c \
att_dispatch.c \
sm.c \
att_db.c \
att_db_util.c \
att_dispatch.c \
att_server.c \
gatt_client.c \
le_device_db_memory.c \
le_device_db_tlv.c \
att_db.c \
gatt_client.c \
sm.c \

View File

@ -1,44 +1,45 @@
# Makefile to collect all C source files of src/classic
SRC_CLASSIC_FILES = \
sdp_util.c \
hfp_msbc.c \
avrcp.c \
btstack_sbc_plc.c \
avrcp_target.c \
rfcomm.c \
sdp_client_rfcomm.c \
pbap_client.c \
avrcp_media_item_iterator.c \
hsp_ag.c \
avrcp_controller.c \
hsp_hs.c \
avdtp_acceptor.c \
avdtp.c \
sdp_client.c \
avdtp_sink.c \
btstack_sbc_decoder_bluedroid.c \
goep_client.c \
btstack_cvsd_plc.c \
avrcp_browsing_controller.c \
btstack_sbc_encoder_bluedroid.c \
hid_device.c \
avdtp_source.c \
hfp.c \
avdtp_util.c \
btstack_link_key_db_static.c \
hfp_gsm_model.c \
obex_iterator.c \
avdtp_initiator.c \
bnep.c \
btstack_link_key_db_memory.c \
sdp_server.c \
hfp_ag.c \
btstack_link_key_db_tlv.c \
pan.c \
hfp_hf.c \
spp_server.c \
device_id_server.c \
a2dp_sink.c \
a2dp_source.c \
avdtp.c \
avdtp_acceptor.c \
avdtp_initiator.c \
avdtp_sink.c \
avdtp_source.c \
avdtp_util.c \
avrcp.c \
avrcp_browsing_controller.c \
avrcp_browsing_target.c \
avrcp_controller.c \
avrcp_media_item_iterator.c \
avrcp_target.c \
bnep.c \
btstack_cvsd_plc.c \
btstack_link_key_db_memory.c \
btstack_link_key_db_static.c \
btstack_link_key_db_tlv.c \
btstack_sbc_decoder_bluedroid.c \
btstack_sbc_encoder_bluedroid.c \
btstack_sbc_plc.c \
device_id_server.c \
goep_client.c \
hfp.c \
hfp_ag.c \
hfp_gsm_model.c \
hfp_hf.c \
hfp_msbc.c \
hid_device.c \
hsp_ag.c \
hsp_hs.c \
obex_iterator.c \
pan.c \
pbap_client.c \
rfcomm.c \
sdp_client.c \
sdp_client_rfcomm.c \
sdp_server.c \
sdp_util.c \
spp_server.c \

View File

@ -28,11 +28,11 @@ def create_makefile_inc(path):
# write makefile based on header and list
with open(folder_path + "Makefile.inc", "wt") as fout:
var_name = path.upper().replace('/','_')+'_FILES'
var_name = path.upper().replace('/','_').replace('-','_')+'_FILES'
fout.write(makefile_inc_header.format(var_name=var_name,folder=path))
# get all .c files in folder
for file in os.listdir(folder_path):
for file in sorted(os.listdir(folder_path)):
if not file.endswith(".c"):
continue
fout.write(' %s \\\n' % file)