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 $(DESTDIR)/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 139-145
Link Here
|
139 |
endif |
146 |
endif |
140 |
|
147 |
|
141 |
OPTFLAG=-O2 |
148 |
OPTFLAG=-O2 |
142 |
CFLAGS+=-I. $(OPTFLAGS) -g -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER |
149 |
CFLAGS+=-I. $(OPTFLAGS) -Iinclude -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER |
143 |
ifneq (,$(findstring ppc,$(UNAME_M))) |
150 |
ifneq (,$(findstring ppc,$(UNAME_M))) |
144 |
CFLAGS_PPC:=-fsigned-char |
151 |
CFLAGS_PPC:=-fsigned-char |
145 |
endif |
152 |
endif |
Lines 438-444
Link Here
|
438 |
$(UTILSO): %.o: %.c |
445 |
$(UTILSO): %.o: %.c |
439 |
$(CC) $(CFLAGS) -o $@ -c $< |
446 |
$(CC) $(CFLAGS) -o $@ -c $< |
440 |
|
447 |
|
441 |
install: all devices install-modules install-programs install-firmware |
448 |
install: devices install-modules install-programs install-firmware |
442 |
@echo "###################################################" |
449 |
@echo "###################################################" |
443 |
@echo "###" |
450 |
@echo "###" |
444 |
@echo "### Zaptel installed successfully." |
451 |
@echo "### Zaptel installed successfully." |
Lines 451-474
Link Here
|
451 |
install-programs: install-utils install-libs install-include |
458 |
install-programs: install-utils install-libs install-include |
452 |
|
459 |
|
453 |
install-utils: utils install-xpp |
460 |
install-utils: utils install-xpp |
454 |
install -d $(DESTDIR)$(BIN_DIR) |
461 |
$(INSTALL) -d $(DESTDIR)$(BIN_DIR) |
455 |
install $(BINS) $(DESTDIR)$(BIN_DIR)/ |
462 |
$(INSTALL) $(BINS) $(DESTDIR)$(BIN_DIR)/ |
456 |
install -d $(DESTDIR)$(MAN_DIR) |
463 |
$(INSTALL) -d $(DESTDIR)$(MAN_DIR) |
457 |
install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/ |
464 |
$(INSTALL) -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/ |
458 |
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE))) |
465 |
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE))) |
459 |
$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE) |
466 |
$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE) |
460 |
endif |
467 |
endif |
461 |
|
468 |
|
462 |
# Pushing those two to a separate target that is not used by default: |
469 |
# Pushing those two to a separate target that is not used by default: |
463 |
install-modconf: |
470 |
install-modconf: |
464 |
build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)" |
471 |
$(INSTALL) -d -m 755 $(DESTDIR)/etc/modules.d |
465 |
@if [ -d /etc/modutils ]; then \ |
472 |
build_tools/genmodconf $(BUILDVER) "$(DESTDIR)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)" |
466 |
/sbin/update-modules ; \ |
|
|
467 |
fi |
468 |
|
473 |
|
469 |
install-firmware: |
474 |
install-firmware: |
470 |
ifeq ($(HOTPLUG_FIRMWARE),yes) |
475 |
ifeq ($(HOTPLUG_FIRMWARE),yes) |
471 |
$(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR) |
476 |
$(MAKE) -C firmware hotplug-install |
472 |
endif |
477 |
endif |
473 |
|
478 |
|
474 |
install-libs: libs |
479 |
install-libs: libs |
Lines 476-482
Link Here
|
476 |
$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) |
481 |
$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) |
477 |
ifeq (,$(DESTDIR)) |
482 |
ifeq (,$(DESTDIR)) |
478 |
if [ `id -u` = 0 ]; then \ |
483 |
if [ `id -u` = 0 ]; then \ |
479 |
/sbin/ldconfig || : ;\ |
484 |
/sbin/ldconfig -n $(DESTDIR)/usr/lib || : ;\ |
480 |
fi |
485 |
fi |
481 |
endif |
486 |
endif |
482 |
rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO) |
487 |
rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO) |
Lines 522-529
Link Here
|
522 |
done |
527 |
done |
523 |
else # DYNFS |
528 |
else # DYNFS |
524 |
ifdef UDEVRULES |
529 |
ifdef UDEVRULES |
525 |
install -d $(DESTDIR)/etc/udev/rules.d |
530 |
$(INSTALL) -d $(DESTDIR)/etc/udev/rules.d |
526 |
build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules |
531 |
build_tools/genudevrules > zaptel.rules |
|
|
532 |
$(INSTALL) -D -m 644 zaptel.rules $(DESTDIR)/etc/udev/rules.d/10-zaptel.rules |
527 |
else # !UDEVRULES |
533 |
else # !UDEVRULES |
528 |
@echo "**** Dynamic filesystem detected -- not creating device nodes" |
534 |
@echo "**** Dynamic filesystem detected -- not creating device nodes" |
529 |
endif |
535 |
endif |
Lines 554-560
Link Here
|
554 |
$(MAKE) -C datamods install |
560 |
$(MAKE) -C datamods install |
555 |
endif |
561 |
endif |
556 |
endif |
562 |
endif |
557 |
[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : |
563 |
[ -z "$(DESTDIR)" -a `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : |
558 |
|
564 |
|
559 |
config: |
565 |
config: |
560 |
ifneq (,$(COPY_INITD)) |
566 |
ifneq (,$(COPY_INITD)) |