# SPDX-FileCopyrightText: 2022 Unisoc (Shanghai) Technologies Co., Ltd.
#
# SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0
FLAGS = -Wall -g -O

LIBS =  -lgtest -pthread -lutil -ldbus-1 -ldbushelper
TARGET = gnss-adapter_IT

FLAG = -ftest-coverage -fprofile-arcs -lgcov

SYS_ROOT = $(WORKDIR)/recipe-sysroot

INCLUDE_FILES = -I$(SYS_ROOT)/usr/include \
               -I$(SYS_ROOT)/usr/include/dbus-1.0 \
               -I$(SYS_ROOT)/usr/lib/dbus-1.0/include \
               -I../

SRCS := $(wildcard ./*.cpp)

OBJS := $(notdir $(patsubst %.cpp,%.o,$(SRCS)))

all:$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(FLAG)

$(OBJS):$(SRCS)
	$(CXX) $(CFLAGS) $(FLAGS) $(INCLUDE_FILES) -c $^

install:
	@echo "gnss-adapter_IT install do nothing"
clean:
	-rm *.o
	-rm -rf $(TARGET)
