1
2cur_dir := $(dir $(lastword $(MAKEFILE_LIST)))
3
4obj_c := $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)*.c))
5obj_cpp := $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)intersyshci.cpp))
6
7ifeq ($(ENHANCED_STACK),1)
8obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)trans_adapt_v2.cpp))
9else
10obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)trans_adapt_v1.cpp))
11endif
12
13src_obj := $(obj_c:.c=.o) $(obj_s:.S=.o) $(obj_cpp:.cpp=.o)
14
15INTERSYSHCI_LIB_NAME := libintersyshci
16
17ifeq ($(INTERSYS_NO_THREAD),1)
18INTERSYSHCI_LIB_NAME := $(INTERSYSHCI_LIB_NAME)_nothread
19endif
20
21ifeq ($(BYPASS_STACK_AUDIO_STREAM),1)
22INTERSYSHCI_LIB_NAME := $(INTERSYSHCI_LIB_NAME)_bypasssas
23endif
24
25ifeq ($(ENHANCED_STACK),1)
26INTERSYSHCI_LIB_NAME := $(INTERSYSHCI_LIB_NAME)_enhanced_stack
27endif
28
29$(INTERSYSHCI_LIB_NAME)-y := $(src_obj)
30obj-y += $(INTERSYSHCI_LIB_NAME).a
31ccflags-y := \
32    $(BT_IF_INCLUDES) \
33	$(BT_PROFILES_INCLUDES) \
34	-Iservices/bt_app/ \
35	-Iapps/common/ \
36	-Iutils/cqueue \
37	-Iplatform/drivers/bt
38
39ifeq ($(INTERSYS_NO_THREAD),1)
40CFLAGS_intersyshci.o += -D_INTERSYS_NO_THREAD_
41endif
42
43