fix switch driver makefiles for 2.4
authorFelix Fietkau <nbd@openwrt.org>
Sun, 25 Dec 2005 15:15:32 +0000 (15:15 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 25 Dec 2005 15:15:32 +0000 (15:15 +0000)
SVN-Revision: 2779

openwrt/target/linux/package/switch/Makefile
openwrt/target/linux/package/switch/src/Makefile

index 0d597b1f5d922a36117195a2be4a3dbcf073d06a..0db826d64a64f08bb28a9544012b433e573028c9 100644 (file)
@@ -25,14 +25,13 @@ $(PKG_BUILD_DIR)/.configured:
        touch $@
 
 $(PKG_BUILD_DIR)/.built:
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               PATH="$(TARGET_PATH)" \
-               ARCH="$(LINUX_KARCH)" \
+       $(MAKE) -C "$(LINUX_DIR)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
-               KERNEL_VERSION="$(KERNEL_VERSION)" \
-               KERNEL_DIR="$(KERNEL_DIR)" \
+               ARCH="$(LINUX_KARCH)" \
+               PATH="$(TARGET_PATH)" \
+               SUBDIRS="$(PKG_BUILD_DIR)" \
                EXTRA_CFLAGS="-DBCMGPIO2" \
-               all
+               modules
        touch $@
        
 $(IPKG_KMOD_SWITCH):
index dd8a426ec2728547acbcdb8bee9d785771be5ea9..e4b2b7f38bdbbd0bd2fb77cd1ea062209f7654cb 100644 (file)
 # 2 of the License, or (at your option) any later version.
 #
 
-KERNEL_VERSION = $(shell uname -r | cut -d. -f1,2)
-
 obj-m  := switch-core.o switch-adm.o switch-robo.o
+export-objs := switch-core.o
 
-ifeq ($(KERNEL_VERSION),2.4)
-
-O_TARGET := $(obj-m)
-
+ifeq ($(MAKING_MODULES),1)
 -include $(TOPDIR)/Rules.make
-
 endif
-
-all: modules
-
-modules:
-       $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) TOPDIR="$(KERNEL_DIR)" modules