| # |
| # Copyright (C) 2007 OpenWrt.org |
| # |
| # This is free software, licensed under the GNU General Public License v2. |
| # See /LICENSE for more information. |
| # |
| # |
| |
| include $(TOPDIR)/rules.mk |
| include $(INCLUDE_DIR)/kernel.mk |
| |
| PKG_NAME:=opt-cmd-36 |
| PKG_VERSION:=1 |
| |
| PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) |
| PREBUILT_DIR:=$(CURDIR)/files |
| |
| PKG_MAINTAINER:=<you.chen@mobiletek.cn> |
| |
| include $(INCLUDE_DIR)/package.mk |
| |
| define KernelPackage/opt-cmd-36 |
| TITLE:=Mbtk Optimize command 36 |
| DEPENDS:=@TARGET_mmp |
| FILES:=$(PKG_BUILD_DIR)/opt_cmd_36.ko |
| VERSION:=$(LINUX_VERSION)+$(PKG_NAME)-$(PKG_VERSION) |
| endef |
| |
| define KernelPackage/opt_cmd_36/description |
| Kernel support for Optimize command 36 |
| endef |
| |
| EXTRA_CFLAGS:= \ |
| |
| |
| MAKE_CMD:=$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ |
| ARCH="$(LINUX_KARCH)" \ |
| CROSS_COMPILE="$(TARGET_CROSS)" \ |
| M="$(PKG_BUILD_DIR)" \ |
| cmd_ar='rm -f $$$$@; $(TARGET_CROSS)ar cDrs $$$$@ $$$$(real-prereqs)' \ |
| EXTRA_CFLAGS="$(EXTRA_CFLAGS)" |
| |
| |
| CLEAN_CMD:=rm -rf $(PKG_BUILD_DIR)/{*.o,*.mod.*,modules.order,Module.symvers,ipkg-*,*.ko,*.a,ipkg-*} \ |
| rm -rf $(MRVLDIR)/fastpath/{*.o,*.mod.*,modules.order,Module.symvers,ipkg-*,*.ko,*.a,ipkg-*} |
| |
| define Build/Prepare/Prebuilt |
| @rm -rf $(PKG_BUILD_DIR) |
| endef |
| |
| $(STAMP_PREPARED): FORCE |
| |
| define Build/Prepare |
| @mkdir -p $(PKG_BUILD_DIR) |
| @cp -rf $(PREBUILT_DIR)/* $(PKG_BUILD_DIR) |
| endef |
| |
| define Build/Compile |
| $(MAKE_CMD) modules |
| mkdir -p $(BIN_DIR)/symbol/modules |
| cp -rf $(PKG_BUILD_DIR)/opt_cmd_36.o $(BIN_DIR)/symbol/modules/ |
| endef |
| |
| define Build/Clean |
| $(if $(wildcard $(USE_SOURCE_DIR)), $(CLEAN_CMD),) |
| endef |
| |
| $(eval $(call KernelPackage,opt-cmd-36)) |