From 953bb0d871057a61bcce942a4b06233ec6c6d59b Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Wed, 11 Oct 2023 23:03:43 +0800 Subject: [PATCH] msd_lite: update Makefile --- trunk/user/msd_lite/.gitignore | 1 - trunk/user/msd_lite/Makefile | 44 ++++++++++--------------------- trunk/user/msd_lite/msd_lite.diff | 13 --------- 3 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 trunk/user/msd_lite/.gitignore delete mode 100644 trunk/user/msd_lite/msd_lite.diff diff --git a/trunk/user/msd_lite/.gitignore b/trunk/user/msd_lite/.gitignore deleted file mode 100644 index e325ac27e07..00000000000 --- a/trunk/user/msd_lite/.gitignore +++ /dev/null @@ -1 +0,0 @@ -msd_lite/ \ No newline at end of file diff --git a/trunk/user/msd_lite/Makefile b/trunk/user/msd_lite/Makefile index ad6e6fb17bb..8eefc7122c2 100644 --- a/trunk/user/msd_lite/Makefile +++ b/trunk/user/msd_lite/Makefile @@ -1,37 +1,21 @@ -SRC_NAME=msd_lite -THISDIR = $(shell pwd) +include $(ROOTDIR)/rules.mk -CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables +PKG_NAME:=msd_lite +PKG_SOURCE_DATE:=2023-02-17 -all: download_test config_test - $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)/build +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/rozhuk-im/msd_lite +PKG_SOURCE_VERSION:=744d2ef91797471e26b3b117e7aa0ffebbb91106 -download_test: - ( if [ ! -d $(THISDIR)/$(SRC_NAME) ]; then \ - git clone https://github.com/rozhuk-im/msd_lite.git ; \ - cd $(SRC_NAME) ; \ - git submodule update --init --recursive ; \ - patch -p1 -i ../msd_lite.diff ; \ - fi ) +PKG_FIXUP:=autoreconf -config_test: - ( if [ -f ./config_done ]; then \ - echo "the same configuration"; \ - else \ - make configure && touch config_done; \ - fi ) +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk -configure: - ( mkdir -p $(SRC_NAME)/build && cd $(SRC_NAME)/build ; \ - cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TOOLCHAIN_FILE=$(CONFIG_CMAKE_TOOLCHAIN_FILE) \ - .. \ - ) - -clean: - rm -rf $(SRC_NAME)/build - rm -f config_done +$(eval $(call BuildPackage,msd_lite)) romfs: - $(ROMFSINST) $(THISDIR)/$(SRC_NAME)/build/src/msd_lite /usr/bin/msd_lite - $(ROMFSINST) $(THISDIR)/msd_lite.conf /etc_ro/msd_lite.conf + $(INSTALL_DIR) $(ROMFSDIR)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/msd_lite $(ROMFSDIR)/usr/bin/msd_lite + $(INSTALL_DIR) $(ROMFSDIR)/etc_ro + $(INSTALL_CONF) ./msd_lite.conf $(ROMFSDIR)/etc_ro/msd_lite.conf diff --git a/trunk/user/msd_lite/msd_lite.diff b/trunk/user/msd_lite/msd_lite.diff deleted file mode 100644 index 7d7b95199e8..00000000000 --- a/trunk/user/msd_lite/msd_lite.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,8 +41,7 @@ include(CheckFunctionExists) - include(CheckSymbolExists) - include(CheckCCompilerFlag) - --find_library(PTHREAD_LIBRARY pthread) --list(APPEND CMAKE_REQUIRED_LIBRARIES ${PTHREAD_LIBRARY}) -+list(APPEND CMAKE_REQUIRED_LIBRARIES pthread) - - ############################# MACRO SECTION ############################ - macro(try_c_flag prop flag) \ No newline at end of file