Merged revisions 134814 via svnmerge from
[asterisk-bristuff.git] / res / Makefile
blob1beb8e5c7c880046eea7e48e74b6f003d3fb09f9
2 # Asterisk -- A telephony toolkit for Linux.
3 #
4 # Makefile for resource modules
6 # Copyright (C) 1999-2006, Digium, Inc.
8 # This program is free software, distributed under the terms of
9 # the GNU General Public License
12 -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
14 MODULE_PREFIX=res
15 MENUSELECT_CATEGORY=RES
16 MENUSELECT_DESCRIPTION=Resource Modules
18 all: _all
20 include $(ASTTOPDIR)/Makefile.moddir_rules
22 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
23 # cygwin has some dependencies among res_ things.
24 # We use order-only dependencies, and then add the libraries as required.
25 res_features.so: | res_monitor.so
26 res_features.so_LIBS:= -lres_monitor.so
28 res_agi.so: | res_speech.so
29 res_agi.so_LIBS:= -lres_speech.so
30 endif
32 ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
33 ael/ael_lex.o: ASTCFLAGS+=-I. -Iael -Wno-unused
35 ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
36 ael/ael.tab.o: ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
38 ais/clm.o ais/evt.o: ASTCFLAGS+=${AIS_INCLUDE}
40 $(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
42 $(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
44 $(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
46 ael/ael_lex.c:
47 (cd ael; flex ael.flex; sed -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c > zz; mv zz ael_lex.c)
48 (cd ael; sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ael_lex.c > zz; mv zz ael_lex.c)
50 ael/ael.tab.c ael/ael.tab.h:
51 (cd ael; bison -v -d ael.y)
53 ael/pval.o: ael/pval.c
55 clean::
56 rm -f snmp/*.o ael/*.o ais/*.o