Files
asterisk/Makefile.rules
Kevin P. Fleming 89050169c8 Merged revisions 43996-43997,44008,44011-44012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43996 | kpfleming | 2006-09-29 11:47:05 -0500 (Fri, 29 Sep 2006) | 2 lines

another cross-compile fix

........
r43997 | kpfleming | 2006-09-29 11:52:27 -0500 (Fri, 29 Sep 2006) | 2 lines

support --without-curl in configure script

........
r44008 | kpfleming | 2006-09-29 13:25:49 -0500 (Fri, 29 Sep 2006) | 2 lines

don't abuse CFLAGS and LDFLAGS for build of Asterisk components, because they are also then used for non-Asterisk components (like menuselect); use our own variables instead

........
r44011 | kpfleming | 2006-09-29 13:40:17 -0500 (Fri, 29 Sep 2006) | 2 lines

missed one conversion to ASTCFLAGS

........
r44012 | kpfleming | 2006-09-29 13:49:07 -0500 (Fri, 29 Sep 2006) | 2 lines

yet another place where we were not using the correct CFLAGS by default

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-29 18:54:21 +00:00

101 lines
2.4 KiB
Makefile

#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile rules
#
# Copyright (C) 2006, Digium, Inc.
#
# Kevin P. Fleming <kpfleming@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
# Each command is preceded by a short comment on what to do.
# Prefixing one or the other with @\# or @ or nothing makes the desired
# behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command.
-include $(ASTTOPDIR)/makeopts
ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
else
ECHO_PREFIX=@\#
CMD_PREFIX=
endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
# More GSM codec optimization
# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
# which support MMX instructions. This should be newer pentiums,
# ppro's, etc, as well as the AMD K6 and K7.
#K6OPT=-DK6OPT
OPTIMIZE?=-O6
ASTCFLAGS+=$(OPTIMIZE)
endif
define ast_make_o_c
$(1): $(2)
$(ECHO_PREFIX) echo " [CC] $$< -> $$@"
$(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(ASTCFLAGS)
endef
define ast_make_oo_cc
$(1): $(2)
$(ECHO_PREFIX) echo " [CXX] $$< -> $$@"
$(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(ASTCFLAGS)
endef
define ast_make_c_y
$(1): $(2)
$(ECHO_PREFIX) echo " [BISON] $$< -> $$@"
$(CMD_PREFIX) bison -o $$@ -d --name-prefix=ast_yy $$<
endef
define ast_make_c_fl
$(1): $(2)
$(ECHO_PREFIX) echo " [FLEX] $$< -> $$@"
$(CMD_PREFIX) flex -o $$@ --full $$<
endef
define ast_make_so_o
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$(SOLINK) $$^ $$(LIBS)
endef
define ast_make_so_oo
$(1): $(2)
$(ECHO_PREFIX) echo " [LDXX] $$^ -> $$@"
$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$(SOLINK) $$^ $$(LIBS)
endef
define ast_make_a_o
$(1): $(2)
$(ECHO_PREFIX) echo " [AR] $$^ -> $$@"
$(CMD_PREFIX) $$(AR) cr $$@ $$^
$(CMD_PREFIX) $$(RANLIB) $$@
endef
define ast_make_final
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$^ $$(LIBS)
endef
define ast_make_final_host
$(1): $(2)
$(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
$(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(HOST_CFLAGS) $$(HOST_LDFLAGS) $$^ $$(LIBS)
endef
$(eval $(call ast_make_o_c,%.o,%.c))
$(eval $(call ast_make_oo_cc,%.oo,%.cc))
$(eval $(call ast_make_so_o,%.so,%.o))
$(eval $(call ast_make_final,%,%.o))