wz.wang | 7350413 | 2024-03-19 16:38:37 +0800 | [diff] [blame] | 1 | SHELL = /bin/sh
|
| 2 | RM = rm -f
|
| 3 |
|
| 4 | LOCAL_CFLAGS := -Wall \
|
| 5 | -std=gnu++14 \
|
| 6 | -g -Os \
|
| 7 | -flto \
|
| 8 | -fPIC \
|
| 9 |
|
| 10 | LOCAL_PATH = .
|
| 11 |
|
| 12 | LOCAL_C_INCLUDES = \
|
| 13 | -I. \
|
| 14 | -I$(LOCAL_PATH)/include \
|
| 15 | -I$(LOCAL_PATH)/ \
|
wz.wang | e5a0b91 | 2024-03-22 19:11:59 +0800 | [diff] [blame^] | 16 | -I$(ROOT)$(includedir)/logger \
|
| 17 | -I$(ROOT)$(includedir)/liblog \
|
wz.wang | 7350413 | 2024-03-19 16:38:37 +0800 | [diff] [blame] | 18 |
|
| 19 | LOCAL_LIBS := \
|
| 20 | -L. \
|
| 21 | -ldl \
|
| 22 | -lstdc++ \
|
wz.wang | e5a0b91 | 2024-03-22 19:11:59 +0800 | [diff] [blame^] | 23 | -llynq-log \
|
wz.wang | 7350413 | 2024-03-19 16:38:37 +0800 | [diff] [blame] | 24 | -lsctel \
|
| 25 |
|
| 26 | SOURCES = lynq-qser-wifi.cpp
|
| 27 | LIBRARY = liblynq-qser-wifi.so
|
| 28 |
|
| 29 | OBJECTS=$(SOURCES:.cpp=.o)
|
| 30 |
|
| 31 | all: $(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 |
|
| 39 | install:
|
| 40 | mkdir -p $(ROOT)$(base_libdir)/
|
| 41 | install $(LIBRARY) $(ROOT)$(base_libdir)/
|
| 42 | mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
|
| 43 |
|
| 44 | clean:
|
| 45 | $(RM) $(OBJECTS) $(LIBRARY)
|
| 46 |
|
| 47 |
|