fix switch driver makefiles for 2.4
[openwrt/svn-archive/archive.git] / openwrt / target / linux / package / switch / src / Makefile
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