blob: 81ced959f3cb82c209e434423cb775907336c92a [file] [log] [blame]
SHELL = /bin/sh
RM = rm -f
CC=aarch64-poky-linux-gcc -g -os
$(warning ################# C2K support: $(RAT_CONFIG_C2K_SUPPORT))
ifeq ($(strip $(RAT_CONFIG_C2K_SUPPORT)), yes)
$(CFLAGS) += -DC2K_SUPPORT
endif
ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsds)
$(CFLAGS) += -DANDROID_SIM_COUNT_2 \
-DANDROID_MULTI_SIM \
-DMODE_DSDS
endif
ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsss)
$(CFLAGS) += -DMODE_DSSS
endif
$(warning ################# TARGET_PLATFORM: $(TARGET_PLATFORM))
ifeq ($(strip $(TARGET_PLATFORM)), mt2731)
#$(warning #################add for debug $(ROOT), $(includedir))
$(warning ################# TARGET_PLATFORM_MT2731)
$(CFLAGS) += -DTARGET_PLATFORM_MT2731 \
-DMD_93_SUPPORT
else ifeq ($(strip $(TARGET_PLATFORM)), mt2635)
$(warning ################# TARGET_PLATFORM_MT2635)
$(CFLAGS) += -DTARGET_PLATFORM_MT2635 \
-DMD_90_SUPPORT
endif
LOCAL_PATH = .
#CFLAGS = $(LOCAL_CFLAGS) -std=c99
#CXXFLAGS = $(LOCAL_CFLAGS) -std=gnu++14
$(warning ################# ZHOUQUNCHAO ROOT: $(ROOT),includedir:$(includedir),LOCAL_PATH:$(LOCAL_PATH))
LOCAL_C_INCLUDES = \
-I. \
-I$(LOCAL_PATH) \
-I$(ROOT)$(includedir)/glib-2.0 \
-I$(ROOT)$(libdir)/glib-2.0/include \
-I$(ROOT)$(includedir)/include/hal/external \
-I$(ROOT)$(includedir)/include/types/ \
-I$(ROOT)$(includedir)/include/ \
-I$(ROOT)$(includedir)/liblog \
-I$(ROOT)$(includedir)/vendor-ril \
LOCAL_C_INCLUDES+=$(DNS_FLAGS)
LOCAL_LIBS := \
-L. \
-ldl \
-lpthread \
-llynq-log \
LOCAL_SRC_FILES_C = $(wildcard *.c )
EXECUTABLE = lynq-conti-plugin-test
OBJECTS=$(LOCAL_SRC_FILES_C:.c=.o)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(OBJECTS) $(CFLAGS) $(LOCAL_LIBS) $(LOCAL_C_INCLUDES) -o $@
%.o: %.c
$(warning ----->build $<)
echo $(CC)
echo $(CFLAGS)
$(CC) $(CFLAGS) $(LOCAL_C_INCLUDES) $(LOCAL_LIBS) -o $@ -c $<
%.o : %.cpp
echo $(CXX)
echo $(CFLAGS)
$(CXX) $(CFLAGS) $(LOCAL_C_INCLUDES) $(LOCAL_LIBS) -o $@ -c $<
.PHONY: clean
clean:
$(RM) $(OBJECTS) $(EXECUTABLE)