2006-01-24 22:30:10 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# asterisk
|
|
|
|
#
|
|
|
|
##############################################################
|
2008-03-26 04:28:09 +01:00
|
|
|
ASTERISK_VERSION:=1.6.0-beta6
|
2007-09-17 14:30:31 +02:00
|
|
|
ASTERISK_SOURCE:=asterisk-$(ASTERISK_VERSION).tar.gz
|
2008-03-26 04:28:09 +01:00
|
|
|
ASTERISK_SITE:=http://downloads.digium.com/pub/asterisk/old-releases
|
2007-09-17 14:30:31 +02:00
|
|
|
ASTERISK_DIR:=$(BUILD_DIR)/asterisk-$(ASTERISK_VERSION)
|
|
|
|
ASTERISK_BINARY:=asterisk
|
|
|
|
ASTERISK_TARGET_BINARY:=usr/sbin/asterisk
|
2006-01-24 22:30:10 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(ASTERISK_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(ASTERISK_SITE)/$(ASTERISK_SOURCE)
|
|
|
|
|
|
|
|
$(ASTERISK_DIR)/.source: $(DL_DIR)/$(ASTERISK_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(ASTERISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2006-01-24 22:30:10 +01:00
|
|
|
toolchain/patch-kernel.sh $(ASTERISK_DIR) package/asterisk/ asterisk\*.patch
|
2007-09-17 14:30:31 +02:00
|
|
|
touch $@
|
2006-01-24 22:30:10 +01:00
|
|
|
|
|
|
|
$(ASTERISK_DIR)/.configured: $(ASTERISK_DIR)/.source
|
2007-09-17 14:30:31 +02:00
|
|
|
touch $@
|
2006-01-24 22:30:10 +01:00
|
|
|
|
|
|
|
$(ASTERISK_DIR)/$(ASTERISK_BINARY): $(ASTERISK_DIR)/.configured
|
2007-09-17 14:30:31 +02:00
|
|
|
$(MAKE1) -C $(ASTERISK_DIR) \
|
|
|
|
CROSS_ARCH=Linux \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CROSS_COMPILE_BIN=$(STAGING_DIR)/bin/ \
|
|
|
|
CROSS_COMPILE_TARGET=$(STAGING_DIR) \
|
|
|
|
CROSS_PROC=$(OPTIMIZE_FOR_CPU) \
|
|
|
|
OPTIMIZE="$(TARGET_OPTIMIZATION)" \
|
|
|
|
OPTIONS=-DLOW_MEMORY \
|
|
|
|
DEBUG= \
|
|
|
|
$(TARGET_CONFIGURE_OPTS)
|
2006-01-24 22:30:10 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(ASTERISK_TARGET_BINARY): $(ASTERISK_DIR)/$(ASTERISK_BINARY)
|
2007-09-17 14:30:31 +02:00
|
|
|
$(MAKE) -C $(ASTERISK_DIR) \
|
|
|
|
CROSS_ARCH=Linux \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CROSS_COMPILE_BIN=$(TARGET_CC) \
|
|
|
|
CROSS_COMPILE_TARGET=$(STAGING_DIR) \
|
|
|
|
CROSS_PROC=$(OPTIMIZE_FOR_CPU) \
|
|
|
|
OPTIMIZE="$(TARGET_OPTIMIZATION)" \
|
|
|
|
OPTIONS=-DLOW_MEMORY \
|
|
|
|
DEBUG= \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
DESTDIR=$(TARGET_DIR) install
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/sbin/asterisk
|
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/sbin/stereorize
|
|
|
|
$(STRIPCMD) $(TARGET_DIR)/usr/sbin/streamplayer
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) \
|
2007-09-17 14:30:31 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/asterisk/modules/*.so
|
|
|
|
$(INSTALL) -m 755 $(ASTERISK_DIR)/contrib/init.d/rc.debian.asterisk \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S60asterisk
|
2007-08-12 00:26:56 +02:00
|
|
|
mv $(TARGET_DIR)/usr/include/asterisk $(STAGING_DIR)/usr/include/
|
2007-09-17 14:30:31 +02:00
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
2006-01-24 22:30:10 +01:00
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/man
|
2007-09-17 14:30:31 +02:00
|
|
|
endif
|
2006-01-24 22:30:10 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/safe_asterisk
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/autosupport
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/astgenkey
|
2007-09-17 14:30:31 +02:00
|
|
|
touch -c $@
|
2006-01-24 22:30:10 +01:00
|
|
|
|
|
|
|
asterisk: uclibc ncurses zlib openssl mpg123 $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY)
|
|
|
|
|
|
|
|
asterisk-source: $(DL_DIR)/$(ASTERISK_SOURCE)
|
|
|
|
|
|
|
|
asterisk-clean:
|
2007-08-12 00:26:56 +02:00
|
|
|
rm -Rf $(STAGING_DIR)/usr/include/asterisk
|
2006-01-24 22:30:10 +01:00
|
|
|
rm -Rf $(TARGET_DIR)/etc/asterisk
|
|
|
|
rm -Rf $(TARGET_DIR)/usr/lib/asterisk
|
|
|
|
rm -Rf $(TARGET_DIR)/var/lib/asterisk
|
|
|
|
rm -Rf $(TARGET_DIR)/var/spool/asterisk
|
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S60asterisk
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/stereorize
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/streamplayer
|
|
|
|
-$(MAKE) -C $(ASTERISK_DIR) clean
|
|
|
|
|
|
|
|
asterisk-dirclean:
|
|
|
|
rm -rf $(ASTERISK_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_ASTERISK)),y)
|
|
|
|
TARGETS+=asterisk
|
|
|
|
endif
|