xref: /btstack/port/windows-winusb/Makefile (revision d78181d6b767325004b088cd675da2dc4ab34323)
1# Makefile for windows WinUSB based examples
2BTSTACK_ROOT ?= ../..
3
4CORE += main.c btstack_stdin_windows.c
5
6COMMON  += hci_transport_h2_winusb.c btstack_run_loop_windows.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c
7COMMON  += btstack_chipset_intel_firmware.c rijndael.c
8
9include ${BTSTACK_ROOT}/example/Makefile.inc
10
11# CC = gcc-fsf-4.9
12CFLAGS  += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpedantic
13# CFLAGS += -Werror
14
15CFLAGS += -I${BTSTACK_ROOT}/platform/windows \
16		  -I${BTSTACK_ROOT}/platform/posix \
17		  -I${BTSTACK_ROOT}/chipset/intel \
18		  -I${BTSTACK_ROOT}/platform/embedded \
19          -I${BTSTACK_ROOT}/3rd-party/rijndael \
20          -I${BTSTACK_ROOT}/3rd-party/tinydir
21
22VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
23
24VPATH += ${BTSTACK_ROOT}/platform/embedded
25VPATH += ${BTSTACK_ROOT}/platform/posix
26VPATH += ${BTSTACK_ROOT}/platform/windows
27VPATH += ${BTSTACK_ROOT}/chipset/csr
28VPATH += ${BTSTACK_ROOT}/chipset/intel
29
30# use pkg-config for portaudio
31# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
32# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
33# hard coded flags for portaudio in /usr/local/lib
34# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
35# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
36
37LDFLAGS += -lsetupapi -lwinusb
38
39EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
40EXAMPLES += csr_set_bd_addr
41EXAMPLES += pan_lwip_http_server
42
43csr_set_bd_addr: ${CORE_OBJ} ${COMMON_OBJ} btstack_chipset_csr.o csr_set_bd_addr.o
44	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
45
46all: ${EXAMPLES}
47