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 -include ../menuselect.makeopts
16 .PHONY: clean all uninstall
18 # to get check_expr, add it to the ALL_UTILS list
19 ALL_UTILS:=astman smsq stereorize streamplayer aelparse muted check_expr conf2ael hashtest2
22 include $(ASTTOPDIR)/Makefile.rules
24 ifeq ($(OSARCH),SunOS)
26 UTILS:=$(filter-out muted,$(UTILS))
29 ifeq ($(OSARCH),OpenBSD)
30 UTILS:=$(filter-out muted,$(UTILS))
34 UTILS:=$(filter-out smsq,$(UTILS))
38 UTILS:=$(filter-out astman,$(UTILS))
41 ifneq ($(filter pbx_ael,$(MENUSELECT_PBX)),)
42 UTILS:=$(filter-out aelparse,$(UTILS))
43 UTILS:=$(filter-out conf2ael,$(UTILS))
49 for x in $(UTILS); do \
50 if [ "$$x" != "none" ]; then \
51 $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
56 for x in $(ALL_UTILS); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
59 rm -f *.o $(ALL_UTILS) check_expr
61 rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c
62 rm -f aelparse.c aelbison.c conf2ael
67 astman: astman.o md5.o
68 astman: LIBS+=$(NEWT_LIB)
70 stereorize: stereorize.o frame.o
73 strcompat.c: ../main/strcompat.c
77 @echo " [BISON] ../main/ast_expr2.y -> $@"
78 @bison -o $@ -d --name-prefix=ast_yy ../main/ast_expr2.y
81 @echo " [FLEX] ../main/ast_expr2.fl -> $@"
82 @flex -o $@ --full ../main/ast_expr2.fl
84 pval.c: ../res/ael/pval.c
87 ast_expr2.c: ../main/ast_expr2.c
90 ast_expr2f.c: ../main/ast_expr2f.c
93 ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main
95 pval.o : ASTCFLAGS+=-DSTANDALONE
97 check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o
99 aelbison.c: ../res/ael/ael.tab.c
101 aelbison.o: aelbison.c ../res/ael/ael.tab.h ../include/asterisk/ael_structs.h
102 aelbison.o: ASTCFLAGS+=-I../res/ael -DYYENABLE_NLS=0
104 pbx_ael.c: ../pbx/pbx_ael.c
106 pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
108 ael_main.o: ael_main.c ../include/asterisk/ael_structs.h
110 aelparse.c: ../res/ael/ael_lex.c
112 aelparse.o: aelparse.c ../include/asterisk/ael_structs.h ../res/ael/ael.tab.h
113 aelparse.o: ASTCFLAGS+=-I../res -DSTANDALONE_AEL
115 aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
117 astobj2.c : ../main/astobj2.c ../include/asterisk/astobj2.h
118 cp ../main/astobj2.c .
120 utils.c : ../main/utils.c
123 sha1.c : ../main/sha1.c
129 astobj2.o : astobj2.c
131 hashtest2.o : hashtest2.c
132 $(CC) -g -O0 -c hashtest2.c -I/usr/include -I../include
134 hashtest2 : hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o
135 $(CC) -g -O0 -o hashtest2 hashtest2.o astobj2.o utils.o md5.o sha1.o strcompat.o -lpthread
137 extconf.o : extconf.c
139 conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
142 testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
143 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
144 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o
145 $(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
146 rm ast_expr2.o ast_expr2f.o
147 ./testexpr2s expr2.testinput
149 smsq: smsq.o strcompat.o
150 smsq: LIBS+=$(POPT_LIB)
152 streamplayer: streamplayer.o
155 muted: LIBS+=$(AUDIO_LIBS)
157 ifneq ($(wildcard .*.d),)