blob: faaf70d1b63a1fb3308a51a5b6110da8b65b9df8 [file] [log] [blame]
lhe3922f92024-11-05 02:40:56 -08001SHELL = /bin/sh
2RM = rm -f
3
4LOCAL_CFLAGS := -Wall \
5 -g -Os \
6 -std=gnu++14 \
7 -flto \
8 -fPIC \
9 -D__LINUX_OS__ \
10
11
12
13LOCAL_PATH = .
14$(warning ################# LEI ROOT: $(ROOT),includedir:$(includedir),LOCAL_PATH:$(LOCAL_PATH))
15LOCAL_C_INCLUDES = \
16 -I. \
17 -I./include \
18 -I$(LOCAL_PATH)/include \
19 -I$(LOCAL_PATH) \
20 -I$(ROOT)$(includedir)/ \
21 -I$(ROOT)$(includedir)/include \
22
23
24LOCAL_LIBS := \
25 -L. \
26 -ldl \
27 -lstdc++ \
28 -llog \
29 -lcutils \
30 -lutils \
31 -lbinder \
32 -lpthread \
33 -llynq-uci \
34 -llynq-misc \
35
36SOURCES = ./lynq_sdk_ready.cpp
37
38EXECUTABLE = liblynq-sdk-ready.so
39
40OBJECTS=$(SOURCES:.cpp=.o)
41
42
43.PHONY: build clean
44all: build
45$(EXECUTABLE): $(OBJECTS)
46 $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
47
48%.o : %.cpp
49 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
50
51build: $(EXECUTABLE)
52 $(warning ########## build $(EXECUTABLE) ##########)
53
54.PHONY: clean
55clean:
56 $(RM) $(OBJECTS) $(EXECUTABLE)