blob: 63270474a30db0d1c0755ac842241a461c4d7fe5 [file] [log] [blame]
BUILD_ROOT = $(shell pwd)/..
include $(BUILD_ROOT)/Make.defines
LOCAL_PATH=$(BUILD_ROOT)/mbtk_gnssd
INC_DIR += \
-I$(LOCAL_PATH) \
-I$(LOCAL_PATH)/hd8122_dl \
-I$(BUILD_ROOT)/libmbtk_ril
LIB_DIR +=
LIBS += -lmbtk_lib -lmbtk_net -lmbtk_ril -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -lubus -lubox -lutil
CFLAGS +=
DEFINE +=
#MY_FILES_PATH:=$(LOCAL_PATH)
#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
#MY_FILES_PATH += $(LOCAL_PATH)/ql
#endif
#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
#endif
#LOCAL_SRC_FILES = $(wildcard *.c) $(wildcard *.cpp)
LOCAL_SRC_FILES = gnss_main.c \
gnss_nmea.c \
gnss_6228.c \
gnss_utils.c \
gnss_hd8122.c \
gnss_asr5311.c \
gnss_n50db.c \
hd8122_dl/port.c \
hd8122_dl/fwup.c
#ifeq ($(MBTK_GNSS_MODE), gnss_8122)
#Enable mbtk ipc(Disable ubus.)
LOCAL_SRC_FILES += gnss_ipc.c
#else
# Enable ubus
#LOCAL_SRC_FILES += gnss_ubus.c
#DEFINE += -DMBTK_GNSS_UBUS_ENABLE
#endif
OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
$(info OBJS = $(OBJS))
dtarget := $(OUT_DIR)/bin/mbtk_gnssd
all: $(dtarget)
$(dtarget): $(OBJS)
@echo " BIN $@"
$(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
clean:
rm -f $(OBJS) $(dtarget)