blob: 0ef16a1ebb673ff29c4ca063c631ac8e31844834 [file] [log] [blame]
you.chen79d8f932023-12-26 17:03:44 +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 \
25 -I$(ROOT)$(includedir)/vendor-ril \
26 -I$(ROOT)$(includedir)/lynq_shm \
27
28
29LOCAL_LIBS := \
30 -L. \
31 -ldl \
32 -lstdc++ \
33 -llog \
34 -lcutils \
35 -lutils \
36 -lbinder \
37 -lpthread \
38 -llynq-log \
39
40SOURCES = $(wildcard *.cpp)
41
42EXECUTABLE = liblynq-qser-adc.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)/
60pack_rootfs:
61 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
62 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
63 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
64 mkdir -p $(PACK_TO)$(base_libdir)/
65 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
66 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
67.PHONY: clean
68clean:
69 $(RM) $(OBJECTS) $(EXECUTABLE)
70 -find . -name "*.o" -delete