xref: /btstack/port/daemon/src/Makefile.in (revision 8129e5420f1fc34de588fcac36b111a687b1c9f2)
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*8129e542SMatthias Ringwald    -I ${BTSTACK_ROOT}/chipset/intel \
10fb4ddcf3SMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/daemon/src \
112531c97eSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/daemon/src \
12dd9e275cSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/posix \
131686c0edSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/windows \
143edc84c5SMatthias Ringwald    -I $(BTSTACK_ROOT)/src \
153edc84c5SMatthias Ringwald    -I..
163edc84c5SMatthias RingwaldBTSTACK_LIB_LDFLAGS   = @BTSTACK_LIB_LDFLAGS@
173edc84c5SMatthias RingwaldBTSTACK_LIB_EXTENSION = @BTSTACK_LIB_EXTENSION@
1851102e18SMatthias RingwaldUSB_CFLAGS            = @USB_CFLAGS@
1951102e18SMatthias RingwaldUSB_LDFLAGS           = @USB_LDFLAGS@
203edc84c5SMatthias Ringwald
21fb4ddcf3SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
22*8129e542SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/intel
232531c97eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/daemon/src
24f8d88472SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/corefoundation
25ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb
26ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
271686c0edSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/windows
283edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
293edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
303edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic
313edc84c5SMatthias Ringwald
323edc84c5SMatthias Ringwaldremote_device_db_sources = @REMOTE_DEVICE_DB_SOURCES@
33528a4a3bSMatthias Ringwaldbtstack_run_loop_sources = @btstack_run_loop_SOURCES@
343edc84c5SMatthias Ringwaldusb_sources = @USB_SOURCES@
352ab22389SMatthias Ringwalduart_sources = @UART_SOURCES@
363edc84c5SMatthias Ringwald
373edc84c5SMatthias RingwaldlibBTstack_SOURCES =    \
38de9043e0SMatthias Ringwald    btstack.o           \
39de9043e0SMatthias Ringwald    socket_connection.o \
40de9043e0SMatthias Ringwald    hci_dump.o          \
41de9043e0SMatthias Ringwald    hci_cmd.o          \
42de9043e0SMatthias Ringwald    daemon_cmds.o       \
43de9043e0SMatthias Ringwald    btstack_linked_list.o    \
44de9043e0SMatthias Ringwald    btstack_run_loop.o  \
45de9043e0SMatthias Ringwald    sdp_util.o          \
46de9043e0SMatthias Ringwald    spp_server.o        \
47de9043e0SMatthias Ringwald    btstack_util.o             \
48528a4a3bSMatthias Ringwald    $(btstack_run_loop_sources) \
493edc84c5SMatthias Ringwald
503edc84c5SMatthias RingwaldBTdaemon_SOURCES =      \
513edc84c5SMatthias Ringwald    $(libBTstack_SOURCES)       \
523edc84c5SMatthias Ringwald    $(usb_sources)              \
532ab22389SMatthias Ringwald    $(uart_sources)             \
543edc84c5SMatthias Ringwald    $(remote_device_db_sources) \
55de9043e0SMatthias Ringwald    ad_parser.o                 \
56de9043e0SMatthias Ringwald    att_db.o                    \
57de9043e0SMatthias Ringwald    att_dispatch.o              \
58de9043e0SMatthias Ringwald    att_server.o                \
59de9043e0SMatthias Ringwald    bnep.o                      \
60de9043e0SMatthias Ringwald    btstack_crypto.o            \
61de9043e0SMatthias Ringwald    btstack_memory.o            \
62de9043e0SMatthias Ringwald    btstack_memory_pool.o       \
63de9043e0SMatthias Ringwald    btstack_tlv.o               \
64de9043e0SMatthias Ringwald    btstack_tlv_posix.o         \
65de9043e0SMatthias Ringwald    btstack_link_key_db_tlv.o   \
66de9043e0SMatthias Ringwald    daemon.o                    \
67de9043e0SMatthias Ringwald    gatt_client.o               \
68de9043e0SMatthias Ringwald    hci.o                       \
69de9043e0SMatthias Ringwald    hci_dump.o                  \
70de9043e0SMatthias Ringwald    hci_transport_h4.o          \
71de9043e0SMatthias Ringwald    l2cap.o                     \
72de9043e0SMatthias Ringwald    l2cap_signaling.o           \
73de9043e0SMatthias Ringwald    le_device_db_tlv.o          \
74de9043e0SMatthias Ringwald    rfcomm.o                    \
75de9043e0SMatthias Ringwald    sdp_client.o                \
76de9043e0SMatthias Ringwald    sdp_client_rfcomm.o         \
77de9043e0SMatthias Ringwald    sdp_server.o                \
78de9043e0SMatthias Ringwald    sm.o                        \
79fb4ddcf3SMatthias Ringwald    uECC.o                      \
803edc84c5SMatthias Ringwald
813edc84c5SMatthias Ringwald# use $(CC) for Objective-C files
823edc84c5SMatthias Ringwald.m.o:
833edc84c5SMatthias Ringwald	$(CC) $(CFLAGS) -c -o $@ $<
843edc84c5SMatthias Ringwald
85ad7ef80bSMatthias Ringwaldall: libBTstack.$(BTSTACK_LIB_EXTENSION) BTdaemon libBTstackServer.$(BTSTACK_LIB_EXTENSION)
863edc84c5SMatthias Ringwald
87*8129e542SMatthias Ringwald# Intel Firmware files
88*8129e542SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc
89*8129e542SMatthias Ringwaldall: @FIRMWARE_FILES@
90*8129e542SMatthias Ringwald
913edc84c5SMatthias RingwaldlibBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES)
923edc84c5SMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
9371d91108SMatthias Ringwald		$(CC) $(CFLAGS) $^ $(LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
943edc84c5SMatthias Ringwald
953edc84c5SMatthias Ringwald# libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
963edc84c5SMatthias Ringwald#		ar cru $@ $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
973edc84c5SMatthias Ringwald#		ranlib $@
983edc84c5SMatthias Ringwald
993edc84c5SMatthias RingwaldBTdaemon: $(BTdaemon_SOURCES)
10051102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) -o $@
101ad7ef80bSMatthias Ringwald
102ad7ef80bSMatthias RingwaldlibBTstackServer.$(BTSTACK_LIB_EXTENSION): $(BTdaemon_SOURCES)
103ad7ef80bSMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
10451102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
1053edc84c5SMatthias Ringwald
1063edc84c5SMatthias Ringwaldclean:
1073edc84c5SMatthias Ringwald	rm -rf libBTstack* BTdaemon *.o
1083edc84c5SMatthias Ringwald
1093edc84c5SMatthias Ringwaldinstall:
1103edc84c5SMatthias Ringwald	echo "Installing BTdaemon in $(prefix)..."
1113edc84c5SMatthias Ringwald	mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include
1123edc84c5SMatthias Ringwald	# cp libBTstack.a $(prefix)/lib/
1133edc84c5SMatthias Ringwald	cp libBTstack.dylib $(prefix)/lib/
1143edc84c5SMatthias Ringwald	cp BTdaemon $(prefix)/bin/
1153edc84c5SMatthias Ringwald	cp -r $(BTSTACK_ROOT)/include/btstack $(prefix)/include
116