0d597b1f5d922a36117195a2be4a3dbcf073d06a
[openwrt.git] / openwrt / target / linux / package / switch / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME := kmod-switch
7 PKG_RELEASE := 1
8 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
9
10 include $(TOPDIR)/package/rules.mk
11
12 $(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
13
14 ifeq ($(KERNEL_DIR),)
15 KERNEL_DIR:=$(LINUX_DIR)
16 endif
17 KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
18
19 $(PKG_BUILD_DIR)/.prepared:
20 mkdir -p $(PKG_BUILD_DIR)
21 cp -fpR ./src/* $(PKG_BUILD_DIR)/
22 touch $@
23
24 $(PKG_BUILD_DIR)/.configured:
25 touch $@
26
27 $(PKG_BUILD_DIR)/.built:
28 $(MAKE) -C $(PKG_BUILD_DIR) \
29 PATH="$(TARGET_PATH)" \
30 ARCH="$(LINUX_KARCH)" \
31 CROSS_COMPILE="$(TARGET_CROSS)" \
32 KERNEL_VERSION="$(KERNEL_VERSION)" \
33 KERNEL_DIR="$(KERNEL_DIR)" \
34 EXTRA_CFLAGS="-DBCMGPIO2" \
35 all
36 touch $@
37
38 $(IPKG_KMOD_SWITCH):
39 install -m0755 -d $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION)
40 install -m0755 -d $(IDIR_KMOD_SWITCH)/etc/modules.d
41 cp -fpR $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \
42 $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION)
43 echo "switch-core" > $(IDIR_KMOD_SWITCH)/etc/modules.d/05-switch
44 echo "switch-robo" >> $(IDIR_KMOD_SWITCH)/etc/modules.d/05-switch
45 echo "switch-adm" >> $(IDIR_KMOD_SWITCH)/etc/modules.d/05-switch
46 $(IPKG_BUILD) $(IDIR_KMOD_SWITCH) $(PACKAGE_DIR)
47
This page took 0.036408 seconds and 3 git commands to generate.