2001-12-25 21:12:07 +00:00
|
|
|
#
|
2012-10-14 21:44:27 +00:00
|
|
|
# Asterisk -- An open source telephony toolkit.
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for resource modules
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
2006-06-24 19:43:31 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2007-12-09 21:29:37 +00:00
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
|
2006-06-07 16:03:31 +00:00
|
|
|
|
2007-12-17 07:25:35 +00:00
|
|
|
MODULE_PREFIX=res
|
|
|
|
MENUSELECT_CATEGORY=RES
|
|
|
|
MENUSELECT_DESCRIPTION=Resource Modules
|
2006-02-11 16:44:15 +00:00
|
|
|
|
2006-06-24 19:43:31 +00:00
|
|
|
all: _all
|
2006-04-24 17:11:45 +00:00
|
|
|
|
2006-07-06 21:04:28 +00:00
|
|
|
include $(ASTTOPDIR)/Makefile.moddir_rules
|
2001-12-25 21:12:07 +00:00
|
|
|
|
2007-11-20 16:12:10 +00:00
|
|
|
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
|
2007-12-04 11:50:05 +00:00
|
|
|
# cygwin has some dependencies among res_ things.
|
|
|
|
# We use order-only dependencies, and then add the libraries as required.
|
|
|
|
res_agi.so: | res_speech.so
|
|
|
|
res_agi.so_LIBS:= -lres_speech.so
|
2007-11-20 16:12:10 +00:00
|
|
|
endif
|
|
|
|
|
2009-07-21 13:28:04 +00:00
|
|
|
res_config_ldap.o: _ASTCFLAGS+=-DLDAP_DEPRECATED
|
2008-11-28 14:20:11 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
|
2009-07-21 13:28:04 +00:00
|
|
|
ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused
|
2007-08-15 19:21:27 +00:00
|
|
|
|
|
|
|
ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
|
2009-07-21 13:28:04 +00:00
|
|
|
ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
|
2007-08-15 19:21:27 +00:00
|
|
|
|
2008-06-10 15:12:17 +00:00
|
|
|
$(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
|
2010-03-23 14:22:27 +00:00
|
|
|
ais/clm.o ais/evt.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ais)
|
2008-06-10 15:12:17 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
$(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
|
2010-03-23 14:22:27 +00:00
|
|
|
snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
|
2006-07-01 15:13:56 +00:00
|
|
|
|
2007-08-15 19:21:27 +00:00
|
|
|
$(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
|
2010-03-23 14:22:27 +00:00
|
|
|
ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
|
2007-08-15 19:21:27 +00:00
|
|
|
|
2010-01-25 21:51:41 +00:00
|
|
|
ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
|
2010-01-22 21:45:18 +00:00
|
|
|
ael/ael_lex.c: ael/ael.flex
|
2010-01-24 06:40:31 +00:00
|
|
|
else
|
|
|
|
ael/ael_lex.c:
|
|
|
|
endif
|
2010-01-22 21:45:18 +00:00
|
|
|
$(ECHO_PREFIX) echo " [FLEX] $< -> $@"
|
2010-05-11 19:57:24 +00:00
|
|
|
$(CMD_PREFIX) (cd ael; $(FLEX) ael.flex)
|
|
|
|
$(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
|
|
|
|
$(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@
|
|
|
|
$(CMD_PREFIX) echo >> $@
|
|
|
|
$(CMD_PREFIX) cat $@.fix >> $@
|
|
|
|
$(CMD_PREFIX) rm $@.fix
|
2007-08-15 19:21:27 +00:00
|
|
|
|
2010-01-25 21:51:41 +00:00
|
|
|
ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
|
2010-01-22 21:45:18 +00:00
|
|
|
ael/ael.tab.c ael/ael.tab.h: ael/ael.y
|
2010-01-24 06:40:31 +00:00
|
|
|
else
|
|
|
|
ael/ael.tab.c ael/ael.tab.h:
|
|
|
|
endif
|
2010-01-22 21:45:18 +00:00
|
|
|
$(ECHO_PREFIX) echo " [BISON] $< -> $@"
|
2010-01-25 05:45:00 +00:00
|
|
|
$(CMD_PREFIX) (cd ael; $(BISON) -v -d ael.y)
|
2007-08-15 19:21:27 +00:00
|
|
|
|
|
|
|
ael/pval.o: ael/pval.c
|
|
|
|
|
2006-06-24 19:43:31 +00:00
|
|
|
clean::
|
2013-02-04 19:52:14 +00:00
|
|
|
@if [ -f pjproject/build.mak ]; then $(MAKE) -C pjproject realclean; fi
|
Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
|
|
|
rm -f snmp/*.o snmp/*.i ael/*.o ael/*.i ais/*.o ais/*.i
|
2012-07-01 17:28:57 +00:00
|
|
|
|
2013-02-04 19:52:14 +00:00
|
|
|
dist-clean::
|
|
|
|
rm -f pjproject/build.mak
|
2012-07-01 17:28:57 +00:00
|
|
|
|
2013-02-04 19:52:14 +00:00
|
|
|
pjproject/build.mak: pjproject/aconfigure
|
|
|
|
(cd pjproject && CFLAGS="-fPIC" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --disable-floating-point --disable-sound --disable-oss --disable-speex-aec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-g711-codec)
|
2012-09-07 20:53:48 +00:00
|
|
|
|
2013-02-04 19:52:14 +00:00
|
|
|
ifneq ($(findstring $(MAKECMDGOALS),all),)
|
|
|
|
-include pjproject/build.mak
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: FORCE
|
|
|
|
FORCE:
|
|
|
|
|
|
|
|
$(PJ_LIB_FILES): FORCE
|
|
|
|
$(MAKE) -C $(patsubst %/lib/,%,$(dir $@))/build/ ../lib/$(notdir $@)
|
2012-07-01 17:28:57 +00:00
|
|
|
|
2012-09-07 20:53:48 +00:00
|
|
|
res_rtp_asterisk.o: $(PJ_LIB_FILES)
|
2012-07-01 17:28:57 +00:00
|
|
|
res_rtp_asterisk.o: _ASTCFLAGS+=$(PJ_CFLAGS)
|
|
|
|
res_rtp_asterisk.so: _ASTLDFLAGS+=$(PJ_LDFLAGS)
|
|
|
|
res_rtp_asterisk.so: LIBS+=$(PJ_LDLIBS)
|