iopsys-feed/voicemngr/Makefile
Andreas Gnau 084691a29a
voicemngr: Do not manually specify BCM lib paths
Do not explicitly specify BCM libary search paths. All binaries have a
correct RUNPATH set via feeds/broadcom/bcmkernel/bcm-toolchain.mk and
the Makefile has been updated to respect LDFLAGS. Setting LD_LIBARY_PATH
and specifiying custome library search paths is thus no longer
necessary.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-09 10:06:47 +02:00

91 lines
2.7 KiB
Makefile

#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
export LIBVOICE_MAKE_OPTS:=$(TOPDIR)/tmp/.libvoice-opts.mk
include $(TOPDIR)/rules.mk
-include $(LIBVOICE_MAKE_OPTS)
PKG_NAME:=voicemngr
PKG_RELEASE:=1
PKG_VERSION:=1.1.11
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=33db1b82fbb161d5a4dc253ecb6e0fb0648de3c8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -Wall -Werror
export LIBVOICE_CFLAGS
export LIBVOICE_LIBS
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS Voice Manager
URL:=
DEPENDS:= +libubox +libblobmsg-json +ubus +!TARGET_brcmbca:libpicoevent +TARGET_brcmbca:libpicoevent-bcm \
+!TARGET_brcmbca:uci +TARGET_brcmbca:uci-bcm \
+TARGET_brcmbca:bcmkernel +TARGET_brcmbca:libvoice-broadcom \
+TARGET_ipq95xx:libvoice-d2 +TARGET_ipq95xx:kmod-d2-voice \
+TARGET_airoha:kmod-voip_driver +TARGET_airoha:voip_app +TARGET_airoha:libvoice-airoha
ifeq ($(CONFIG_TARGET_brcmbca),y)
include $(TOPDIR)/feeds/broadcom/bcmkernel/bcm-toolchain.mk
TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/bcm963xx/
TARGET_CPPFLAGS :=
TARGET_CXXFLAGS :=
EXTRA_CFLAGS :=
CheckDependencies :=
endif
endef
define Package/$(PKG_NAME)/description
Voice manager is a daemon that bridges Asterisk and platform specific DSP/SLIC APIs
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
@echo "Building from the local source. TARGET_PLATFORM=$(TARGET_PLATFORM)"
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
$(LN) $(LIBVOICE_PKG_BUILD_DIR)/*.[ch] $(PKG_BUILD_DIR)/libvoice/
endef
else
define Build/Prepare
$(call Build/Prepare/Default)
$(LN) $(LIBVOICE_PKG_BUILD_DIR)/*.[ch] $(PKG_BUILD_DIR)/libvoice/
endef
endif
#installs files into ./staging_dir/. that shared with asterisk-chan-voicemngr
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(CP) $(PKG_BUILD_DIR)/libvoice/voice-types.h $(STAGING_DIR)/usr/include
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
$(CP) $(PKG_BUILD_DIR)/libvoice/libvoice.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))