2 # Asterisk -- A telephony toolkit for Linux.
6 # Copyright (C) 1999-2005, 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 # Don't use ast mm routines
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
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)
35 for x in $(TARGET); do \
36 if [ "$$x" != "none" ]; then \
37 $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
42 rm -f *.o astman smsq stereorize check_expr .depend
44 astman: astman.o ../md5.o
45 $(CC) $(CFLAGS) -o astman astman.o ../md5.o -lnewt
47 stereorize: stereorize.o frame.o
48 $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm
51 $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt
53 ifneq ($(wildcard .depend),)
60 ../build_tools/mkdep $(CFLAGS) `ls *.c`