blob: 7174f89e333499cdff8203089601040cbd68643c [file] [log] [blame]
SHELL = /bin/sh
RM = rm -f
LOCAL_CFLAGS := -Wall \
-g -Os \
-flto \
-fPIC \
-DRIL_SHLIB \
-DATCI_PARSE \
-DKEEP_ALIVE \
-DECALL_SUPPORT
$(warning ################# lynq network demo ROOT: $(ROOT),includedir:$(includedir))
LOCAL_PATH = .
LOCAL_C_INCLUDES = \
-I. \
-I$(LOCAL_PATH)/include/lynq_network \
-I$(ROOT)$(includedir)/logger \
-I$(ROOT)$(includedir)/liblog \
-I$(ROOT)$(includedir)/vendor-ril \
-I$(ROOT)$(includedir)/include \
LOCAL_LIBS := \
-L. \
-ldl \
-llog \
-lbinder \
-lpthread \
-llynq-log \
-lutils \
-lcutils \
SOURCES = $(wildcard *.cpp)
EXECUTABLE = liblynq-network.so
OBJECTS=$(SOURCES:.c=.o)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
%.o : %.c
$(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
build: $(EXECUTABLE)
$(warning ########## build $(EXECUTABLE) ##########)
install:
$(warning ################# lynq network demo EXECUTABLE: $(EXECUTABLE),base:$(base_libdir))
mkdir -p $(ROOT)$(base_libdir)/
install $(EXECUTABLE) $(ROOT)$(base_libdir)/
pack_rootfs:
$(warning ################# lynq network demo PACK: $(PACK_INITRAMFS_TO),base:$(base_libdir))
mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
$(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
mkdir -p $(PACK_TO)$(base_libdir)/
cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
$(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
.PHONY: clean
clean:
$(RM) $(OBJECTS) $(EXECUTABLE)