daemon: speed up compilation by specifying .o files instead of .c files

This commit is contained in:
Matthias Ringwald 2018-08-22 15:22:45 +02:00
parent e9b5398432
commit de9043e06a
2 changed files with 40 additions and 40 deletions

View File

@ -33,7 +33,7 @@ fi
case "$host_os" in
darwin*)
btstack_run_loop_SOURCES="btstack_run_loop_posix.c btstack_run_loop_corefoundation.m"
btstack_run_loop_SOURCES="btstack_run_loop_posix.o btstack_run_loop_corefoundation.m"
LDFLAGS+="-framework CoreFoundation -framework Foundation"
BTSTACK_LIB_LDFLAGS="-dynamiclib -install_name \$(prefix)/lib/libBTstack.dylib"
BTSTACK_LIB_EXTENSION="dylib"
@ -45,21 +45,21 @@ case "$host_os" in
;;
mingw*)
echo "Building on mingw32"
btstack_run_loop_SOURCES="btstack_run_loop_windows.c"
btstack_run_loop_SOURCES="btstack_run_loop_windows.o"
LDFLAGS+="-lws2_32"
BTSTACK_LIB_LDFLAGS="-shared"
BTSTACK_LIB_EXTENSION="dll"
REMOTE_DEVICE_DB_SOURCES="rfcomm_service_db_memory.c"
REMOTE_DEVICE_DB_SOURCES="rfcomm_service_db_memory.o"
# BTSTACK_DEVICE_NAME_DB_INSTANCE="btstack_device_name_db_memory_instance"
UNIX_SOCKETS=no
HCI_USB_LIB=winusb
UART_BLOCK=windows
;;
*)
btstack_run_loop_SOURCES="btstack_run_loop_posix.c"
btstack_run_loop_SOURCES="btstack_run_loop_posix.o"
BTSTACK_LIB_LDFLAGS="-shared -Wl,-rpath,\$(prefix)/lib"
BTSTACK_LIB_EXTENSION="so"
REMOTE_DEVICE_DB_SOURCES="rfcomm_service_db_memory.c"
REMOTE_DEVICE_DB_SOURCES="rfcomm_service_db_memory.o"
# BTSTACK_DEVICE_NAME_DB_INSTANCE="btstack_device_name_db_fs_instance"
UNIX_SOCKETS=yes
HCI_USB_LIB=libusb
@ -175,7 +175,7 @@ if test "x$HCI_TRANSPORT" = xUSB; then
echo "#define USB_PRODUCT_ID $USB_PRODUCT_ID" >> btstack_config.h
echo "#define USB_VENDOR_ID $USB_VENDOR_ID" >> btstack_config.h
else
UART_SOURCES=btstack_uart_block_$UART_BLOCK.c
UART_SOURCES=btstack_uart_block_$UART_BLOCK.o
echo "#define HAVE_TRANSPORT_H4" >> btstack_config.h
echo "#define UART_DEVICE \"$UART_DEVICE\"" >> btstack_config.h
echo "#define UART_SPEED $UART_SPEED" >> btstack_config.h

View File

@ -30,16 +30,16 @@ usb_sources = @USB_SOURCES@
uart_sources = @UART_SOURCES@
libBTstack_SOURCES = \
btstack.c \
socket_connection.c \
hci_dump.c \
hci_cmd.c \
daemon_cmds.c \
btstack_linked_list.c \
btstack_run_loop.c \
sdp_util.c \
spp_server.c \
btstack_util.c \
btstack.o \
socket_connection.o \
hci_dump.o \
hci_cmd.o \
daemon_cmds.o \
btstack_linked_list.o \
btstack_run_loop.o \
sdp_util.o \
spp_server.o \
btstack_util.o \
$(btstack_run_loop_sources) \
BTdaemon_SOURCES = \
@ -47,30 +47,30 @@ BTdaemon_SOURCES = \
$(usb_sources) \
$(uart_sources) \
$(remote_device_db_sources) \
ad_parser.c \
att_db.c \
att_dispatch.c \
att_server.c \
bnep.c \
btstack_crypto.c \
btstack_memory.c \
btstack_memory_pool.c \
btstack_tlv.c \
btstack_tlv_posix.c \
btstack_link_key_db_tlv.c \
daemon.c \
gatt_client.c \
hci.c \
hci_dump.c \
hci_transport_h4.c \
l2cap.c \
l2cap_signaling.c \
le_device_db_tlv.c \
rfcomm.c \
sdp_client.c \
sdp_client_rfcomm.c \
sdp_server.c \
sm.c \
ad_parser.o \
att_db.o \
att_dispatch.o \
att_server.o \
bnep.o \
btstack_crypto.o \
btstack_memory.o \
btstack_memory_pool.o \
btstack_tlv.o \
btstack_tlv_posix.o \
btstack_link_key_db_tlv.o \
daemon.o \
gatt_client.o \
hci.o \
hci_dump.o \
hci_transport_h4.o \
l2cap.o \
l2cap_signaling.o \
le_device_db_tlv.o \
rfcomm.o \
sdp_client.o \
sdp_client_rfcomm.o \
sdp_server.o \
sm.o \
# use $(CC) for Objective-C files
.m.o: