13edc84c5SMatthias RingwaldBTSTACK_ROOT = ../../.. 23edc84c5SMatthias Ringwald 33edc84c5SMatthias Ringwaldprefix = @prefix@ 43edc84c5SMatthias Ringwald 53edc84c5SMatthias RingwaldCC = @CC@ 63edc84c5SMatthias RingwaldLDFLAGS = @LDFLAGS@ 73edc84c5SMatthias RingwaldCFLAGS = @CFLAGS@ \ 8fb4ddcf3SMatthias Ringwald -I ${BTSTACK_ROOT}/3rd-party/micro-ecc \ 9*43b344c9SMatthias Ringwald -I ${BTSTACK_ROOT}/3rd-party/rijndael \ 108129e542SMatthias Ringwald -I ${BTSTACK_ROOT}/chipset/intel \ 11fb4ddcf3SMatthias Ringwald -I $(BTSTACK_ROOT)/platform/daemon/src \ 122531c97eSMatthias Ringwald -I $(BTSTACK_ROOT)/platform/daemon/src \ 13dd9e275cSMatthias Ringwald -I $(BTSTACK_ROOT)/platform/posix \ 141686c0edSMatthias Ringwald -I $(BTSTACK_ROOT)/platform/windows \ 153edc84c5SMatthias Ringwald -I $(BTSTACK_ROOT)/src \ 163edc84c5SMatthias Ringwald -I.. 173edc84c5SMatthias RingwaldBTSTACK_LIB_LDFLAGS = @BTSTACK_LIB_LDFLAGS@ 183edc84c5SMatthias RingwaldBTSTACK_LIB_EXTENSION = @BTSTACK_LIB_EXTENSION@ 1951102e18SMatthias RingwaldUSB_CFLAGS = @USB_CFLAGS@ 2051102e18SMatthias RingwaldUSB_LDFLAGS = @USB_LDFLAGS@ 213edc84c5SMatthias Ringwald 22fb4ddcf3SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc 23*43b344c9SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael 248129e542SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/intel 252531c97eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/daemon/src 26f8d88472SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/corefoundation 27ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb 28ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 291686c0edSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/windows 303edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 313edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 323edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic 333edc84c5SMatthias Ringwald 343edc84c5SMatthias Ringwaldremote_device_db_sources = @REMOTE_DEVICE_DB_SOURCES@ 35528a4a3bSMatthias Ringwaldbtstack_run_loop_sources = @btstack_run_loop_SOURCES@ 363edc84c5SMatthias Ringwaldusb_sources = @USB_SOURCES@ 372ab22389SMatthias Ringwalduart_sources = @UART_SOURCES@ 383edc84c5SMatthias Ringwald 393edc84c5SMatthias RingwaldlibBTstack_SOURCES = \ 40de9043e0SMatthias Ringwald btstack.o \ 41de9043e0SMatthias Ringwald socket_connection.o \ 42de9043e0SMatthias Ringwald hci_dump.o \ 43de9043e0SMatthias Ringwald hci_cmd.o \ 44de9043e0SMatthias Ringwald daemon_cmds.o \ 45de9043e0SMatthias Ringwald btstack_linked_list.o \ 46de9043e0SMatthias Ringwald btstack_run_loop.o \ 47de9043e0SMatthias Ringwald sdp_util.o \ 48de9043e0SMatthias Ringwald spp_server.o \ 49de9043e0SMatthias Ringwald btstack_util.o \ 50528a4a3bSMatthias Ringwald $(btstack_run_loop_sources) \ 513edc84c5SMatthias Ringwald 523edc84c5SMatthias RingwaldBTdaemon_SOURCES = \ 533edc84c5SMatthias Ringwald $(libBTstack_SOURCES) \ 543edc84c5SMatthias Ringwald $(usb_sources) \ 552ab22389SMatthias Ringwald $(uart_sources) \ 563edc84c5SMatthias Ringwald $(remote_device_db_sources) \ 57de9043e0SMatthias Ringwald ad_parser.o \ 58de9043e0SMatthias Ringwald att_db.o \ 59de9043e0SMatthias Ringwald att_dispatch.o \ 60de9043e0SMatthias Ringwald att_server.o \ 61de9043e0SMatthias Ringwald bnep.o \ 62de9043e0SMatthias Ringwald btstack_crypto.o \ 63de9043e0SMatthias Ringwald btstack_memory.o \ 64de9043e0SMatthias Ringwald btstack_memory_pool.o \ 65de9043e0SMatthias Ringwald btstack_tlv.o \ 66de9043e0SMatthias Ringwald btstack_tlv_posix.o \ 67de9043e0SMatthias Ringwald btstack_link_key_db_tlv.o \ 68de9043e0SMatthias Ringwald daemon.o \ 69de9043e0SMatthias Ringwald gatt_client.o \ 70de9043e0SMatthias Ringwald hci.o \ 71de9043e0SMatthias Ringwald hci_dump.o \ 727435ec7bSMatthias Ringwald hci_dump_posix_fs.o \ 737435ec7bSMatthias Ringwald hci_dump_posix_stdout.o \ 74de9043e0SMatthias Ringwald hci_transport_h4.o \ 75de9043e0SMatthias Ringwald l2cap.o \ 76de9043e0SMatthias Ringwald l2cap_signaling.o \ 77de9043e0SMatthias Ringwald le_device_db_tlv.o \ 78de9043e0SMatthias Ringwald rfcomm.o \ 79*43b344c9SMatthias Ringwald rijndael.o \ 80de9043e0SMatthias Ringwald sdp_client.o \ 81de9043e0SMatthias Ringwald sdp_client_rfcomm.o \ 82de9043e0SMatthias Ringwald sdp_server.o \ 83de9043e0SMatthias Ringwald sm.o \ 84fb4ddcf3SMatthias Ringwald uECC.o \ 853edc84c5SMatthias Ringwald 863edc84c5SMatthias Ringwald# use $(CC) for Objective-C files 873edc84c5SMatthias Ringwald.m.o: 883edc84c5SMatthias Ringwald $(CC) $(CFLAGS) -c -o $@ $< 893edc84c5SMatthias Ringwald 90ad7ef80bSMatthias Ringwaldall: libBTstack.$(BTSTACK_LIB_EXTENSION) BTdaemon libBTstackServer.$(BTSTACK_LIB_EXTENSION) 913edc84c5SMatthias Ringwald 928129e542SMatthias Ringwald# Intel Firmware files 938129e542SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc 948129e542SMatthias Ringwaldall: @FIRMWARE_FILES@ 958129e542SMatthias Ringwald 963edc84c5SMatthias RingwaldlibBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES) 973edc84c5SMatthias Ringwald $(BTSTACK_ROOT)/tool/get_version.sh 9871d91108SMatthias Ringwald $(CC) $(CFLAGS) $^ $(LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@ 993edc84c5SMatthias Ringwald 1003edc84c5SMatthias Ringwald# libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o) 1013edc84c5SMatthias Ringwald# ar cru $@ $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o) 1023edc84c5SMatthias Ringwald# ranlib $@ 1033edc84c5SMatthias Ringwald 1043edc84c5SMatthias RingwaldBTdaemon: $(BTdaemon_SOURCES) 10551102e18SMatthias Ringwald $(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) -o $@ 106ad7ef80bSMatthias Ringwald 107ad7ef80bSMatthias RingwaldlibBTstackServer.$(BTSTACK_LIB_EXTENSION): $(BTdaemon_SOURCES) 108ad7ef80bSMatthias Ringwald $(BTSTACK_ROOT)/tool/get_version.sh 10951102e18SMatthias Ringwald $(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@ 1103edc84c5SMatthias Ringwald 1113edc84c5SMatthias Ringwaldclean: 1123edc84c5SMatthias Ringwald rm -rf libBTstack* BTdaemon *.o 1133edc84c5SMatthias Ringwald 1143edc84c5SMatthias Ringwaldinstall: 1153edc84c5SMatthias Ringwald echo "Installing BTdaemon in $(prefix)..." 1163edc84c5SMatthias Ringwald mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include 1173edc84c5SMatthias Ringwald # cp libBTstack.a $(prefix)/lib/ 1183edc84c5SMatthias Ringwald cp libBTstack.dylib $(prefix)/lib/ 1193edc84c5SMatthias Ringwald cp BTdaemon $(prefix)/bin/ 1203edc84c5SMatthias Ringwald cp -r $(BTSTACK_ROOT)/include/btstack $(prefix)/include 121