asterisk-13.x: clean up compile stage
- Don't add extra TARGET_LDFLAGS for asterisk13-pbx-lua. It is not needed anymore (apart from that the module isn't available currently, see next commit). - Stop setting -Wl,-rpath-link in LDFLAGS. There is no point to do that. - Stop calling specific make targets like version.h; make handles the build properly without it. - Use the default compile routine instead of the custom one. - Add AST_FORTIFY_SOURCE to MAKE_FLAGS (seen in Debian rules file, prevents asterisk's build system to mess with OpenWrt/LEDE flags). - Remove $(SITE_VARS) (unused) - Remove $(SDK) from ifneq. The variable prevents the ifneq from working on the buildbots. $(SDK) is set there, so the ifneqs that test for empty will always be true. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
parent
a430a3a59b
commit
6fba6f38a5
1 changed files with 20 additions and 20 deletions
|
@ -168,7 +168,7 @@ define Package/asterisk13-sounds/install
|
||||||
rm -f $(1)/usr/share/asterisk/sounds/vm-*
|
rm -f $(1)/usr/share/asterisk/sounds/vm-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk13-chan-dahdi),)
|
ifneq ($(CONFIG_PACKAGE_asterisk13-chan-dahdi),)
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--with-dahdi="$(STAGING_DIR)/usr" \
|
--with-dahdi="$(STAGING_DIR)/usr" \
|
||||||
--with-pri="$(STAGING_DIR)/usr" \
|
--with-pri="$(STAGING_DIR)/usr" \
|
||||||
|
@ -180,11 +180,9 @@ else
|
||||||
--without-tonezone
|
--without-tonezone
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_LDFLAGS+= \
|
# Pass CPPFLAGS in the CFLAGS as otherwise the build system will
|
||||||
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-pbx-lua),-ldl -lcrypt)
|
# ignore them.
|
||||||
|
TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
|
||||||
EXTRA_CFLAGS+=$(TARGET_CPPFLAGS)
|
|
||||||
EXTRA_LDFLAGS+=$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
|
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--without-execinfo \
|
--without-execinfo \
|
||||||
|
@ -231,6 +229,20 @@ CONFIGURE_ARGS+= \
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR)/host/bin/xml2-config
|
ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR)/host/bin/xml2-config
|
||||||
|
|
||||||
|
MAKE_FLAGS+= \
|
||||||
|
ASTDATADIR="/usr/share/asterisk" \
|
||||||
|
DESTDIR="$(PKG_INSTALL_DIR)"
|
||||||
|
|
||||||
|
# show full gcc arguments instead of [CC] and [LD]
|
||||||
|
MAKE_FLAGS+= \
|
||||||
|
NOISY_BUILD="yes"
|
||||||
|
|
||||||
|
# don't let asterisk mess with build flags
|
||||||
|
MAKE_FLAGS+= \
|
||||||
|
AST_FORTIFY_SOURCE="" \
|
||||||
|
DEBUG="" \
|
||||||
|
OPTIMIZE=""
|
||||||
|
|
||||||
AST_MENUSELECT_OPTS = \
|
AST_MENUSELECT_OPTS = \
|
||||||
--without-newt \
|
--without-newt \
|
||||||
--without-curses \
|
--without-curses \
|
||||||
|
@ -241,7 +253,7 @@ define Build/Configure
|
||||||
(cd $(PKG_BUILD_DIR); \
|
(cd $(PKG_BUILD_DIR); \
|
||||||
./bootstrap.sh; \
|
./bootstrap.sh; \
|
||||||
);
|
);
|
||||||
$(call Build/Configure/Default,,$(SITE_VARS))
|
$(call Build/Configure/Default)
|
||||||
(cd $(PKG_BUILD_DIR)/menuselect; \
|
(cd $(PKG_BUILD_DIR)/menuselect; \
|
||||||
./bootstrap.sh; \
|
./bootstrap.sh; \
|
||||||
./configure \
|
./configure \
|
||||||
|
@ -256,19 +268,7 @@ define Build/Compile
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \
|
$(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \
|
||||||
CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \
|
CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \
|
||||||
LDFLAGS="$(HOST_LDFLAGS) -lxml2"
|
LDFLAGS="$(HOST_LDFLAGS) -lxml2"
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
$(call Build/Compile/Default,all install samples)
|
||||||
include/asterisk/version.h \
|
|
||||||
include/asterisk/buildopts.h defaults.h \
|
|
||||||
makeopts.embed_rules
|
|
||||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
|
|
||||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
|
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
|
||||||
ASTDATADIR="/usr/share/asterisk" \
|
|
||||||
NOISY_BUILD="yes" \
|
|
||||||
DEBUG="" \
|
|
||||||
OPTIMIZE="" \
|
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
||||||
all install samples
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
|
Loading…
Reference in a new issue