# SPDX-FileCopyrightText: 2023 Unisoc (Shanghai) Technologies Co., Ltd.
#
# SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0
CFLAGS = -Wall -O0 -g
LIBS = -lm -llvgl -llvdrv -lpthread -lsessionqueue -lofono -lglib-2.0 -lgio-2.0 -liniparser -ldbushelper -ldbus-1 -lnetcon -ludbus -ldrm -lfreetype \
 	    -lwayland-client -lwayland-cursor -lxkbcommon
SYS_ROOT = $(WORKDIR)/recipe-sysroot
INCLUDE_DIRS = -I$(SYS_ROOT)/usr/include \
        -I$(SYS_ROOT)/usr/include/glib-2.0 \
        -I$(SYS_ROOT)/usr/lib/glib-2.0/include \
		-I$(SYS_ROOT)/usr/include/dbus-1.0 \
		-I$(SYS_ROOT)/usr/lib/dbus-1.0/include \

TARGET = lvdesktop
SRCS=$(wildcard ./*.cpp)
OBJ=$(patsubst %.cpp,%.o,$(SRCS))
OBJS=$(notdir $(OBJ))

all:$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS)
$(OBJS):$(SRCS)
	$(CXX) $(CFLAGS) $(INCLUDE_DIRS) -c $^
clean:
	rm -f $(TARGET) $(OBJS)
