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

bindir=/usr/bin
CXXFLAGS=-Wall -g -O -std=c++11
LIBS=-ldl
INCLUDE_DIRS = -I ./../inc/

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

TARGET=stmodule-test

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

$(OBJS):$(SRCS)
	$(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) -c $^

install:
	install -d $(DESTDIR)${bindir}
	install -m 0755 $(TARGET) $(DESTDIR)${bindir}

clean:
	rm -f $(OBJS)
	rm -f $(TARGET)

