blob: cfca727e74cc114efe8b0dfa3101d8ca9cababac [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
16
17$(warning ################# lynq data demo ROOT: $(ROOT),includedir:$(includedir))
18LOCAL_PATH = .
19
20LOCAL_C_INCLUDES = \
21 -I. \
22 -I$(LOCAL_PATH)/include/libcall \
23 -I$(ROOT)$(includedir)/logger \
24 -I$(ROOT)$(includedir)/liblog \
q.huang714145d2022-04-18 00:09:50 -040025 -I$(ROOT)$(includedir)/vendor-ril \
q.huang036b6cf2023-01-10 14:29:20 +080026 -I$(ROOT)$(includedir)/lynq_shm \
lh7b0674a2022-01-10 00:34:35 -080027
28
29LOCAL_LIBS := \
30 -L. \
31 -ldl \
32 -lstdc++ \
33 -llog \
34 -lcutils \
35 -lutils \
36 -lbinder \
37 -lpthread \
38 -llynq-log \
q.huang036b6cf2023-01-10 14:29:20 +080039 -llynq-shm \
lh7b0674a2022-01-10 00:34:35 -080040
l.yangd25d3712024-03-04 17:55:39 -080041ifeq ($(strip $(MOBILETEK_RIL_CFG)), GSW)
42 LOCAL_CFLAGS += -DGSW_RIL_CFG
43endif
44
lh7b0674a2022-01-10 00:34:35 -080045SOURCES = $(wildcard *.cpp)
46
47EXECUTABLE = liblynq-call.so
48
49OBJECTS=$(SOURCES:.cpp=.o)
50
51
52.PHONY: build clean install pack_rootfs
53all: build
54$(EXECUTABLE): $(OBJECTS)
55 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
56
57%.o : %.cpp
58 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
59
60build: $(EXECUTABLE)
61 $(warning ########## build $(EXECUTABLE) ##########)
62install:
63 mkdir -p $(ROOT)$(base_libdir)/
64 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
65 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
66pack_rootfs:
67 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
68 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
69 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
70 mkdir -p $(PACK_TO)$(base_libdir)/
71 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
72 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
73.PHONY: clean
74clean:
75 $(RM) $(OBJECTS) $(EXECUTABLE)
76 -find . -name "*.o" -delete