2 # Asterisk -- A telephony toolkit for Linux.
6 # Copyright (C) 2006, Digium, Inc.
8 # Kevin P. Fleming <kpfleming@digium.com>
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
14 # Each command is preceded by a short comment on what to do.
15 # Prefixing one or the other with @\# or @ or nothing makes the desired
16 # behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command.
18 include $(ASTTOPDIR)/makeopts
20 ifeq ($(NOISY_BUILD),)
28 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
29 # More GSM codec optimization
30 # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
31 # which support MMX instructions. This should be newer pentiums,
32 # ppro's, etc, as well as the AMD K6 and K7.
41 $(ECHO_PREFIX) echo " [CC] $$< -> $$@"
42 $(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(CFLAGS)
47 $(ECHO_PREFIX) echo " [CXX] $$< -> $$@"
48 $(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(CFLAGS)
53 $(ECHO_PREFIX) echo " [BISON] $$< -> $$@"
54 $(CMD_PREFIX) bison -o $$@ -d --name-prefix=ast_yy $$<
59 $(ECHO_PREFIX) echo " [FLEX] $$< -> $$@"
60 $(CMD_PREFIX) flex -o $$@ --full $$<
65 $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
66 $(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
71 $(ECHO_PREFIX) echo " [LDXX] $$^ -> $$@"
72 $(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
77 $(ECHO_PREFIX) echo " [AR] $$^ -> $$@"
78 $(CMD_PREFIX) $$(AR) cr $$@ $$^
79 $(CMD_PREFIX) $$(RANLIB) $$@
84 $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
85 $(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$^ $$(LIBS)
88 define ast_make_final_host
90 $(ECHO_PREFIX) echo " [LD] $$^ -> $$@"
91 $(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS)
94 $(eval $(call ast_make_o_c,%.o,%.c))
96 $(eval $(call ast_make_oo_cc,%.oo,%.cc))
98 $(eval $(call ast_make_so_o,%.so,%.o))
100 $(eval $(call ast_make_final,%,%.o))