xref: /btstack/port/daemon/src/Makefile.in (revision f708cc5325d7477e3fb37a33439dbdb8fbbf4cc5)
13edc84c5SMatthias RingwaldBTSTACK_ROOT = ../../..
23edc84c5SMatthias Ringwald
33edc84c5SMatthias Ringwaldprefix = @prefix@
43edc84c5SMatthias Ringwald
53edc84c5SMatthias RingwaldCC = @CC@
63edc84c5SMatthias RingwaldLDFLAGS = @LDFLAGS@
73edc84c5SMatthias RingwaldCFLAGS = @CFLAGS@ \
82531c97eSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/daemon/src \
9dd9e275cSMatthias Ringwald    -I $(BTSTACK_ROOT)/platform/posix \
103edc84c5SMatthias Ringwald    -I $(BTSTACK_ROOT)/src \
113edc84c5SMatthias Ringwald    -I..
123edc84c5SMatthias RingwaldBTSTACK_LIB_LDFLAGS = @BTSTACK_LIB_LDFLAGS@
133edc84c5SMatthias RingwaldBTSTACK_LIB_EXTENSION = @BTSTACK_LIB_EXTENSION@
143edc84c5SMatthias RingwaldLIBUSB_CFLAGS = @LIBUSB_CFLAGS@
153edc84c5SMatthias RingwaldLIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
163edc84c5SMatthias Ringwald
172531c97eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/daemon/src
18dd9e275cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
19f8d88472SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/corefoundation
203edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
213edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
223edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic
233edc84c5SMatthias Ringwald
243edc84c5SMatthias Ringwaldremote_device_db_sources = @REMOTE_DEVICE_DB_SOURCES@
25528a4a3bSMatthias Ringwaldbtstack_run_loop_sources = @btstack_run_loop_SOURCES@
263edc84c5SMatthias Ringwaldusb_sources = @USB_SOURCES@
273edc84c5SMatthias Ringwald
283edc84c5SMatthias RingwaldlibBTstack_SOURCES =    \
293edc84c5SMatthias Ringwald    btstack.c           \
303edc84c5SMatthias Ringwald    socket_connection.c \
3156042629SMatthias Ringwald    hci_cmd.c          \
32a8307d38SMatthias Ringwald    daemon_cmds.c       \
334fd23d47SMatthias Ringwald    btstack_linked_list.c    \
344ab92137SMatthias Ringwald    btstack_run_loop.c  \
353edc84c5SMatthias Ringwald    sdp_util.c          \
36e3f52bebSMatthias Ringwald    spp_server.c        \
37eb886013SMatthias Ringwald    btstack_util.c             \
38528a4a3bSMatthias Ringwald    $(btstack_run_loop_sources) \
393edc84c5SMatthias Ringwald
403edc84c5SMatthias RingwaldBTdaemon_SOURCES =      \
413edc84c5SMatthias Ringwald    daemon.c            \
424e1f7693SMatthias Ringwald    btstack_uart_posix.c \
43*f708cc53SMatthias Ringwald    btstack_uart_block_posix.c \
44ff839116SMatthias Ringwald    hci_transport_h4_posix.c  \
453edc84c5SMatthias Ringwald    $(libBTstack_SOURCES) \
463edc84c5SMatthias Ringwald    btstack_memory.c    \
473edc84c5SMatthias Ringwald    hci.c               \
483edc84c5SMatthias Ringwald    hci_dump.c          \
493edc84c5SMatthias Ringwald    l2cap.c             \
503edc84c5SMatthias Ringwald    l2cap_signaling.c   \
51d2e6c4b7SMatthias Ringwald    btstack_memory_pool.c       \
523edc84c5SMatthias Ringwald    rfcomm.c            \
533edc84c5SMatthias Ringwald    bnep.c              \
54746ccb7eSMatthias Ringwald    sdp_server.c               \
553edc84c5SMatthias Ringwald    sdp_client.c        \
56efda0b48SMatthias Ringwald    sdp_client_rfcomm.c  \
573edc84c5SMatthias Ringwald    att_dispatch.c      \
583edc84c5SMatthias Ringwald    gatt_client.c       \
59591423b2SMatthias Ringwald    att_db.c               \
603edc84c5SMatthias Ringwald    att_server.c        \
613edc84c5SMatthias Ringwald    sm.c                \
623edc84c5SMatthias Ringwald    le_device_db_memory.c \
633edc84c5SMatthias Ringwald    $(usb_sources)                \
643edc84c5SMatthias Ringwald    $(remote_device_db_sources)   \
653edc84c5SMatthias Ringwald
663edc84c5SMatthias Ringwald# use $(CC) for Objective-C files
673edc84c5SMatthias Ringwald.m.o:
683edc84c5SMatthias Ringwald	$(CC) $(CFLAGS) -c -o $@ $<
693edc84c5SMatthias Ringwald
703edc84c5SMatthias Ringwald# libBTstack.a
713edc84c5SMatthias Ringwaldall: libBTstack.$(BTSTACK_LIB_EXTENSION) BTdaemon
723edc84c5SMatthias Ringwald
733edc84c5SMatthias RingwaldlibBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES)
743edc84c5SMatthias Ringwald		$(BTSTACK_ROOT)/tool/get_version.sh
753edc84c5SMatthias Ringwald		$(CC) $(CFLAGS) $(BTSTACK_LIB_LDFLAGS) -o $@ $^ $(LDFLAGS)
763edc84c5SMatthias Ringwald
773edc84c5SMatthias Ringwald# libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
783edc84c5SMatthias Ringwald#		ar cru $@ $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
793edc84c5SMatthias Ringwald#		ranlib $@
803edc84c5SMatthias Ringwald
813edc84c5SMatthias RingwaldBTdaemon: $(BTdaemon_SOURCES)
822539bee6SMatthias Ringwald		$(CC) $(CFLAGS) -DENABLE_LOG_INTO_HCI_DUMP -o $@ $^ $(LDFLAGS) $(LIBUSB_CFLAGS) $(LIBUSB_LDFLAGS)
833edc84c5SMatthias Ringwald
843edc84c5SMatthias Ringwaldclean:
853edc84c5SMatthias Ringwald	rm -rf libBTstack* BTdaemon *.o
863edc84c5SMatthias Ringwald
873edc84c5SMatthias Ringwaldinstall:
883edc84c5SMatthias Ringwald	echo "Installing BTdaemon in $(prefix)..."
893edc84c5SMatthias Ringwald	mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include
903edc84c5SMatthias Ringwald	# cp libBTstack.a $(prefix)/lib/
913edc84c5SMatthias Ringwald	cp libBTstack.dylib $(prefix)/lib/
923edc84c5SMatthias Ringwald	cp BTdaemon $(prefix)/bin/
933edc84c5SMatthias Ringwald	cp -r $(BTSTACK_ROOT)/include/btstack $(prefix)/include
94