xref: /btstack/port/daemon/src/Makefile.in (revision 06816492480ce7ade9146f46190a1bd8fa90f994)
13edc84c5SMatthias RingwaldBTSTACK_ROOT = ../../..
23edc84c5SMatthias Ringwald
33edc84c5SMatthias Ringwaldprefix  = @prefix@
43edc84c5SMatthias Ringwald
53edc84c5SMatthias RingwaldCC      = @CC@
63edc84c5SMatthias RingwaldLDFLAGS = @LDFLAGS@
73edc84c5SMatthias RingwaldCFLAGS  = @CFLAGS@ \
83f1c7c3cSMatthias Ringwald    -I ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include \
93f1c7c3cSMatthias Ringwald    -I ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include \
10fb4ddcf3SMatthias Ringwald    -I ${BTSTACK_ROOT}/3rd-party/micro-ecc \
1143b344c9SMatthias Ringwald    -I ${BTSTACK_ROOT}/3rd-party/rijndael  \
128129e542SMatthias Ringwald    -I ${BTSTACK_ROOT}/chipset/intel \
13fb4ddcf3SMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/daemon/src \
142531c97eSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/daemon/src \
15dd9e275cSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/posix \
161686c0edSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/windows \
173edc84c5SMatthias Ringwald    -I $(BTSTACK_ROOT)/src \
183edc84c5SMatthias Ringwald    -I..
193edc84c5SMatthias RingwaldBTSTACK_LIB_LDFLAGS   = @BTSTACK_LIB_LDFLAGS@
203edc84c5SMatthias RingwaldBTSTACK_LIB_EXTENSION = @BTSTACK_LIB_EXTENSION@
2151102e18SMatthias RingwaldUSB_CFLAGS            = @USB_CFLAGS@
2251102e18SMatthias RingwaldUSB_LDFLAGS           = @USB_LDFLAGS@
233edc84c5SMatthias Ringwald
24fb4ddcf3SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
2543b344c9SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
268129e542SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/intel
272531c97eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/daemon/src
28f8d88472SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/corefoundation
29ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb
30ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
311686c0edSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/windows
323edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
333edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
343edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic
353edc84c5SMatthias Ringwald
363edc84c5SMatthias Ringwaldremote_device_db_sources = @REMOTE_DEVICE_DB_SOURCES@
37528a4a3bSMatthias Ringwaldbtstack_run_loop_sources = @btstack_run_loop_SOURCES@
383edc84c5SMatthias Ringwaldusb_sources = @USB_SOURCES@
392ab22389SMatthias Ringwalduart_sources = @UART_SOURCES@
403edc84c5SMatthias Ringwald
413edc84c5SMatthias RingwaldlibBTstack_SOURCES =    \
42de9043e0SMatthias Ringwald    btstack.o           \
43de9043e0SMatthias Ringwald    socket_connection.o \
44de9043e0SMatthias Ringwald    hci_dump.o          \
45de9043e0SMatthias Ringwald    hci_cmd.o          \
46de9043e0SMatthias Ringwald    daemon_cmds.o       \
47de9043e0SMatthias Ringwald    btstack_linked_list.o    \
48de9043e0SMatthias Ringwald    btstack_run_loop.o  \
49de9043e0SMatthias Ringwald    sdp_util.o          \
50de9043e0SMatthias Ringwald    spp_server.o        \
51de9043e0SMatthias Ringwald    btstack_util.o             \
52528a4a3bSMatthias Ringwald    $(btstack_run_loop_sources) \
533edc84c5SMatthias Ringwald
543edc84c5SMatthias RingwaldBTdaemon_SOURCES =      \
553edc84c5SMatthias Ringwald    $(libBTstack_SOURCES)       \
563edc84c5SMatthias Ringwald    $(usb_sources)              \
572ab22389SMatthias Ringwald    $(uart_sources)             \
583edc84c5SMatthias Ringwald    $(remote_device_db_sources) \
59de9043e0SMatthias Ringwald    ad_parser.o                 \
60de9043e0SMatthias Ringwald    att_db.o                    \
61de9043e0SMatthias Ringwald    att_dispatch.o              \
62de9043e0SMatthias Ringwald    att_server.o                \
63de9043e0SMatthias Ringwald    bnep.o                      \
64de9043e0SMatthias Ringwald    btstack_crypto.o            \
65de9043e0SMatthias Ringwald    btstack_memory.o            \
66de9043e0SMatthias Ringwald    btstack_memory_pool.o       \
67de9043e0SMatthias Ringwald    btstack_tlv.o               \
68de9043e0SMatthias Ringwald    btstack_tlv_posix.o         \
69de9043e0SMatthias Ringwald    btstack_link_key_db_tlv.o   \
70de9043e0SMatthias Ringwald    daemon.o                    \
71de9043e0SMatthias Ringwald    gatt_client.o               \
72de9043e0SMatthias Ringwald    hci.o                       \
73de9043e0SMatthias Ringwald    hci_dump.o                  \
747435ec7bSMatthias Ringwald    hci_dump_posix_fs.o         \
757435ec7bSMatthias Ringwald    hci_dump_posix_stdout.o     \
76*06816492SMatthias Ringwald    hci_event_builder.o         \
77de9043e0SMatthias Ringwald    hci_transport_h4.o          \
78de9043e0SMatthias Ringwald    l2cap.o                     \
79de9043e0SMatthias Ringwald    l2cap_signaling.o           \
80de9043e0SMatthias Ringwald    le_device_db_tlv.o          \
81de9043e0SMatthias Ringwald    rfcomm.o                    \
8243b344c9SMatthias Ringwald    rijndael.o                  \
83de9043e0SMatthias Ringwald    sdp_client.o                \
84de9043e0SMatthias Ringwald    sdp_client_rfcomm.o         \
85de9043e0SMatthias Ringwald    sdp_server.o                \
86de9043e0SMatthias Ringwald    sm.o                        \
87fb4ddcf3SMatthias Ringwald    uECC.o                      \
883edc84c5SMatthias Ringwald
893edc84c5SMatthias Ringwald# use $(CC) for Objective-C files
903edc84c5SMatthias Ringwald.m.o:
913edc84c5SMatthias Ringwald	$(CC) $(CFLAGS) -c -o $@ $<
923edc84c5SMatthias Ringwald
93ad7ef80bSMatthias Ringwaldall: libBTstack.$(BTSTACK_LIB_EXTENSION) BTdaemon libBTstackServer.$(BTSTACK_LIB_EXTENSION)
943edc84c5SMatthias Ringwald
958129e542SMatthias Ringwald# Intel Firmware files
968129e542SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc
978129e542SMatthias Ringwaldall: @FIRMWARE_FILES@
988129e542SMatthias Ringwald
993edc84c5SMatthias RingwaldlibBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES)
1003edc84c5SMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
10171d91108SMatthias Ringwald		$(CC) $(CFLAGS) $^ $(LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
1023edc84c5SMatthias Ringwald
1033edc84c5SMatthias Ringwald# libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
1043edc84c5SMatthias Ringwald#		ar cru $@ $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
1053edc84c5SMatthias Ringwald#		ranlib $@
1063edc84c5SMatthias Ringwald
1073edc84c5SMatthias RingwaldBTdaemon: $(BTdaemon_SOURCES)
10851102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) -o $@
109ad7ef80bSMatthias Ringwald
110ad7ef80bSMatthias RingwaldlibBTstackServer.$(BTSTACK_LIB_EXTENSION): $(BTdaemon_SOURCES)
111ad7ef80bSMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
11251102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
1133edc84c5SMatthias Ringwald
1143edc84c5SMatthias Ringwaldclean:
1153edc84c5SMatthias Ringwald	rm -rf libBTstack* BTdaemon *.o
1163edc84c5SMatthias Ringwald
1173edc84c5SMatthias Ringwaldinstall:
1183edc84c5SMatthias Ringwald	echo "Installing BTdaemon in $(prefix)..."
1193edc84c5SMatthias Ringwald	mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include
1203edc84c5SMatthias Ringwald	# cp libBTstack.a $(prefix)/lib/
1213edc84c5SMatthias Ringwald	cp libBTstack.dylib $(prefix)/lib/
1223edc84c5SMatthias Ringwald	cp BTdaemon $(prefix)/bin/
1233edc84c5SMatthias Ringwald	cp -r $(BTSTACK_ROOT)/include/btstack $(prefix)/include
124