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 ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted
19 include $(ASTTOPDIR)/Makefile.rules
21 ifeq ($(OSARCH),SunOS)
23 UTILS:=$(filter-out muted,$(UTILS))
26 ifeq ($(OSARCH),OpenBSD)
27 UTILS:=$(filter-out muted,$(UTILS))
31 UTILS:=$(filter-out smsq,$(UTILS))
35 UTILS:=$(filter-out astman,$(UTILS))
38 ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
39 UTILS:=$(filter-out aelparse,$(UTILS))
45 for x in $(UTILS); do \
46 if [ "$$x" != "none" ]; then \
47 $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
52 for x in $(ALL_UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
58 rm -f *.o $(ALL_UTILS) check_expr
59 rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c
60 rm -f aelparse.c aelbison.c
65 astman: astman.o md5.o
66 astman: LIBS+=$(NEWT_LIB)
68 stereorize: stereorize.o frame.o
71 strcompat.c: ../main/strcompat.c
75 @echo " [BISON] ../main/ast_expr2.y -> $@"
76 @bison -o $@ -d --name-prefix=ast_yy ../main/ast_expr2.y
79 @echo " [FLEX] ../main/ast_expr2.fl -> $@"
80 @flex -o $@ --full ../main/ast_expr2.fl
82 ast_expr2.c: ../main/ast_expr2.c
85 ast_expr2f.c: ../main/ast_expr2f.c
88 ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main
90 check_expr: check_expr.c ast_expr2.o ast_expr2f.o
92 aelbison.c: ../pbx/ael/ael.tab.c
94 aelbison.o: aelbison.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h
95 aelbison.o: ASTCFLAGS+=-I../pbx
97 pbx_ael.c: ../pbx/pbx_ael.c
99 pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
101 ael_main.o: ael_main.c ../include/asterisk/ael_structs.h
103 aelparse.c: ../pbx/ael/ael_lex.c
105 aelparse.o: aelparse.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h
106 aelparse.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL
108 aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o
110 testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
111 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
112 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o
113 $(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
114 rm ast_expr2.o ast_expr2f.o
115 ./testexpr2s expr2.testinput
117 smsq: smsq.o strcompat.o
118 smsq: LIBS+=$(POPT_LIB)
120 streamplayer: streamplayer.o
123 muted: LIBS+=$(AUDIO_LIBS)
125 ifneq ($(wildcard .depend),)
132 ../build_tools/mkdep $(ASTCFLAGS) `ls *.c`