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
62 rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c
63 rm -f aelparse.c aelbison.c conf2ael
64 rm -f utils.c sha1.c astobj2.c hashtest2
69 astman: astman.o md5.o
70 astman: LIBS+=$(NEWT_LIB)
72 stereorize: stereorize.o frame.o
75 strcompat.c: ../main/strcompat.c
79 @echo " [BISON] ../main/ast_expr2.y -> $@"
80 @bison -o $@ -d --name-prefix=ast_yy ../main/ast_expr2.y
83 @echo " [FLEX] ../main/ast_expr2.fl -> $@"
84 @flex -o $@ --full ../main/ast_expr2.fl
86 pval.c: ../res/ael/pval.c
89 ast_expr2.c: ../main/ast_expr2.c
92 ast_expr2f.c: ../main/ast_expr2f.c
95 ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main
97 pval.o : ASTCFLAGS+=-DSTANDALONE
99 check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o clicompat.o threadstorage.o
101 aelbison.c: ../res/ael/ael.tab.c
104 aelbison.o: ASTCFLAGS+=-I../res/ael -DYYENABLE_NLS=0
106 pbx_ael.c: ../pbx/pbx_ael.c
109 pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
111 aelparse.c: ../res/ael/ael_lex.c
114 aelparse.o: ASTCFLAGS+=-I../res -DSTANDALONE_AEL
116 aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
118 astobj2.c: ../main/astobj2.c
121 utils.c: ../main/utils.c
124 sha1.c: ../main/sha1.c
127 threadstorage.c: ../main/threadstorage.c
130 hashtest2.o: ASTCFLAGS+=-O0
132 hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
134 extconf.o : extconf.c
136 conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
138 testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
139 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
140 $(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2.c -o ast_expr2.o
141 $(CC) -g -o testexpr2s ast_expr2f.o ast_expr2.o
142 rm ast_expr2.o ast_expr2f.o
143 ./testexpr2s expr2.testinput
145 smsq: smsq.o strcompat.o
146 smsq: LIBS+=$(POPT_LIB)
148 streamplayer: streamplayer.o
151 muted: LIBS+=$(AUDIO_LIBS)
153 ifneq ($(wildcard .*.d),)