blob: 5d2fc235aff8fe39fa642465530d75a9eb6fd03e [file] [log] [blame]
wz.wang73504132024-03-19 16:38:37 +08001SHELL = /bin/sh
2RM = rm -f
3
4LOCAL_CFLAGS := -Wall \
5 -std=gnu++14 \
6 -g -Os \
7 -flto \
8 -fPIC \
9
10LOCAL_PATH = .
11
12LOCAL_C_INCLUDES = \
13 -I. \
14 -I$(LOCAL_PATH)/include \
15 -I$(LOCAL_PATH)/ \
16
17LOCAL_LIBS := \
18 -L. \
19 -ldl \
20 -lstdc++ \
21 -lsctel \
22
23SOURCES = lynq-qser-wifi.cpp
24LIBRARY = liblynq-qser-wifi.so
25
26OBJECTS=$(SOURCES:.cpp=.o)
27
28all: $(LIBRARY)
29
30$(LIBRARY): $(OBJECTS)
31 $(CXX) -shared -o $@ $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES)
32
33%.o : %.cpp
34 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -fPIC -c $<
35
36install:
37 mkdir -p $(ROOT)$(base_libdir)/
38 install $(LIBRARY) $(ROOT)$(base_libdir)/
39 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
40
41clean:
42 $(RM) $(OBJECTS) $(LIBRARY)
43
44