summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kbuild6
-rw-r--r--Makefile30
-rw-r--r--drivers/dahdi/Kbuild2
3 files changed, 11 insertions, 27 deletions
diff --git a/Kbuild b/Kbuild
deleted file mode 100644
index f6a31e9..0000000
--- a/Kbuild
+++ /dev/null
@@ -1,6 +0,0 @@
-obj-m += drivers/dahdi/
-header-y += include/dahdi/
-
-# ensure that our local include files can be found by all modules
-
-CFLAGS_MODULE += -I$(DAHDI_INCLUDE)
diff --git a/Makefile b/Makefile
index aa8c193..493cdc6 100644
--- a/Makefile
+++ b/Makefile
@@ -5,20 +5,6 @@
#
#
-# This Makefile is used both by the kernel build system (to set
-# a number of variables before descending into the real module
-# build directory) and by the top-level 'make' process. We can
-# determine which mode is needed by checking the KBUILD_EXTMOD
-# variable, although on reasonably new kernels the kernel build
-# system won't even use this file, it will just use the Kbuild
-# file directly.
-
-ifdef KBUILD_EXTMOD
-
-include $(src)/Kbuild
-
-else
-
PWD:=$(shell pwd)
ifndef ARCH
@@ -69,7 +55,7 @@ endif
MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
-KMAKE = $(MAKE) -C $(KSRC) ARCH=$(ARCH) SUBDIRS=$(PWD) DAHDI_INCLUDE=$(PWD)/include HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
+KMAKE=$(MAKE) -C $(KSRC) ARCH=$(ARCH) SUBDIRS=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
DYNFS=yes
@@ -81,7 +67,7 @@ ifneq ($(wildcard .version),)
DAHDIVERSION:=$(shell cat .version)
else
ifneq ($(wildcard .svn),)
- DAHDIVERSION=$(shell build_tools/make_version . dahdi/linux)
+ DAHDIVERSION:=$(shell build_tools/make_version . dahdi/linux)
endif
endif
@@ -167,9 +153,9 @@ uninstall-hotplug:
$(MAKE) -C drivers/dahdi/firmware hotplug-uninstall DESTDIR=$(DESTDIR)
uninstall-modules:
- @./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(ALL_MODULES)
+ @build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS)
-install-modules: modules
+install-modules: modules #uninstall-modules
$(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install
[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
@@ -197,6 +183,10 @@ dist-clean: clean
@rm -f include/dahdi/version.h
@$(MAKE) -C drivers/dahdi/firmware dist-clean
-.PHONY: distclean dist-clean clean version.h all install devices modules stackcheck install-udev update install-modules install-include uninstall-modules
+firmware-download:
+ @$(MAKE) -C drivers/dahdi/firmware all
+
+test:
+ ./test-script $(DESTDIR)/lib/modules/$(KVERS) dahdi
-endif # ifdef KBUILD_EXTMOD
+.PHONY: distclean dist-clean clean version.h all install devices modules stackcheck install-udev update install-modules install-include uninstall-modules firmware-download
diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
index 0157d83..8eddc16 100644
--- a/drivers/dahdi/Kbuild
+++ b/drivers/dahdi/Kbuild
@@ -26,7 +26,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE2) += dahdi_echocan_sec2.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1) += dahdi_echocan_kb1.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2) += dahdi_echocan_mg2.o
-CFLAGS_MODULE += -I$(src)
+CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src)
ifndef HOTPLUG_FIRMWARE
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))