dahdi-tools: add -fcommon workaround for gcc10
[feed/telephony.git] / libs / dahdi-tools / Makefile
1 #
2 # Copyright (C) 2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dahdi-tools
11 PKG_VERSION:=3.0.0
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-tools/releases
16 PKG_HASH:=5bebb20d5ae13fa13f0e2075603013954b962be477db02271eef44b3e41557c5
17
18 PKG_LICENSE:=GPL-2.0
19 PKG_LICENSE_FILES:=LICENSE
20 PKG_MAINTAINER:=Vittorio Gambaletta <openwrt@vittgam.net>
21
22 PKG_BUILD_PARALLEL:=1
23
24 PKG_FIXUP:=autoreconf
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/dahdi-cfg/Default
31 SECTION:=utils
32 CATEGORY:=Utilities
33 SUBMENU:=Telephony
34 DEPENDS=+kmod-dahdi
35 endef
36
37 define Package/dahdi-cfg
38 $(call Package/dahdi-cfg/Default)
39 DEPENDS+=+libpthread +dahdi-tools-libtonezone
40 TITLE:=DAHDI tools dahdi_cfg, dahdi_scan and fxotune
41 endef
42
43 define Package/dahdi-monitor
44 $(call Package/dahdi-cfg/Default)
45 TITLE:=DAHDI tools dahdi_monitor, dahdi_speed and dahdi_test
46 endef
47
48 define Package/dahdi-tools-libtonezone
49 $(call Package/dahdi-cfg/Default)
50 SECTION:=libs
51 CATEGORY:=Libraries
52 TITLE:=DAHDI tonezone library
53 endef
54
55 CONFIGURE_ARGS+=--disable-silent-rules
56
57 # https://issues.asterisk.org/jira/browse/DAHTOOL-85
58 TARGET_CFLAGS+=-fcommon
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.{a,so*} \
63 $(1)/usr/lib/
64 $(INSTALL_DIR) $(1)/usr/include/dahdi
65 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dahdi/tonezone.h \
66 $(1)/usr/include/dahdi/
67 endef
68
69 define Package/dahdi-cfg/install
70 $(INSTALL_DIR) $(1)/usr/sbin
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_cfg,dahdi_scan,fxotune} \
72 $(1)/usr/sbin/
73 endef
74
75 define Package/dahdi-monitor/install
76 $(INSTALL_DIR) $(1)/usr/sbin
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_monitor,dahdi_speed,dahdi_test} \
78 $(1)/usr/sbin/
79 endef
80
81 define Package/dahdi-tools-libtonezone/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/
84 endef
85
86 $(eval $(call BuildPackage,dahdi-cfg))
87 $(eval $(call BuildPackage,dahdi-monitor))
88 $(eval $(call BuildPackage,dahdi-tools-libtonezone))