blob: 6707cdda19d578b6a000f968de60159f6e608e27 [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)/ \
wz.wange5a0b912024-03-22 19:11:59 +080016 -I$(ROOT)$(includedir)/logger \
17 -I$(ROOT)$(includedir)/liblog \
wz.wang73504132024-03-19 16:38:37 +080018
19LOCAL_LIBS := \
20 -L. \
21 -ldl \
22 -lstdc++ \
wz.wange5a0b912024-03-22 19:11:59 +080023 -llynq-log \
wz.wang73504132024-03-19 16:38:37 +080024 -lsctel \
25
26SOURCES = lynq-qser-wifi.cpp
27LIBRARY = liblynq-qser-wifi.so
28
29OBJECTS=$(SOURCES:.cpp=.o)
30
31all: $(LIBRARY)
32
33$(LIBRARY): $(OBJECTS)
34 $(CXX) -shared -o $@ $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES)
35
36%.o : %.cpp
37 $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -fPIC -c $<
38
39install:
40 mkdir -p $(ROOT)$(base_libdir)/
41 install $(LIBRARY) $(ROOT)$(base_libdir)/
42 mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
43
44clean:
45 $(RM) $(OBJECTS) $(LIBRARY)
46
47