don't make expression evaluator allocate a memory buffer for each result
[asterisk/asterisk.git] / utils / Makefile
1 #
2 # Asterisk -- A telephony toolkit for Linux.
3
4 # Various utilities
5 #
6 # Copyright (C) 1999-2005, Digium
7 #
8 # Mark Spencer <markster@digium.com>
9 #
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
12 #
13
14 #
15 # Don't use ast mm routines
16 #
17 CFLAGS+=-DNO_AST_MM
18
19 OSARCH=$(shell uname -s)
20 ifeq ($(findstring BSD,${OSARCH}),BSD)
21 CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
22 endif
23
24 TARGET=stereorize streamplayer
25
26 TARGET+=$(shell if [ -f $(CROSS_COMPILE_TARGET)/usr/include/popt.h ]; then echo "smsq"; else if [ -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h ]; then echo "smsq"; fi ; fi)
27 TARGET+=$(shell if [ -f $(CROSS_COMPILE_TARGET)/usr/include/newt.h ]; then echo "astman"; else if [ -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h ]; then echo "astman"; fi ; fi)
28 ifeq (${OSARCH},SunOS)
29 SOL=../strcompat.o
30 endif
31
32 all: depend $(TARGET)
33
34 install:
35         for x in $(TARGET); do \
36                 if [ "$$x" != "none" ]; then \
37                         $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
38                 fi; \
39         done 
40
41 clean:
42         rm -f *.o astman smsq stereorize check_expr .depend
43         rm -f ast_expr2.o ast_expr2f.o
44
45 astman: astman.o ../md5.o
46         $(CC) $(CFLAGS) -o astman astman.o ../md5.o -lnewt
47
48 stereorize: stereorize.o frame.o
49         $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm
50
51 ast_expr2.o: ../ast_expr2.c
52         gcc -g -c -o $@ $<
53
54 ast_expr2f.o: ../ast_expr2f.c
55         gcc -g -c -DSTANDALONE -o $@ $<
56
57 check_expr: check_expr.c ast_expr2.o ast_expr2f.o
58         $(CC) $(CFLAGS) -o $@ $^
59
60 smsq: smsq.o
61         $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt
62
63 streamplayer: streamplayer.o
64         $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o
65
66 ifneq ($(wildcard .depend),)
67 include .depend
68 endif
69
70 depend: .depend
71
72 .depend:
73         ../build_tools/mkdep $(CFLAGS) `ls *.c`
74