47908f0866a0338e1f67dba61f3c2897f1f3d20c
[openwrt.git] / target / linux / package / diag / Makefile
1 # Makefile for the diag module
2 #
3 # $Id$
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME := kmod-diag
8 PKG_RELEASE := 1
9 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
10
11 include $(TOPDIR)/package/rules.mk
12
13 $(eval $(call PKG_template,KMOD_DIAG,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
14
15 ifeq ($(KERNEL_DIR),)
16 KERNEL_DIR:=$(LINUX_DIR)
17 endif
18
19 DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
20 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
21 -Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \
22 -iwithprefix include -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/include/asm/gcc -c -I$(KERNEL_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER
23
24 $(PKG_BUILD_DIR)/.prepared:
25 mkdir -p $(PKG_BUILD_DIR)
26 touch $@
27
28 $(PKG_BUILD_DIR)/.built:
29 $(TARGET_CC) $(DIAG_FLAGS) -o $(PKG_BUILD_DIR)/diag.o diag_led.c
30 touch $@
31
32 $(IPKG_KMOD_DIAG):
33 mkdir -p $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)
34 cp $(PKG_BUILD_DIR)/diag.o $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)/
35 $(IPKG_BUILD) $(IDIR_KMOD_DIAG) $(PACKAGE_DIR)
This page took 0.060893 seconds and 3 git commands to generate.