Lines 40-52
Link Here
|
40 |
BUILDVER:=linux26 |
40 |
BUILDVER:=linux26 |
41 |
endif |
41 |
endif |
42 |
|
42 |
|
|
|
43 |
# This is not related to the version that we build. Rather, to the |
44 |
# version that we runs. If we build for 2.4 using 2.4 headers on a 2.6 |
45 |
# system with udev mounted on /dev , no point in installing files to /dev |
46 |
# because they'll be wiped at next reboot. XXX: should this be a use-flag? Perhaps: noudev? |
47 |
DYNFS:=$(shell ps ax | grep -v grep | grep -qw 'devfsd\|udevd' && echo "yes") |
48 |
|
49 |
# Check for udev rules directories |
50 |
ifneq (,$(wildcard $(ROOT_PREFIX)/etc/udev/rules.d)) |
51 |
UDEVRULES=yes |
52 |
endif |
53 |
|
43 |
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support |
54 |
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support |
44 |
# if it is enabled in the kernel. |
55 |
# if it is enabled in the kernel. |
45 |
ifeq ($(BUILDVER),linux26) |
56 |
ifeq ($(BUILDVER),linux26) |
46 |
ifneq (,$(wildcard $(INSTALL_PREFIX)/etc/udev/rules.d)) |
|
|
47 |
DYNFS=yes |
48 |
UDEVRULES=yes |
49 |
endif |
50 |
HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi) |
57 |
HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi) |
51 |
else |
58 |
else |
52 |
# Hotplug firmware loading is not supported on any other version then 2.6 |
59 |
# Hotplug firmware loading is not supported on any other version then 2.6 |
Lines 136-142
Link Here
|
136 |
ALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp) |
143 |
ALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp) |
137 |
endif |
144 |
endif |
138 |
|
145 |
|
139 |
CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER |
146 |
CFLAGS+=-I. -Iinclude -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER |
140 |
ifneq (,$(findstring ppc,$(UNAME_M))) |
147 |
ifneq (,$(findstring ppc,$(UNAME_M))) |
141 |
CFLAGS_PPC:=-fsigned-char |
148 |
CFLAGS_PPC:=-fsigned-char |
142 |
endif |
149 |
endif |
Lines 386-392
Link Here
|
386 |
$(UTILSO): %.o: %.c |
393 |
$(UTILSO): %.o: %.c |
387 |
$(CC) $(CFLAGS) -o $@ -c $< |
394 |
$(CC) $(CFLAGS) -o $@ -c $< |
388 |
|
395 |
|
389 |
install: all devices install-modules install-libs install-include install-xpp |
396 |
install: devices install-modules install-libs install-include install-xpp |
390 |
ifeq ($(HOTPLUG_FIRMWARE),yes) |
397 |
ifeq ($(HOTPLUG_FIRMWARE),yes) |
391 |
$(MAKE) -C firmware hotplug-install |
398 |
$(MAKE) -C firmware hotplug-install |
392 |
endif |
399 |
endif |
Lines 401-420
Link Here
|
401 |
if [ -f zttool ]; then \ |
408 |
if [ -f zttool ]; then \ |
402 |
$(INSTALL) -D -m 755 zttool $(INSTALL_PREFIX)/sbin/zttool; \ |
409 |
$(INSTALL) -D -m 755 zttool $(INSTALL_PREFIX)/sbin/zttool; \ |
403 |
fi |
410 |
fi |
|
|
411 |
install -d $(INSTALL_PREFIX)/usr/share/man/man8 |
404 |
$(INSTALL) -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8 |
412 |
$(INSTALL) -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8 |
405 |
$(INSTALL) -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8 |
413 |
$(INSTALL) -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8 |
406 |
[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : |
414 |
[ -z "$(INSTALL_PREFIX)" -a `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : |
407 |
[ -f $(CONFIG_FILE) ] || $(INSTALL) -D -m 644 zaptel.conf.sample $(CONFIG_FILE) |
415 |
[ -f $(CONFIG_FILE) ] || $(INSTALL) -D -m 644 zaptel.conf.sample $(CONFIG_FILE) |
408 |
build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)" |
416 |
install -d -m 755 $(INSTALL_PREFIX)/etc/modules.d |
409 |
@if [ -d /etc/modutils ]; then \ |
417 |
build_tools/genmodconf $(BUILDVER) "$(INSTALL_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)" |
410 |
/sbin/update-modules ; \ |
|
|
411 |
fi |
412 |
|
418 |
|
413 |
install-libs: $(LTZ_SO) $(LTZ_A) |
419 |
install-libs: $(LTZ_SO) $(LTZ_A) |
414 |
$(INSTALL) -D -m 755 $(LTZ_A) $(LIB_DIR)/$(LTZ_A) |
420 |
$(INSTALL) -D -m 755 $(LTZ_A) $(LIB_DIR)/$(LTZ_A) |
415 |
$(INSTALL) -D -m 755 $(LTZ_SO) $(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) |
421 |
$(INSTALL) -D -m 755 $(LTZ_SO) $(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) |
416 |
if [ -z "$(INSTALL_PREFIX)" -a `id -u` = 0 ]; then \ |
422 |
if [ `id -u` = 0 ]; then \ |
417 |
/sbin/ldconfig || : ;\ |
423 |
/sbin/ldconfig -n "$(INSTALL_PREFIX)"/usr/lib || : ;\ |
418 |
fi |
424 |
fi |
419 |
rm -f $(LIB_DIR)$(LTZ_SO) |
425 |
rm -f $(LIB_DIR)$(LTZ_SO) |
420 |
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \ |
426 |
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \ |
Lines 425-431
Link Here
|
425 |
|
431 |
|
426 |
install-xpp: |
432 |
install-xpp: |
427 |
ifeq (yes,$(BUILD_XPP)) |
433 |
ifeq (yes,$(BUILD_XPP)) |
428 |
@$(MAKE) -C xpp/utils install |
434 |
@$(MAKE) DESTDIR="$(INSTALL_PREFIX)" -C xpp/utils install |
429 |
endif |
435 |
endif |
430 |
|
436 |
|
431 |
install-include: |
437 |
install-include: |
Lines 463-469
Link Here
|
463 |
else # DYNFS |
469 |
else # DYNFS |
464 |
ifdef UDEVRULES |
470 |
ifdef UDEVRULES |
465 |
install -d $(INSTALL_PREFIX)/etc/udev/rules.d |
471 |
install -d $(INSTALL_PREFIX)/etc/udev/rules.d |
466 |
build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules |
472 |
build_tools/genudevrules > zaptel.rules |
|
|
473 |
install -D -m 644 zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d/10-zaptel.rules |
467 |
else # !UDEVRULES |
474 |
else # !UDEVRULES |
468 |
@echo "**** Dynamic filesystem detected -- not creating device nodes" |
475 |
@echo "**** Dynamic filesystem detected -- not creating device nodes" |
469 |
endif |
476 |
endif |