https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49282 | kpfleming | 2007-01-02 21:21:25 -0600 (Tue, 02 Jan 2007) | 2 lines various Makefile improvements to get chan_vpb (and any other C++ modules) to build properly ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
82 lines
2.1 KiB
Makefile
82 lines
2.1 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
|
|
|
|
%.o: %.c
|
|
$(ECHO_PREFIX) echo " [CC] $< -> $@"
|
|
ifeq ($(AST_DEVMODE),yes)
|
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
|
|
else
|
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(ASTCFLAGS)
|
|
endif
|
|
|
|
%.o: %.s
|
|
$(ECHO_PREFIX) echo " [AS] $< -> $@"
|
|
ifeq ($(AST_DEVMODE),yes)
|
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
|
|
else
|
|
$(CMD_PREFIX) $(CC) -o $@ -c $< $(ASTCFLAGS)
|
|
endif
|
|
|
|
%.oo: %.cc
|
|
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
|
|
ifeq ($(AST_DEVMODE),yes)
|
|
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
|
|
else
|
|
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(ASTCFLAGS)
|
|
endif
|
|
|
|
%.c: %.y
|
|
$(ECHO_PREFIX) echo " [BISON] $< -> $@"
|
|
$(CMD_PREFIX) bison -o $@ -d --name-prefix=ast_yy $<
|
|
|
|
%.c: %.fl
|
|
$(ECHO_PREFIX) echo " [FLEX] $< -> $@"
|
|
$(CMD_PREFIX) flex -o $@ --full $<
|
|
|
|
%.so: %.o
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
|
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLDFLAGS) $(SOLINK) $^ $(LIBS)
|
|
|
|
%.so: %.oo
|
|
$(ECHO_PREFIX) echo " [LDXX] $^ -> $@"
|
|
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLDFLAGS) $(SOLINK) $^ $(LIBS)
|
|
|
|
%: %.o
|
|
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
|
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLDFLAGS) $^ $(LIBS)
|