xref: /btstack/port/daemon/src/Makefile.in (revision 7435ec7b56401eb7078a7eabd3a5f90c8697dd4f)
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 \
98129e542SMatthias 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
228129e542SMatthias 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                  \
70*7435ec7bSMatthias Ringwald    hci_dump_posix_fs.o         \
71*7435ec7bSMatthias Ringwald    hci_dump_posix_stdout.o     \
72de9043e0SMatthias Ringwald    hci_transport_h4.o          \
73de9043e0SMatthias Ringwald    l2cap.o                     \
74de9043e0SMatthias Ringwald    l2cap_signaling.o           \
75de9043e0SMatthias Ringwald    le_device_db_tlv.o          \
76de9043e0SMatthias Ringwald    rfcomm.o                    \
77de9043e0SMatthias Ringwald    sdp_client.o                \
78de9043e0SMatthias Ringwald    sdp_client_rfcomm.o         \
79de9043e0SMatthias Ringwald    sdp_server.o                \
80de9043e0SMatthias Ringwald    sm.o                        \
81fb4ddcf3SMatthias Ringwald    uECC.o                      \
823edc84c5SMatthias Ringwald
833edc84c5SMatthias Ringwald# use $(CC) for Objective-C files
843edc84c5SMatthias Ringwald.m.o:
853edc84c5SMatthias Ringwald	$(CC) $(CFLAGS) -c -o $@ $<
863edc84c5SMatthias Ringwald
87ad7ef80bSMatthias Ringwaldall: libBTstack.$(BTSTACK_LIB_EXTENSION) BTdaemon libBTstackServer.$(BTSTACK_LIB_EXTENSION)
883edc84c5SMatthias Ringwald
898129e542SMatthias Ringwald# Intel Firmware files
908129e542SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc
918129e542SMatthias Ringwaldall: @FIRMWARE_FILES@
928129e542SMatthias Ringwald
933edc84c5SMatthias RingwaldlibBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES)
943edc84c5SMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
9571d91108SMatthias Ringwald		$(CC) $(CFLAGS) $^ $(LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
963edc84c5SMatthias Ringwald
973edc84c5SMatthias Ringwald# libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
983edc84c5SMatthias Ringwald#		ar cru $@ $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
993edc84c5SMatthias Ringwald#		ranlib $@
1003edc84c5SMatthias Ringwald
1013edc84c5SMatthias RingwaldBTdaemon: $(BTdaemon_SOURCES)
10251102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) -o $@
103ad7ef80bSMatthias Ringwald
104ad7ef80bSMatthias RingwaldlibBTstackServer.$(BTSTACK_LIB_EXTENSION): $(BTdaemon_SOURCES)
105ad7ef80bSMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
10651102e18SMatthias Ringwald		$(CC) $(CFLAGS) $(USB_CFLAGS) $^ $(LDFLAGS) $(USB_LDFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@
1073edc84c5SMatthias Ringwald
1083edc84c5SMatthias Ringwaldclean:
1093edc84c5SMatthias Ringwald	rm -rf libBTstack* BTdaemon *.o
1103edc84c5SMatthias Ringwald
1113edc84c5SMatthias Ringwaldinstall:
1123edc84c5SMatthias Ringwald	echo "Installing BTdaemon in $(prefix)..."
1133edc84c5SMatthias Ringwald	mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include
1143edc84c5SMatthias Ringwald	# cp libBTstack.a $(prefix)/lib/
1153edc84c5SMatthias Ringwald	cp libBTstack.dylib $(prefix)/lib/
1163edc84c5SMatthias Ringwald	cp BTdaemon $(prefix)/bin/
1173edc84c5SMatthias Ringwald	cp -r $(BTSTACK_ROOT)/include/btstack $(prefix)/include
118