2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://ftp.digium.com
/pub
/zaptel
/releases
/
18 PKG_MD5SUM
:=f6af404cc0244b93a2fc88b237f374bd
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/zaptel14
/Default
24 URL
:=http
://ftp.digium.com
/pub
/zaptel
/releases
27 define KernelPackage
/zaptel14
28 SUBMENU
:=Other modules
29 $(call Package
/zaptel14
/Default
)
30 TITLE
+= (kernel module
)
31 VERSION
:=$(LINUX_VERSION
)-$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
32 FILES
:=$(PKG_BUILD_DIR
)/kernel
/zaptel.
$(LINUX_KMOD_SUFFIX
) \
33 $(PKG_BUILD_DIR
)/kernel
/ztdummy.
$(LINUX_KMOD_SUFFIX
)
34 AUTOLOAD
:=$(call AutoLoad
,70,zaptel ztdummy
)
37 define KernelPackage
/zaptel14
/description
38 This package contains the Zaptel core module and ztdummy driver.
41 define Package
/zaptel14-util
42 $(call Package
/zaptel14
/Default
)
46 DEPENDS
:= +kmod-zaptel14
49 define Package
/zaptel14-util
/description
50 This package contains the zttest program
53 define Package
/zaptel14-libtonezone
54 $(call Package
/zaptel14
/Default
)
57 TITLE
+= libtonezone
(library
)
58 DEPENDS
:= +kmod-zaptel14
61 define Package
/zaptel14-libtonezone
/description
62 This package contains the libraries for accessing zaptel
/dummy drivers.
65 define Build
/Compile
/zaptel14-template
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 DESTDIR
="$(PKG_INSTALL_DIR)" \
68 ARCH
="$(LINUX_KARCH)" \
69 LD
="$(TARGET_CROSS)ld" \
70 AR
="$(TARGET_CROSS)ar" \
72 DEB_HOST_GNU_TYPE
="$(ARCH)" \
73 KVERS
="$(LINUX_VERSION)" \
78 define Build
/Compile
/zaptel14
79 $(call Build
/Compile
/zaptel14-template
, \
81 KFLAGS_PPC
="-G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 $(TARGET_CFLAGS) -mlong-calls -fno-common -nostdinc -iwithprefix include" \
82 TOPDIR_MODULES
="zaptel ztdummy" \
88 define Build
/Compile
/zaptel14-libtonezone
89 $(call Build
/Compile
/zaptel14-template
, \
91 install-libs install-include \
96 $(call Build
/Compile
/zaptel14
)
97 $(call Build
/Compile
/zaptel14-libtonezone
)
100 define Build
/InstallDev
101 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include/zaptel
/
102 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/zaptel
/zaptel.h
$(STAGING_DIR
)/usr
/include/zaptel
/
103 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/zaptel
/tonezone.h
$(STAGING_DIR
)/usr
/include/zaptel
/
104 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/
105 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone
* $(STAGING_DIR
)/usr
/lib
/
108 define Package
/zaptel14-util
/install
109 $(INSTALL_DIR
) $(1)/usr
/bin
110 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zttest
$(1)/usr
/bin
/
113 define Package
/zaptel14-libtonezone
/install
114 $(INSTALL_DIR
) $(1)/usr
/lib
115 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone.so.
* $(1)/usr
/lib
/
118 $(eval
$(call KernelPackage
,zaptel14
))
119 $(eval
$(call BuildPackage
,zaptel14-util
))
120 $(eval
$(call BuildPackage
,zaptel14-libtonezone
))