blob: 95e588281c7bc8708e0fa9ae03a6fb2b06db373d [file] [log] [blame]
SHELL = /bin/sh
RM = rm -f
LOCAL_CFLAGS := -Wall \
-std=gnu++14 \
-g -Os \
-flto \
-DRIL_SHLIB \
-DATCI_PARSE \
-DKEEP_ALIVE \
-DECALL_SUPPORT \
-fpermissive \
$(warning ################# C2K support: $(RAT_CONFIG_C2K_SUPPORT) $(CXX))
ifeq ($(strip $(RAT_CONFIG_C2K_SUPPORT)), yes)
LOCAL_CFLAGS += -DC2K_SUPPORT
endif
ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsds)
LOCAL_CFLAGS += -DANDROID_SIM_COUNT_2 \
-DANDROID_MULTI_SIM \
-DMODE_DSDS
endif
ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsss)
LOCAL_CFLAGS += -DMODE_DSSS
endif
ifeq ($(strip $(TARGET_PLATFORM)), mt2731)
$(warning ################# TARGET_PLATFORM_MT2731)
LOCAL_CFLAGS += -DTARGET_PLATFORM_MT2731 \
-DMD_93_SUPPORT
else ifeq ($(strip $(TARGET_PLATFORM)), mt2635)
$(warning ################# TARGET_PLATFORM_MT2635)
LOCAL_CFLAGS += -DTARGET_PLATFORM_MT2635 \
-DMD_90_SUPPORT
endif
ifeq ($(strip $(TARGET_PLATFORM)), mt2735)
LOCAL_CFLAGS += -DTARGET_PLATFORM_MT2735
LOCAL_CFLAGS += -DBASELIB_DIR_LIB64
endif
LOCAL_PATH = .
LOCAL_C_INCLUDES = \
-I. \
-I$(LOCAL_PATH)/data \
-I$(LOCAL_PATH)/util \
-I$(LOCAL_PATH)/em/rfdesense \
-I$(LOCAL_PATH)/em \
-I$(LOCAL_PATH)/sms \
-I$(LOCAL_PATH)/sms/cdma \
-I$(LOCAL_PATH)/sms/gsm \
-I$(LOCAL_PATH)/atci \
-I$(LOCAL_PATH)/../include/libtel \
-I$(LOCAL_PATH)/stateManager \
-I$(LOCAL_PATH)/ecall/ \
-I$(LOCAL_PATH)/ecall/gost \
-I$(LOCAL_PATH)/ecall/gost/utils \
-I$(LOCAL_PATH)/ecall/gost/sslp \
-I$(LOCAL_PATH)/ecall/gost/sslp/auth \
-I$(LOCAL_PATH)/ecall/gost/sslp/firmware \
-I$(LOCAL_PATH)/ecall/gost/sslp/commands \
-I$(LOCAL_PATH)/ecall/gost/sslp/ecall \
-I$(LOCAL_PATH)/ecall/gost/sslp/teledata \
-I$(ROOT)$(includedir)/logger \
-I$(ROOT)$(includedir)/liblog \
-I$(ROOT)$(includedir)/vendor-ril \
-I$(ROOT)$(includedir)/gstreamer-1.0 \
-I$(ROOT)$(includedir)/glib-2.0 \
-I$(ROOT)$(libdir)/glib-2.0/include \
-I$(ROOT)$(libdir)/gstreamer-1.0/include\
-I$(ROOT)$(includedir)/dbus-1.0 \
-I$(ROOT)$(libdir)/dbus-1.0/include \
LOCAL_LIBS := \
-L. \
-ldl \
-lrt \
-lstdc++ \
-llog \
-llynq-log \
-lcutils \
-lutils \
-lpower \
-lbinder \
-lpthread \
-lmtk_audio_mixer_ctrl \
-lasound \
-lpal \
-lgstreamer-1.0 \
-lglib-2.0 \
-lgstbase-1.0 \
-lgstreamer-1.0 \
-lgobject-2.0 \
-lgio-2.0 \
-ldtmf \
-lapn \
-ldbus-1 \
ifeq ($(strip $(TARGET_PLATFORM)), mt2735)
LOCAL_LIBS += -luciwrapper
else
LOCAL_LIBS += -lsncfg
endif
SOURCES = $(wildcard util/*.cpp *.cpp ecall/*.cpp ecall/gost/*.cpp ecall/gost/utils/*.cpp ecall/gost/sslp/*.cpp ecall/gost/sslp/auth/*.cpp ecall/gost/sslp/firmware/*.cpp ecall/gost/sslp/commands/*.cpp ecall/gost/sslp/ecall/*.cpp ecall/gost/sslp/teledata/*.cpp data/*.cpp em/rfdesense/*.cpp em/networkinfo/*.cpp em/*.cpp sms/*.cpp sms/gsm/*.cpp sms/cdma/*.cpp atci/*.cpp stateManager/*.cpp)
EXECUTABLE = liblynq-tele-ril.so
OBJECTS=$(SOURCES:.cpp=.o)
.PHONY: build clean install pack_rootfs
all: build
$(EXECUTABLE): $(OBJECTS)
$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
%.o : %.cpp
$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
build: $(EXECUTABLE)
$(warning ########## build $(EXECUTABLE) ##########)
install:
mkdir -p $(ROOT)$(base_libdir)/
install $(EXECUTABLE) $(ROOT)$(base_libdir)/
mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
pack_rootfs:
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)