blob: 9e9f7333bb445ea33bd8a19d5212d7a6ea91e515 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001include $(TOPDIR)/rules.mk
2
3# Name, version and release number
4# The name and version of your package are used to define the variable to point to the build directory of your package: $(PKG_BUILD_DIR)
5PKG_NAME:=libtrm
6PKG_VERSION:=1.0
7#PKG_RELEASE:=1
8
9include $(INCLUDE_DIR)/package.mk
10
11# Package definition; instructs on how and where our package will appear in the overall configuration menu ('make menuconfig')
12define Package/libtrm
13 SECTION:=MTK Properties
14 CATEGORY:=MTK Properties
15 SUBMENU:=Libraries
16 TITLE:=TRM library
17 DEPENDS:=$(CXX_DEPENDS) +libpthread +libc
18endef
19
20# Package description; a more verbose description on what our package does
21define Package/libtrm/description
22 Telephony Recovery Mechanism (TRM) library
23endef
24
25# Package preparation instructions; create the build directory and copy the source code.
26# The last command is necessary to ensure our preparation instructions remain compatible with the patching system.
27define Build/Prepare
28 mkdir -p $(PKG_BUILD_DIR)
29 cp -af lib/* $(PKG_BUILD_DIR)
30 $(Build/Patch)
31endef
32
33# Package build instructions; invoke the target-specific compiler to first compile the source file, and then to link the file into the final executable
34define Build/Compile
35 $(MAKE) -C$(PKG_BUILD_DIR) OPENWRT=1 CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) CXX=$(TARGET_CXX) LD=$(TARGET_LD) AR=$(TARGET_AR) STRIP=$(STRIP) all
36endef
37
38# Package install instructions; create a directory inside the package to hold our executable, and then copy the executable we built previously into the folder
39define Package/libtrm/install
40 $(INSTALL_DIR) $(1)/usr/lib
41 $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/libtrm.so $(1)/usr/lib
42endef
43
44# This command is always the last, it uses the definitions and variables we give above in order to get the job done
45$(eval $(call BuildPackage,libtrm))
46