summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 724a9d9..ca89393 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,13 @@
#
#
+ifneq ($(KBUILD_EXTMOD),)
+# We only get in here if we're from kernel 2.6 <= 2.6.8 and going through
+# Kbuild. Later versions will include Kbuild instead of Makefile.
+include Kbuild
+
+else
+
CFLAGS+=-DSTANDALONE_ZAPATA -DBUILDING_TONEZONE
ifeq ($(MAKELEVEL),0)
@@ -127,6 +134,7 @@ obj-m+=$(BUILD_SUBDIR_MODULES:%=%/)
include $(src)/Makefile.kernel26
else
+KBUILD_OBJ_M=$(BUILD_TOPDIR_MODULES:%=%.o) $(BUILD_SUBDIR_MODULES:%=%/)
ifeq ($(BUILDVER),linux24)
INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=%.o)
@@ -178,7 +186,8 @@ MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
KFLAGS+=-DSTANDALONE_ZAPATA
CFLAGS+=-DSTANDALONE_ZAPATA
-KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
+KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) \
+ HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
KMAKE_INST = $(KMAKE) \
INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
@@ -674,3 +683,6 @@ menuselect-tree: zaptel.xml firmware/firmware.xml
.PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
endif
+
+#end of: ifneq ($(KBUILD_EXTMOD),)
+endif