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
15 -include $(ASTTOPDIR
)/menuselect.makeopts
17 .PHONY
: clean all uninstall
19 # to get check_expr, add it to the ALL_UTILS list
20 ALL_UTILS
:=astman smsq stereorize streamplayer aelparse muted check_expr conf2ael hashtest2 hashtest astcanary refcounter
23 LIBS
+= $(BKTR_LIB
) # astobj2 with devmode uses backtrace
25 include $(ASTTOPDIR
)/Makefile.rules
27 ifeq ($(OSARCH
),SunOS
)
29 UTILS
:=$(filter-out muted
,$(UTILS
))
32 ifeq ($(OSARCH
),OpenBSD
)
33 UTILS
:=$(filter-out muted
,$(UTILS
))
36 ifeq ($(OSARCH
),cygwin
)
37 UTILS
:=$(filter-out muted
,$(UTILS
))
40 ifeq ($(OSARCH
),mingw32
)
44 ifneq ($(findstring darwin
,$(OSARCH
)),)
45 AUDIO_LIBS
=-framework CoreAudio
49 UTILS
:=$(filter-out smsq
,$(UTILS
))
53 UTILS
:=$(filter-out astman
,$(UTILS
))
56 ifneq ($(filter pbx_ael
,$(MENUSELECT_PBX
)),)
57 UTILS
:=$(filter-out aelparse
,$(UTILS
))
58 UTILS
:=$(filter-out conf2ael
,$(UTILS
))
64 for x in
$(UTILS
); do \
65 if
[ "$$x" != "none" ]; then \
66 $(INSTALL
) -m
755 $$x $(DESTDIR
)$(ASTSBINDIR
)/$$x; \
71 for x in
$(ALL_UTILS
); do
rm -f
$$x $(DESTDIR
)$(ASTSBINDIR
)/$$x; done
74 rm -f
*.o
$(ALL_UTILS
) check_expr
77 rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c hashtab.c
78 rm -f aelparse.c aelbison.c conf2ael
79 rm -f utils.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
81 md5.c
: $(ASTTOPDIR
)/main
/md5.c
84 astman
: astman.o md5.o
85 astman
: LIBS
+=$(NEWT_LIB
)
87 stereorize
: stereorize.o frame.o
90 hashtab.c
: $(ASTTOPDIR
)/main
/hashtab.c
93 strcompat.c
: $(ASTTOPDIR
)/main
/strcompat.c
96 $(ASTTOPDIR
)/main
/ast_expr2.c
:
97 @echo
" [BISON] $(ASTTOPDIR)/main/ast_expr2.y -> $@"
98 @bison
-o
$@
-d
--name-prefix
=ast_yy
$(ASTTOPDIR
)/main
/ast_expr2.y
100 $(ASTTOPDIR
)/main
/ast_expr2f.c
:
101 @echo
" [FLEX] $(ASTTOPDIR)/main/ast_expr2.fl -> $@"
102 @flex
-o
$@
--full
$(ASTTOPDIR
)/main
/ast_expr2.fl
104 pval.c
: $(ASTTOPDIR
)/res
/ael
/pval.c
107 ast_expr2.c
: $(ASTTOPDIR
)/main
/ast_expr2.c
110 ast_expr2f.c
: $(ASTTOPDIR
)/main
/ast_expr2f.c
113 ast_expr2f.o
: ASTCFLAGS
+=-DSTANDALONE_AEL
-I
$(ASTTOPDIR
)/main
-Wno-unused
115 pval.o
: ASTCFLAGS
+=-DSTANDALONE
117 check_expr
: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
119 aelbison.c
: $(ASTTOPDIR
)/res
/ael
/ael.tab.c
122 aelbison.o
: ASTCFLAGS
+=-I
$(ASTTOPDIR
)/res
/ael
-DYYENABLE_NLS
=0
124 pbx_ael.c
: $(ASTTOPDIR
)/pbx
/pbx_ael.c
127 pbx_ael.o
: ASTCFLAGS
+=-DSTANDALONE_AEL
129 aelparse.c
: $(ASTTOPDIR
)/res
/ael
/ael_lex.c
132 aelparse.o
: ASTCFLAGS
+=-I
$(ASTTOPDIR
)/res
-DSTANDALONE_AEL
-Wno-unused
134 aelparse
: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
136 astobj2.c
: $(ASTTOPDIR
)/main
/astobj2.c
139 utils.c
: $(ASTTOPDIR
)/main
/utils.c
142 sha1.c
: $(ASTTOPDIR
)/main
/sha1.c
145 threadstorage.c
: $(ASTTOPDIR
)/main
/threadstorage.c
148 hashtest2.o
: ASTCFLAGS
+=-O0
150 hashtest2
: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
152 hashtest
: hashtest.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
154 hashtest.o
: ASTCFLAGS
+=-O0
156 refcounter
: refcounter.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o
158 refcounter.o
: ASTCFLAGS
+=-O0
162 conf2ael
: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
164 testexpr2s
: $(ASTTOPDIR
)/main
/ast_expr2f.c
$(ASTTOPDIR
)/main
/ast_expr2.c
$(ASTTOPDIR
)/main
/ast_expr2.h
165 $(CC
) -g
-c
-I
$(ASTTOPDIR
)/include -DSTANDALONE_AEL
$(ASTTOPDIR
)/main
/ast_expr2f.c
-o ast_expr2f.o
166 $(CC
) -g
-c
-I
$(ASTTOPDIR
)/include -DSTANDALONE_AEL
$(ASTTOPDIR
)/main
/ast_expr2.c
-o ast_expr2.o
167 $(CC
) -g
-o testexpr2s ast_expr2f.o ast_expr2.o
168 rm ast_expr2.o ast_expr2f.o
169 .
/testexpr2s expr2.testinput
171 smsq
: smsq.o strcompat.o
172 smsq
: LIBS
+=$(POPT_LIB
)
174 streamplayer
: streamplayer.o
177 muted
: LIBS
+=$(AUDIO_LIBS
)
179 ifneq ($(wildcard .
*.d
),)