source: packages/libs/zaptel-1.4.x/Makefile @ 13684

Last change on this file since 13684 was 13684, checked in by zandbelt, 8 years ago

make zaptel compile with kernels >2.6.25

File size: 3.3 KB
Line 
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
8
9include $(TOPDIR)/rules.mk
10include $(INCLUDE_DIR)/kernel.mk
11
12PKG_NAME:=zaptel
13PKG_VERSION:=1.4.9.2
14PKG_RELEASE:=1
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/
18PKG_MD5SUM:=f6af404cc0244b93a2fc88b237f374bd
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/zaptel14/Default
23  TITLE:=Zaptel
24  URL:=http://ftp.digium.com/pub/zaptel/releases
25endef
26
27define 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)
35endef
36
37define KernelPackage/zaptel14/description
38  This package contains the Zaptel core module and ztdummy driver.
39endef
40
41define Package/zaptel14-util
42  $(call Package/zaptel14/Default)
43  SECTION:=utils
44  CATEGORY:=Utilities
45  TITLE+= utils
46  DEPENDS += +kmod-zaptel14
47endef
48
49define Package/zaptel14-util/description
50  This package contains the zttest program
51endef
52
53define Package/zaptel14-libtonezone
54  $(call Package/zaptel14/Default)
55  SECTION:=libs
56  CATEGORY:=Libraries
57  TITLE+= libtonezone (library)
58  DEPENDS += +kmod-zaptel14
59endef
60
61define Package/zaptel14-libtonezone/description
62        This package contains the libraries for accessing zaptel/dummy drivers.
63endef
64
65define 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" \
71                HOSTCC="$(HOSTCC)" \
72                DEB_HOST_GNU_TYPE="$(ARCH)" \
73                KVERS="$(LINUX_VERSION)" \
74                KSRC="$(LINUX_DIR)" \
75                $(1)
76endef
77
78define Build/Compile/zaptel14
79        $(call Build/Compile/zaptel14-template, \
80                CC="$(KERNEL_CC)" \
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" \
83                SUBDIR_MODULES="" \
84                modules zttest \
85        )
86endef
87
88define Build/Compile/zaptel14-libtonezone
89        $(call Build/Compile/zaptel14-template, \
90                CC="$(TARGET_CC)" \
91                install-libs install-include \
92        )
93endef
94
95define Build/Compile
96        $(call Build/Compile/zaptel14)
97        $(call Build/Compile/zaptel14-libtonezone)
98endef
99
100define 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/
106endef
107
108define Package/zaptel14-util/install
109        $(INSTALL_DIR) $(1)/usr/bin
110        $(INSTALL_BIN) $(PKG_BUILD_DIR)/zttest $(1)/usr/bin/
111endef
112
113define Package/zaptel14-libtonezone/install
114        $(INSTALL_DIR) $(1)/usr/lib
115        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
116endef
117
118$(eval $(call KernelPackage,zaptel14))
119$(eval $(call BuildPackage,zaptel14-util))
120$(eval $(call BuildPackage,zaptel14-libtonezone))
Note: See TracBrowser for help on using the repository browser.