d0743cda353e0341a9d35a73caf7abac66270457
[openwrt/openwrt.git] / package / kernel / 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 <john@phrozen.org>
15 PKG_LICENSE:=GPL-2.0+
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define KernelPackage/ltq-ptm-template
20 SECTION:=sys
21 CATEGORY:=Kernel modules
22 SUBMENU:=Network Devices
23 TITLE:=ptm driver for $(1)
24 URL:=http://www.lantiq.com/
25 VARIANT:=$(1)
26 DEPENDS:=@TARGET_lantiq_$(2)
27 FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko
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,xrx200)
34
35 define Build/Configure
36 endef
37
38 define Build/Compile
39 cd $(LINUX_DIR); \
40 ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
41 $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
42 endef
43
44 $(eval $(call KernelPackage,ltq-ptm-danube))
45 $(eval $(call KernelPackage,ltq-ptm-ase))
46 $(eval $(call KernelPackage,ltq-ptm-ar9))
47 $(eval $(call KernelPackage,ltq-ptm-vr9))