blob: 0e021c508e215ad7a8ec529bd75b81781c724431 [file] [log] [blame]
lh25827952022-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.huang5a738c02022-04-18 00:09:50 -040025 -I$(ROOT)$(includedir)/vendor-ril \
lh25827952022-01-10 00:34:35 -080026
27
28LOCAL_LIBS := \
29 -L. \
30 -ldl \
31 -lstdc++ \
32 -llog \
33 -lcutils \
34 -lutils \
35 -lbinder \
36 -lpthread \
37 -llynq-log \
38
39
40SOURCES = $(wildcard *.cpp)
41
42EXECUTABLE = liblynq-call.so
43
44OBJECTS=$(SOURCES:.cpp=.o)
45
46
47.PHONY: build clean install pack_rootfs
48all: build
49$(EXECUTABLE): $(OBJECTS)
50 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
51
52%.o : %.cpp
53 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
54
55build: $(EXECUTABLE)
56 $(warning ########## build $(EXECUTABLE) ##########)
57install:
58 mkdir -p $(ROOT)$(base_libdir)/
59 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
60 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
61pack_rootfs:
62 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
63 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
64 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
65 mkdir -p $(PACK_TO)$(base_libdir)/
66 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
67 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
68.PHONY: clean
69clean:
70 $(RM) $(OBJECTS) $(EXECUTABLE)
71 -find . -name "*.o" -delete