2 # Copyright (C) 2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_MAINTAINER
:=Jiri Slachta
<jiri@slachta.eu
>
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/$(PKG_NAME
)/Default
27 TITLE
:=Lantiq channel driver
28 URL
:=https
://github.com
/kochstefan
/asterisk_channel_lantiq
29 DEPENDS
:=@
(TARGET_lantiq_falcon||TARGET_lantiq_xway||TARGET_lantiq_xrx200
) +kmod-ltq-vmmc
32 define Package
/asterisk13-
$(PKG_NAME
)
33 $(call Package
/$(PKG_NAME
)/Default
)
38 define Package
/description
/Default
39 An implementation of a Lantiq TAPI channel driver for Asterisk.
42 Package
/asterisk13-
$(PKG_NAME
)/description
= $(Package
/description
/Default
)
44 define Package
/conffiles
/Default
45 /etc
/asterisk
/lantiq.conf
48 Package
/asterisk13-
$(PKG_NAME
)/conffiles
= $(Package
/conffiles
/Default
)
50 define Package
/Install
/Default
51 $(INSTALL_DIR
) $(1)/etc
/asterisk
52 $(INSTALL_CONF
) $(SOURCE
)/files
/lantiq-
$(BUILD_VARIANT
).conf.sample \
53 $(1)/etc
/asterisk
/lantiq.conf
54 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
55 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/chan_lantiq.so \
56 $(1)/usr
/lib
/asterisk
/modules
59 Package
/asterisk13-
$(PKG_NAME
)/install = $(Package
/Install
/Default
)
61 ifeq ($(BUILD_VARIANT
),asterisk13
)
62 CHAN_LANTIQ_AST_INCLUDES
:=-I
$(STAGING_DIR
)/usr
/include/asterisk-13
/include
66 $(CP
) $(SOURCE
)/files
/chan_lantiq-
$(BUILD_VARIANT
).c
$(PKG_BUILD_DIR
)/chan_lantiq.c
67 $(CP
) $(SOURCE
)/files
/default.exports
$(PKG_BUILD_DIR
)/chan_lantiq.exports
70 define Build
/Configure
74 cd
$(PKG_BUILD_DIR
) && \
75 $(TARGET_CC
) -o chan_lantiq.o
-c chan_lantiq.c
-MD
-MT chan_lantiq.o \
76 -MF .chan_lantiq.o.d
-MP
-pthread \
77 $(CHAN_LANTIQ_AST_INCLUDES
) \
80 -Wall
-Wstrict-prototypes
-Wmissing-prototypes \
81 -Wmissing-declarations
$(FPIC
) -DAST_MODULE
=\"chan_lantiq
\" && \
82 $(TARGET_CC
) -o chan_lantiq.so
-pthread
$(TARGET_LDFLAGS
) -shared \
83 -Wl
,--version-script
,chan_lantiq.exports
,--warn-common \
87 $(eval
$(call BuildPackage
,asterisk13-
$(PKG_NAME
)))