fix wlcompat menuconfig dependencies
[openwrt.git] / openwrt / target / linux / package / wlcompat / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := kmod-wlcompat
6 PKG_RELEASE := 3
7 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
8
9 include $(TOPDIR)/package/rules.mk
10
11 $(eval $(call PKG_template,KMOD_WLCOMPAT,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
12 $(eval $(call PKG_template,KMOD_WLCOMPAT_DEBUG,$(PKG_NAME)-debug,$(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
18 WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
19 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
20 -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \
21 -iwithprefix include -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/include/asm/gcc -I$(STAGING_DIR)/usr/include -c
22
23 $(PKG_BUILD_DIR)/.prepared:
24 mkdir -p $(PKG_BUILD_DIR)
25 touch $@
26
27 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o
28 touch $@
29
30 $(PKG_BUILD_DIR)/wlcompat.o: $(PKG_BUILD_DIR)/.prepared
31 $(TARGET_CC) $(WLCOMPAT_FLAGS) -o $@ wlcompat.c
32
33 $(PKG_BUILD_DIR)/wlcompat-debug.o: $(PKG_BUILD_DIR)/.prepared
34 $(TARGET_CC) -DDEBUG $(WLCOMPAT_FLAGS) -o $@ wlcompat.c
35
36 $(IPKG_KMOD_WLCOMPAT): $(PKG_BUILD_DIR)/wlcompat.o
37 mkdir -p $(IDIR_KMOD_WLCOMPAT)/etc/modules.d
38 echo "wlcompat" > $(IDIR_KMOD_WLCOMPAT)/etc/modules.d/10-wlcompat
39 mkdir -p $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)
40 cp $(PKG_BUILD_DIR)/wlcompat.o $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)/
41 $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT) $(PACKAGE_DIR)
42
43 $(IPKG_KMOD_WLCOMPAT_DEBUG): $(PKG_BUILD_DIR)/wlcompat-debug.o
44 mkdir -p $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)
45 cp $(PKG_BUILD_DIR)/wlcompat-debug.o $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)/
46 $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT_DEBUG) $(PACKAGE_DIR)
47
This page took 0.045904 seconds and 5 git commands to generate.