move diag from target/linux/package/ to package/.
[openwrt-10.03/.git] / package / diag / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include $(TOPDIR)/package/kernel.mk
5
6 PKG_NAME := kmod-diag
7 PKG_RELEASE := 1
8 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
9
10 include $(TOPDIR)/package/rules.mk
11
12 DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
13                 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
14                 -Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \
15                 -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -c -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER
16
17 define Package/kmod-diag
18  SECTION:=drivers
19  CATEGORY:=Drivers
20  DEFAULT:=y
21  DEPENDS:=@LINUX_2_4_BRCM
22  TITLE:=Driver for router LEDs and Buttons
23  DESCRIPTION:=Driver for router LEDs and Buttons
24  URL:=
25  VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
26 endef
27
28 define Build/Compile
29         $(TARGET_CC) $(DIAG_FLAGS) -o $(PKG_BUILD_DIR)/diag.o diag_led.c
30 endef
31         
32 define Package/kmod-diag/install
33         install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
34         $(CP) $(PKG_BUILD_DIR)/diag.o $(1)/lib/modules/$(LINUX_VERSION)/
35 endef
36
37 $(eval $(call BuildPackage,kmod-diag))