37 lines
1.0 KiB
Makefile
37 lines
1.0 KiB
Makefile
# SPDX-FileCopyrightText: 2022 Unisoc (Shanghai) Technologies Co., Ltd.
|
|||
|
|
#
|
||
|
|
# SPDX-License-Identifier: LicenseRef-UNISOC
|
||
|
|
|
||
|
|
bindir=/usr/bin
|
||
|
|
CFLAGS=-Wall -g -O -std=c++11
|
||
|
|
TARGET=engmodeapp
|
||
|
|
SYS_ROOT = $(WORKDIR)/recipe-sysroot
|
||
|
|
LIBS=-lpthread -lrt -ldl -lcontrolview -lglib-2.0 -ldbus-1 -liniparser -lchm-at -lofono -lnetcon
|
||
|
|
INCLUDE_DIRS=-I ./inc/ -I ./module/inc/
|
||
|
|
CFLAGS += $(MULTI_SIM_CFLAGS)
|
||
|
|
ifeq ($(strip $(ENGMODEAPP_REMOVE_MODEM_FLAG)), true)
|
||
|
|
CXXFLAGS += -DREMOVE_SPRD_MODEM
|
||
|
|
endif
|
||
|
|
INCLUDE_DIRS += -I$(SYS_ROOT)/usr/include/ \
|
||
|
|
-I$(SYS_ROOT)/usr/lib/dbus-1.0/include/ \
|
||
|
|
-I$(SYS_ROOT)/usr/lib/glib-2.0/include/ \
|
||
|
|
-I$(SYS_ROOT)/usr/include/glib-2.0/ \
|
||
|
|
-I$(SYS_ROOT)/usr/include/dbus-1.0/ \
|
||
|
|
|
||
|
|
SRCS=$(wildcard ./src/*.cpp ./module/src/*.cpp)
|
||
|
|
OBJ=$(patsubst %.cpp,%.o,$(SRCS))
|
||
|
|
OBJS=$(notdir $(OBJ))
|
||
|
|
|
||
|
|
all:$(OBJS)
|
||
|
|
$(CXX) -o $(TARGET) $(OBJS) $(LIBS)
|
||
|
|
$(OBJS):$(SRCS)
|
||
|
|
$(CXX) $(CFLAGS) $(INCLUDE_DIRS) -c $^
|
||
|
|
|
||
|
|
install:
|
||
|
|
install -d $(DESTDIR)${bindir}
|
||
|
|
install -m 0755 $(TARGET) $(DESTDIR)${bindir}
|
||
|
|
|
||
|
|
clean:
|
||
|
|
rm -f ${OBJS}
|
||
|
|
rm -f $(TARGET)
|