2 # Asterisk -- A telephony toolkit for Linux.
6 # Copyright (C) 1999-2006, Digium
8 # Mark Spencer <markster@digium.com>
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
14 .PHONY: clean clean-depend all depend uninstall
16 UTILS:=astman smsq stereorize streamplayer aelparse muted
18 ifeq (${OSARCH},SunOS)
23 UTILS:=$(filter-out smsq,$(UTILS))
27 UTILS:=$(filter-out astman,$(UTILS))
30 ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
31 UTILS:=$(filter-out aelparse,$(UTILS))
34 include $(ASTTOPDIR)/Makefile.rules
39 for x in $(UTILS); do \
40 if [ "$$x" != "none" ]; then \
41 $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
46 for x in $(UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
52 rm -f *.o $(UTILS) check_expr
54 $(eval $(call ast_make_final,astman,astman.o ../main/md5.o))
55 astman: LIBS+=-lnewt -lslang -ldl
57 $(eval $(call ast_make_final,stereorize,stereorize.o frame.o))
60 $(eval $(call ast_make_o_c,strcompat.o,../main/strcompat.c))
63 @echo " [BISON] ../main/ast_expr2.y -> $@"
64 @bison -o $@ -d --name-prefix=ast_yy ../main/ast_expr2.y
67 @echo " [FLEX] ../main/ast_expr2.fl -> $@"
68 @flex -o $@ --full ../main/ast_expr2.fl
70 $(eval $(call ast_make_o_c,ast_expr2.o,../main/ast_expr2.c))
72 $(eval $(call ast_make_o_c,ast_expr2f.o,../main/ast_expr2f.c))
73 ast_expr2f.o: CFLAGS+=-DSTANDALONE_AEL
75 $(eval $(call ast_make_final,check_expr,check_expr.c ast_expr2.o ast_expr2f.o))
77 $(eval $(call ast_make_o_c,aelflex.o,../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h))
78 aelflex.o: CFLAGS+=-I../pbx -DSTANDALONE_AEL
80 $(eval $(call ast_make_o_c,aelbison.o,../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h))
81 aelbison.o: CFLAGS+=-I../pbx
83 $(eval $(call ast_make_o_c,pbx_ael.o,../pbx/pbx_ael.c))
84 pbx_ael.o: CFLAGS+=-DSTANDALONE_AEL
86 $(eval $(call ast_make_final,aelparse,aelflex.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o))
88 $(eval $(call ast_make_o_c,ael_main.o,ael_main.c ../include/asterisk/ael_structs.h))
90 testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
91 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
92 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o
93 $(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
94 rm ast_expr2.o ast_expr2f.o
95 ./testexpr2s expr2.testinput
97 smsq: smsq.o strcompat.o
98 smsq: LIBS+=$(POPT_LIB)
100 streamplayer: streamplayer.o
103 muted: LIBS+=$(AUDIO_LIBS)
105 ifneq ($(wildcard .depend),)
112 ../build_tools/mkdep $(CFLAGS) `ls *.c`