SHELL = /bin/sh | |
RM = rm -f | |
LOCAL_CFLAGS := -Wall \ | |
-std=gnu++14 \ | |
-g -Os \ | |
-flto \ | |
-fPIC \ | |
LOCAL_PATH = . | |
LOCAL_C_INCLUDES = \ | |
-I. \ | |
-I$(LOCAL_PATH)/include \ | |
-I$(LOCAL_PATH)/ \ | |
-I$(ROOT)$(includedir)/logger \ | |
-I$(ROOT)$(includedir)/liblog \ | |
LOCAL_LIBS := \ | |
-L. \ | |
-ldl \ | |
-lstdc++ \ | |
-llynq-log \ | |
-lsctel \ | |
SOURCES = lynq-qser-wifi.cpp | |
LIBRARY = liblynq-qser-wifi.so | |
OBJECTS=$(SOURCES:.cpp=.o) | |
all: $(LIBRARY) | |
$(LIBRARY): $(OBJECTS) | |
$(CXX) -shared -o $@ $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) | |
%.o : %.cpp | |
$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -fPIC -c $< | |
install: | |
mkdir -p $(ROOT)$(base_libdir)/ | |
install $(LIBRARY) $(ROOT)$(base_libdir)/ | |
mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk | |
clean: | |
$(RM) $(OBJECTS) $(LIBRARY) | |