blob: 52064c413e42dd742ff2b6eab3c64a82561057fe [file] [log] [blame]
lh7b0674a2022-01-10 00:34:35 -08001SHELL = /bin/sh
2RM = rm -f
3
4LOCAL_CFLAGS := -Wall \
5 -std=gnu++14 \
6 -g -Os \
7 -flto \
8 -DRIL_SHLIB \
9 -DATCI_PARSE \
10 -fPIC \
11 -DKEEP_ALIVE \
12 -DECALL_SUPPORT \
13 -fpermissive \
14
15
lh2974e4a2024-02-21 00:14:24 -080016ifeq ($(strip $(MOBILETEK_RIL_CFG)), GSW)
17 LOCAL_CFLAGS += -DGSW_RIL_CFG
18endif
lh7b0674a2022-01-10 00:34:35 -080019
20$(warning ################# lynq data demo ROOT: $(ROOT),includedir:$(includedir))
21LOCAL_PATH = .
22
23LOCAL_C_INCLUDES = \
24 -I. \
25 -I$(LOCAL_PATH)/include/libcall \
26 -I$(ROOT)$(includedir)/logger \
27 -I$(ROOT)$(includedir)/liblog \
q.huang714145d2022-04-18 00:09:50 -040028 -I$(ROOT)$(includedir)/vendor-ril \
q.huang036b6cf2023-01-10 14:29:20 +080029 -I$(ROOT)$(includedir)/lynq_shm \
lh7b0674a2022-01-10 00:34:35 -080030
31
32LOCAL_LIBS := \
33 -L. \
34 -ldl \
35 -lstdc++ \
36 -llog \
37 -lcutils \
38 -lutils \
39 -lbinder \
40 -lpthread \
41 -llynq-log \
q.huang036b6cf2023-01-10 14:29:20 +080042 -llynq-shm \
lh7b0674a2022-01-10 00:34:35 -080043
l.yangd25d3712024-03-04 17:55:39 -080044ifeq ($(strip $(MOBILETEK_RIL_CFG)), GSW)
45 LOCAL_CFLAGS += -DGSW_RIL_CFG
46endif
47
l.yang4419f452024-04-24 23:52:25 -070048ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsds)
49 LOCAL_CFLAGS += -DMODE_DSDS
50endif
51
lh7b0674a2022-01-10 00:34:35 -080052SOURCES = $(wildcard *.cpp)
53
54EXECUTABLE = liblynq-call.so
55
56OBJECTS=$(SOURCES:.cpp=.o)
57
58
59.PHONY: build clean install pack_rootfs
60all: build
61$(EXECUTABLE): $(OBJECTS)
62 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
63
64%.o : %.cpp
65 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
66
67build: $(EXECUTABLE)
68 $(warning ########## build $(EXECUTABLE) ##########)
69install:
70 mkdir -p $(ROOT)$(base_libdir)/
71 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
72 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
73pack_rootfs:
74 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
75 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
76 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
77 mkdir -p $(PACK_TO)$(base_libdir)/
78 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
79 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
80.PHONY: clean
81clean:
82 $(RM) $(OBJECTS) $(EXECUTABLE)
83 -find . -name "*.o" -delete