[packages] zaptel-1.4.x: split builds of kernel & userland stuff, use $(CP) instead...
authorNicolas Thill <nico@openwrt.org>
Mon, 2 Feb 2009 13:39:24 +0000 (13:39 +0000)
committerNicolas Thill <nico@openwrt.org>
Mon, 2 Feb 2009 13:39:24 +0000 (13:39 +0000)
SVN-Revision: 14352

libs/zaptel-1.4.x/Makefile

index 6ebefa8a1be541447a34ea75234f873e3b9980df..3846223712c18b7fc3ca914d482b1af1aec738a8 100644 (file)
@@ -1,17 +1,17 @@
 # 
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+# $Id$
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=zaptel
 PKG_VERSION:=1.4.9.2
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=zaptel
 PKG_VERSION:=1.4.9.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/
@@ -25,17 +25,16 @@ define Package/zaptel14/Default
 endef
 
 define KernelPackage/zaptel14
 endef
 
 define KernelPackage/zaptel14
-  SUBMENU:=Other modules
   $(call Package/zaptel14/Default)
   $(call Package/zaptel14/Default)
+  SUBMENU:=Other modules
   TITLE+= (kernel module)
   TITLE+= (kernel module)
-  VERSION:=$(LINUX_VERSION)-$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \
        $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy)
 endef
 
 define KernelPackage/zaptel14/description
   FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \
        $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy)
 endef
 
 define KernelPackage/zaptel14/description
 This package contains the Zaptel core module and ztdummy driver.
+ This package contains the Zaptel core module and ztdummy driver.
 endef
 
 define Package/zaptel14-util
 endef
 
 define Package/zaptel14-util
@@ -47,7 +46,7 @@ define Package/zaptel14-util
 endef
 
 define Package/zaptel14-util/description
 endef
 
 define Package/zaptel14-util/description
 This package contains the zttest program
+ This package contains the zttest program
 endef
 
 define Package/zaptel14-libtonezone
 endef
 
 define Package/zaptel14-libtonezone
@@ -59,50 +58,36 @@ define Package/zaptel14-libtonezone
 endef
 
 define Package/zaptel14-libtonezone/description
 endef
 
 define Package/zaptel14-libtonezone/description
      This package contains the libraries for accessing zaptel/dummy drivers.
+ This package contains the libraries for accessing zaptel/dummy drivers.
 endef
 
 endef
 
-define Build/Compile/zaptel14-template
+define Build/Compile/kmod
        $(MAKE) -C $(PKG_BUILD_DIR) \
        $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               ARCH="$(LINUX_KARCH)" \
-               LD="$(TARGET_CROSS)ld" \
-               AR="$(TARGET_CROSS)ar" \
-               HOSTCC="$(HOSTCC)" \
-               DEB_HOST_GNU_TYPE="$(ARCH)" \
+               ARCH="$(LINUX_KARCH)" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
                KVERS="$(LINUX_VERSION)" \
                KSRC="$(LINUX_DIR)" \
                KVERS="$(LINUX_VERSION)" \
                KSRC="$(LINUX_DIR)" \
-               $(1)
-endef
-
-define Build/Compile/zaptel14
-       $(call Build/Compile/zaptel14-template, \
-               CC="$(KERNEL_CC)" \
-               KFLAGS_PPC="-G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 $(TARGET_CFLAGS) -mlong-calls -fno-common -nostdinc -iwithprefix include" \
                TOPDIR_MODULES="zaptel ztdummy" \
                SUBDIR_MODULES="" \
                TOPDIR_MODULES="zaptel ztdummy" \
                SUBDIR_MODULES="" \
-               modules zttest \
-       )
+               modules
 endef
 
 endef
 
-define Build/Compile/zaptel14-libtonezone
-       $(call Build/Compile/zaptel14-template, \
-               CC="$(TARGET_CC)" \
-               install-libs install-include \
-       )
+define Build/Compile/user
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               install-libs install-include zttest
 endef
 
 define Build/Compile
 endef
 
 define Build/Compile
-       $(call Build/Compile/zaptel14)
-       $(call Build/Compile/zaptel14-libtonezone)
+       $(call Build/Compile/kmod)
+       $(call Build/Compile/user)
 endef
 
 define Build/InstallDev
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR)  $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/zaptel.h $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/tonezone.h $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib/
-       $(INSTALL_DATA)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone* $(STAGING_DIR)/usr/lib/
+       $(INSTALL_DIR)  $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
+       $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib
+       $(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
 endef
 
 define Package/zaptel14-util/install
 endef
 
 define Package/zaptel14-util/install
@@ -112,7 +97,7 @@ endef
 
 define Package/zaptel14-libtonezone/install
        $(INSTALL_DIR) $(1)/usr/lib
 
 define Package/zaptel14-libtonezone/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call KernelPackage,zaptel14))
 endef
 
 $(eval $(call KernelPackage,zaptel14))