summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-01-13 00:19:51 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-01-13 00:19:51 +0000
commit9966020be0c969e96e5ae2a5a12890bc99bda6cb (patch)
treee8cb03091d6896991b938c943fc896da938c7557 /Makefile
parent816629b43b04fb722869f1d974a1ef6fb8862e0a (diff)
Use kbuild for ALL portions of 2.6 install/cleanup (#4962) last one!!! :-)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@900 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 45f4735..9b484f1 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,9 @@ endif
KFLAGS+=-DSTANDALONE_ZAPATA
CFLAGS+=-DSTANDALONE_ZAPATA
+KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)
+KMAKE_INST = $(KMAKE) \
+ INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
ROOT_PREFIX=
INSTALL_PREFIX=$(DESTDIR)
@@ -180,9 +183,9 @@ linux24: $(MODULESO) $(BINS)
linux26: prereq $(BINS)
@echo $(KSRC)
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
- $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
+ $(KMAKE) modules
-obj-m := $(MODULESO)
+obj-m += $(MODULESO)
#ifneq ($(TOPDIR),)
#include $(TOPDIR)/Rules.make
@@ -345,7 +348,7 @@ install: all devices
for x in $(MODULESKO); do \
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/extra/$$x ; \
done; \
- $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install; \
+ $(KMAKE_INST); \
if ! [ -f wcfxsusb.ko ]; then \
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxsusb.ko; \
fi; \
@@ -470,16 +473,22 @@ install-programs: $(BINS) $(LIBTONEZONE) libtonezone.a
install -m 644 tonezone.h $(INC_DIR)
install -m 644 zaptel.h torisa.h $(INC_DIR)/linux
-install-modules: $(MODULES_BUILD)
+install-modules: install-$(BUILDVER)
+install-linux24: $(MODULES_BUILD)
install -d $(MOD_DIR)
install -m 644 $(MODULES_BUILD) $(MOD_DIR)
+install-linux26: $(MODULESKO)
+ $(KMAKE_INST)
+
clean:
rm -f torisatool makefw tor2fw.h radfw.h
rm -f ${BINS}
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
- rm -f *.ko *.mod.c .*o.cmd
+ifeq (${BUILDVER},linux26)
+ $(KMAKE) clean
+endif
rm -rf .tmp_versions
rm -f gendigits tones.h
rm -f libtonezone*