blob: 81ced959f3cb82c209e434423cb775907336c92a [file] [log] [blame]
xjde81d1d2021-11-25 15:01:52 +08001SHELL = /bin/sh
2RM = rm -f
3
4CC=aarch64-poky-linux-gcc -g -os
5
6$(warning ################# C2K support: $(RAT_CONFIG_C2K_SUPPORT))
7ifeq ($(strip $(RAT_CONFIG_C2K_SUPPORT)), yes)
8 $(CFLAGS) += -DC2K_SUPPORT
9
10endif
11
12ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsds)
13 $(CFLAGS) += -DANDROID_SIM_COUNT_2 \
14 -DANDROID_MULTI_SIM \
15 -DMODE_DSDS
16endif
17
18ifeq ($(strip $(MTK_MULTI_SIM_SUPPORT)), dsss)
19 $(CFLAGS) += -DMODE_DSSS
20endif
21
22$(warning ################# TARGET_PLATFORM: $(TARGET_PLATFORM))
23ifeq ($(strip $(TARGET_PLATFORM)), mt2731)
24#$(warning #################add for debug $(ROOT), $(includedir))
25$(warning ################# TARGET_PLATFORM_MT2731)
26 $(CFLAGS) += -DTARGET_PLATFORM_MT2731 \
27 -DMD_93_SUPPORT
28else ifeq ($(strip $(TARGET_PLATFORM)), mt2635)
29$(warning ################# TARGET_PLATFORM_MT2635)
30 $(CFLAGS) += -DTARGET_PLATFORM_MT2635 \
31 -DMD_90_SUPPORT
32endif
33
34
35LOCAL_PATH = .
36#CFLAGS = $(LOCAL_CFLAGS) -std=c99
37#CXXFLAGS = $(LOCAL_CFLAGS) -std=gnu++14
38$(warning ################# ZHOUQUNCHAO ROOT: $(ROOT),includedir:$(includedir),LOCAL_PATH:$(LOCAL_PATH))
39LOCAL_C_INCLUDES = \
40 -I. \
41 -I$(LOCAL_PATH) \
42 -I$(ROOT)$(includedir)/glib-2.0 \
43 -I$(ROOT)$(libdir)/glib-2.0/include \
44 -I$(ROOT)$(includedir)/include/hal/external \
45 -I$(ROOT)$(includedir)/include/types/ \
46 -I$(ROOT)$(includedir)/include/ \
47 -I$(ROOT)$(includedir)/liblog \
48 -I$(ROOT)$(includedir)/vendor-ril \
49
50LOCAL_C_INCLUDES+=$(DNS_FLAGS)
51
52LOCAL_LIBS := \
53 -L. \
54 -ldl \
55 -lpthread \
56 -llynq-log \
57
58LOCAL_SRC_FILES_C = $(wildcard *.c )
59EXECUTABLE = lynq-conti-plugin-test
60
61OBJECTS=$(LOCAL_SRC_FILES_C:.c=.o)
62all: $(EXECUTABLE)
63
64$(EXECUTABLE): $(OBJECTS)
65 $(CXX) $(OBJECTS) $(CFLAGS) $(LOCAL_LIBS) $(LOCAL_C_INCLUDES) -o $@
66
67%.o: %.c
68 $(warning ----->build $<)
69 echo $(CC)
70 echo $(CFLAGS)
71 $(CC) $(CFLAGS) $(LOCAL_C_INCLUDES) $(LOCAL_LIBS) -o $@ -c $<
72%.o : %.cpp
73 echo $(CXX)
74 echo $(CFLAGS)
75 $(CXX) $(CFLAGS) $(LOCAL_C_INCLUDES) $(LOCAL_LIBS) -o $@ -c $<
76
77.PHONY: clean
78clean:
79 $(RM) $(OBJECTS) $(EXECUTABLE)