blob: 6073694106e98520caaa81bda72bbd57bd1226ee [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
44SOURCES = $(wildcard *.cpp)
45
46EXECUTABLE = liblynq-call.so
47
48OBJECTS=$(SOURCES:.cpp=.o)
49
50
51.PHONY: build clean install pack_rootfs
52all: build
53$(EXECUTABLE): $(OBJECTS)
54 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
55
56%.o : %.cpp
57 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
58
59build: $(EXECUTABLE)
60 $(warning ########## build $(EXECUTABLE) ##########)
61install:
62 mkdir -p $(ROOT)$(base_libdir)/
63 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
64 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
65pack_rootfs:
66 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
67 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
68 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
69 mkdir -p $(PACK_TO)$(base_libdir)/
70 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
71 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
72.PHONY: clean
73clean:
74 $(RM) $(OBJECTS) $(EXECUTABLE)
75 -find . -name "*.o" -delete