[zaptel-commits] kpfleming: branch 1.4 r2336 - /branches/1.4/Makefile

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Thu Mar 22 19:11:13 MST 2007


Author: kpfleming
Date: Thu Mar 22 21:11:12 2007
New Revision: 2336

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2336
Log:
fix builds for 2.4 kernels

Modified:
    branches/1.4/Makefile

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=2336&r1=2335&r2=2336
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Thu Mar 22 21:11:12 2007
@@ -10,6 +10,8 @@
 ifeq ($(MAKELEVEL),0)
 PWD:=$(shell pwd)
 endif
+
+ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
 
 ifeq ($(DEB_HOST_GNU_TYPE),)
 UNAME_M:=$(shell uname -m)
@@ -119,7 +121,7 @@
 
 ifeq ($(BUILDVER),linux24)
   INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=%.o)
-  INSTALL_MODULES+=$(BUILD_SUBDIR_MODULES:%=%/%.o)
+  INSTALL_MODULES+=$(foreach mod,$(BUILD_SUBDIR_MODULES),$(mod)/$(mod).o)
   ALL_MODULES:=$(TOPDIR_MODULES:%=%.o)
   ALL_MODULES+=$(SUBDIR_MODULES:%=%/%.o)
 else
@@ -224,7 +226,20 @@
 ifeq ($(BUILDVER),linux26)
 	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
 else
-modules: $(BUILD_MODULES)
+modules: $(INSTALL_MODULES)
+endif
+
+ifeq ($(HPEC_PRESENT),yes)
+ifeq ($(ARCH),i386)
+ZAPTEL_HPEC:=hpec/hpec_x86_32.o_shipped
+endif
+
+ifeq ($(ARCH),x86_64)
+ZAPTEL_HPEC:=hpec/hpec_x86_64.o_shipped
+endif
+
+KFLAGS+=-DECHO_CAN_HPEC -I$(PWD)/hpec
+zaptel-base.o: hpec/hpec_zaptel.h hpec/hpec_user.h
 endif
 
 version.h:
@@ -319,7 +334,7 @@
 
 tor2.o: tor2-hw.h tor2fw.h
 
-zaptel.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
+zaptel-base.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
 
 wcusb.o: wcusb.h
 
@@ -333,7 +348,10 @@
 
 ztdummy.o: ztdummy.h
 
-$(BUILD_MODULES): %.o: %.c zaptel.h
+zaptel.o: zaptel-base.o $(ZAPTEL_HPEC)
+	$(LD) -r -o $@ $< $(ZAPTEL_HPEC)
+
+$(filter-out zaptel.o,$(BUILD_TOPDIR_MODULES:%=%.o)) zaptel-base.o: %.o: %.c zaptel.h
 	$(CC) $(KFLAGS) -o $@ -c $<
 
 zaptel.c: tones.h



More information about the zaptel-commits mailing list