84 lines
1.7 KiB
Makefile
84 lines
1.7 KiB
Makefile
|
include $(TOPDIR)/rules.mk
|
||
|
|
||
|
PKG_NAME:=crash-worker
|
||
|
PKG_VERSION:=0.0.1
|
||
|
PKG_RELEASE:=1
|
||
|
|
||
|
include $(BUILD_DIR)/package.mk
|
||
|
|
||
|
define Package/crash-worker/Default
|
||
|
SECTION:=utils
|
||
|
CATEGORY:=Allwinner
|
||
|
TITLE:=crash report
|
||
|
DEPENDS:=+libunwind +lunwind-arm +lunwind-ptrace
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker
|
||
|
$(call Package/crash-worker/Default)
|
||
|
MENU:=1
|
||
|
DEFAULT:=1
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker-test
|
||
|
$(call Package/crash-worker/Default)
|
||
|
TITLE:=crash report test
|
||
|
DEPENDS := +crash-worker
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker/description
|
||
|
crash report
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker-test/description
|
||
|
crash report test
|
||
|
endef
|
||
|
|
||
|
define Build/Prepare
|
||
|
mkdir -p $(PKG_BUILD_DIR)
|
||
|
$(CP) -r ./src $(PKG_BUILD_DIR)/
|
||
|
$(CP) -r ./test $(PKG_BUILD_DIR)/
|
||
|
endef
|
||
|
|
||
|
define Build/Configure
|
||
|
endef
|
||
|
|
||
|
define Build/Compile
|
||
|
$(MAKE) -C $(PKG_BUILD_DIR)/src/ \
|
||
|
ARCH="$(TARGET_ARCH)" \
|
||
|
AR="$(TARGET_AR)" \
|
||
|
CC="$(TARGET_CC)" \
|
||
|
CXX="$(TARGET_CXX)" \
|
||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||
|
CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
|
||
|
all
|
||
|
|
||
|
$(MAKE) -C $(PKG_BUILD_DIR)/test/ \
|
||
|
ARCH="$(TARGET_ARCH)" \
|
||
|
AR="$(TARGET_AR)" \
|
||
|
CC="$(TARGET_CC)" \
|
||
|
CXX="$(TARGET_CXX)" \
|
||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||
|
CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
|
||
|
all
|
||
|
endef
|
||
|
|
||
|
define Build/InstallDev
|
||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker/install
|
||
|
$(INSTALL_DIR) $(1)/bin
|
||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/bin
|
||
|
endef
|
||
|
|
||
|
define Package/crash-worker-test/install
|
||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||
|
endef
|
||
|
|
||
|
$(eval $(call BuildPackage,crash-worker))
|
||
|
$(eval $(call BuildPackage,crash-worker-test))
|