add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[openwrt/openwrt.git] / package / ar7-atm / Makefile
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$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=sangam-atm
13 PKG_VERSION:=0.1
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
18 PKG_MD5SUM:=90c10702c9c3129e2ad1c01ce3975bf5
19 PKG_CAT:=bzcat
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define KernelPackage/sangam-atm-annex-a
24 SUBMENU:=Network Devices
25 DEPENDS:=@LINUX_2_4_AR7 +kmod-atm
26 TITLE:=AR7 ADSL driver (Annex A)
27 DESCRIPTION:=The AR7 ADSL driver for Annex A
28 VERSION:=$(PKG_VERSION)+$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
29 FILES:=$(PKG_BUILD_DIR)/tiatm.$(LINUX_KMOD_SUFFIX)
30 AUTOLOAD:=$(call AutoLoad,50,tiatm)
31 endef
32
33 define KernelPackage/sangam-atm-annex-b
34 $(call KernelPackage/sangam-atm-annex-a)
35 TITLE:=AR7 ADSL driver (Annex B)
36 DESCRIPTION:=The AR7 ADSL driver for Annex B
37 endef
38
39 define Build/Compile
40 $(MAKE) -C "$(LINUX_DIR)" \
41 CROSS_COMPILE="$(TARGET_CROSS)" \
42 ARCH="$(LINUX_KARCH)" \
43 SUBDIRS="$(PKG_BUILD_DIR)" \
44 modules
45 endef
46
47 define KernelPackage/sangam-atm-annex-a/install
48 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700xx_a.bin $(1)/lib/modules/ar0700xx.bin
49 endef
50
51 define KernelPackage/sangam-atm-annex-b/install
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700xx_b.bin $(1)/lib/modules/ar0700xx.bin
53 endef
54
55 $(eval $(call KernelPackage,sangam-atm-annex-a))
56 $(eval $(call KernelPackage,sangam-atm-annex-b))