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)/ \
|
| 16 |
|
| 17 | LOCAL_LIBS := \
|
| 18 | -L. \
|
| 19 | -ldl \
|
| 20 | -lstdc++ \
|
| 21 | -lsctel \
|
| 22 |
|
| 23 | SOURCES = lynq-qser-wifi.cpp
|
| 24 | LIBRARY = liblynq-qser-wifi.so
|
| 25 |
|
| 26 | OBJECTS=$(SOURCES:.cpp=.o)
|
| 27 |
|
| 28 | all: $(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 |
|
| 36 | install:
|
| 37 | mkdir -p $(ROOT)$(base_libdir)/
|
| 38 | install $(LIBRARY) $(ROOT)$(base_libdir)/
|
| 39 | mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
|
| 40 |
|
| 41 | clean:
|
| 42 | $(RM) $(OBJECTS) $(LIBRARY)
|
| 43 |
|
| 44 |
|