blob: b5b7d36d277152f1e54c2f71841dbb1f6c8e7c01 [file] [log] [blame]
l.yang8e8d5282023-06-15 10:48:26 +08001SHELL = /bin/sh
2RM = rm -f
3
4LOCAL_CFLAGS := -Wall \
5 -std=gnu++14 \
6 -g -Os \
7 -flto \
8 -fPIC \
9 -fpermissive \
10
11
12
13$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
14LOCAL_PATH = .
15
16LOCAL_C_INCLUDES = \
17 -I. \
18 -I$(LOCAL_PATH)/include/ \
19 -I$(LOCAL_PATH)/ \
20 -I$(ROOT)$(includedir)/liblog \
21 -I$(ROOT)$(includedir)/libcall \
22
23
24LOCAL_LIBS := \
25 -L. \
26 -lstdc++ \
27 -lcutils \
28 -lutils \
29 -lbinder \
30 -lpthread \
31 -llynq-log \
32 -llynq-call \
33
34
35SOURCES = $(wildcard *.cpp)
36
37EXECUTABLE = liblynq-qser-voice.so
38
39OBJECTS=$(SOURCES:.cpp=.o)
40
41
42.PHONY: build clean install pack_rootfs
43all: build
44$(EXECUTABLE): $(OBJECTS)
45 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
46
47%.o : %.cpp
48 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
49
50build: $(EXECUTABLE)
51 $(warning ########## build $(EXECUTABLE) ##########)
52install:
53 mkdir -p $(ROOT)$(base_libdir)/
54 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
55 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
56pack_rootfs:
57 mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
58 cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
59 $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
60 mkdir -p $(PACK_TO)$(base_libdir)/
61 cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
62 $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
63.PHONY: clean
64clean:
65 $(RM) $(OBJECTS) $(EXECUTABLE)
66 -find . -name "*.o" -delete