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
)
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/$(PKG_NAME
)/Default
25 TITLE
:=Lantiq channel driver
26 URL
:=https
://github.com
/kochstefan
/asterisk_channel_lantiq
27 DEPENDS
:=+kmod-ltq-vmmc
30 define Package
/asterisk13-
$(PKG_NAME
)
31 $(call Package
/$(PKG_NAME
)/Default
)
36 define Package
/description
/Default
37 An implementation of a Lantiq TAPI channel driver for Asterisk.
40 Package
/asterisk13-
$(PKG_NAME
)/description
= $(Package
/description
/Default
)
42 define Package
/conffiles
/Default
43 /etc
/asterisk
/lantiq.conf
46 Package
/asterisk13-
$(PKG_NAME
)/conffiles
= $(Package
/conffiles
/Default
)
48 define Package
/Install
/Default
49 $(INSTALL_DIR
) $(1)/etc
/asterisk
50 $(INSTALL_CONF
) .
/files
/lantiq-
$(BUILD_VARIANT
).conf.sample \
51 $(1)/etc
/asterisk
/lantiq.conf
52 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
53 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/chan_lantiq.so \
54 $(1)/usr
/lib
/asterisk
/modules
57 Package
/asterisk13-
$(PKG_NAME
)/install = $(Package
/Install
/Default
)
59 ifeq ($(BUILD_VARIANT
),asterisk13
)
60 CHAN_LANTIQ_AST_INCLUDES
:=-I
$(STAGING_DIR
)/usr
/include/asterisk-13
/include
64 $(CP
) .
/files
/chan_lantiq-
$(BUILD_VARIANT
).c
$(PKG_BUILD_DIR
)/chan_lantiq.c
65 $(CP
) .
/files
/default.exports
$(PKG_BUILD_DIR
)/chan_lantiq.exports
68 define Build
/Configure
72 cd
$(PKG_BUILD_DIR
) && \
73 $(TARGET_CC
) -o chan_lantiq.o
-c chan_lantiq.c
-MD
-MT chan_lantiq.o \
74 -MF .chan_lantiq.o.d
-MP
-pthread \
76 $(CHAN_LANTIQ_AST_INCLUDES
) \
78 -Wall
-Wstrict-prototypes
-Wmissing-prototypes \
79 -Wmissing-declarations
$(FPIC
) -DAST_MODULE
=\"chan_lantiq
\" && \
80 $(TARGET_CC
) -o chan_lantiq.so
-pthread
$(TARGET_LDFLAGS
) -shared \
81 -Wl
,--version-script
,chan_lantiq.exports
,--warn-common \
85 $(eval
$(call BuildPackage
,asterisk13-
$(PKG_NAME
)))