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
22 ifeq ($(NOISY_BUILD),)
30 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
31 # More GSM codec optimization
32 # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
33 # which support MMX instructions. This should be newer pentiums,
34 # ppro's, etc, as well as the AMD K6 and K7.
38 ASTCFLAGS+=$(OPTIMIZE)
42 $(ECHO_PREFIX) echo " [CC] $< -> $@"
43 $(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
46 $(ECHO_PREFIX) echo " [AS] $< -> $@"
47 $(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
50 $(ECHO_PREFIX) echo " [CXX] $< -> $@"
51 $(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
54 $(ECHO_PREFIX) echo " [BISON] $< -> $@"
55 $(CMD_PREFIX) bison -o $@ -d --name-prefix=ast_yy $<
58 $(ECHO_PREFIX) echo " [FLEX] $< -> $@"
59 $(CMD_PREFIX) flex -o $@ --full $<
62 $(ECHO_PREFIX) echo " [LD] $^ -> $@"
63 $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $^ $(PTHREAD_LIBS) $(LIBS)
66 $(ECHO_PREFIX) echo " [LDXX] $^ -> $@"
67 $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $^ $(PTHREAD_LIBS) $(LIBS)
70 $(ECHO_PREFIX) echo " [LD] $^ -> $@"
71 $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(PTHREAD_LIBS) $(LIBS)