add ltq-ptm
[openwrt/staging/yousong.git] / package / platform / lantiq / ltq-ptm / Makefile
1 # Copyright (C) 2012 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=ltq-ptm
11 PKG_RELEASE:=1
12 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-ptm-$(BUILD_VARIANT)
13
14 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define KernelPackage/ltq-ptm-template
19 SECTION:=sys
20 CATEGORY:=Kernel modules
21 SUBMENU:=Network Devices
22 TITLE:=ptm driver for $(1)
23 URL:=http://www.lantiq.com/
24 VARIANT:=$(1)
25 DEPENDS:=@TARGET_lantiq_$(2)
26 FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko
27 AUTOLOAD:=$(call AutoLoad,52,ltq_ptm_$(1))
28 endef
29
30 KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,xway)
31 KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,xway)
32 KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,ase)
33 KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,xway)
34
35 define Build/Prepare
36 $(INSTALL_DIR) $(PKG_BUILD_DIR)
37 $(CP) ./src/* $(PKG_BUILD_DIR)
38 endef
39
40 define Build/Configure
41 endef
42
43 define Build/Compile
44 cd $(LINUX_DIR); \
45 ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
46 $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
47 endef
48
49 $(eval $(call KernelPackage,ltq-ptm-danube))
50 $(eval $(call KernelPackage,ltq-ptm-ase))
51 $(eval $(call KernelPackage,ltq-ptm-ar9))
52 $(eval $(call KernelPackage,ltq-ptm-vr9))