Fix silly error in makefile (bug #3081)
[asterisk/asterisk.git] / utils / Makefile
1 #
2 # Don't use ast mm routines
3 #
4 CFLAGS+=-DNO_AST_MM
5
6 OSARCH=$(shell uname -s)
7 ifeq ($(findstring BSD,${OSARCH}),BSD)
8 CFLAGS+=-I/usr/local/include -L/usr/local/lib
9 endif
10
11 TARGET=none
12
13 TARGET+=$(shell if [ -f /usr/include/popt.h ]; then echo "smsq"; else if [ -f /usr/local/include/popt.h ]; then echo "smsq"; fi ; fi)
14 TARGET+=$(shell if [ -f /usr/include/newt.h ]; then echo "astman"; else if [ -f /usr/local/include/newt.h ]; then echo "astman"; fi ; fi)
15
16 all: depend $(TARGET)
17
18 install:
19         for x in $(TARGET); do \
20                 if [ "$$x" != "none" ]; then \
21                         install -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
22                 fi; \
23         done 
24
25 none:
26
27 clean:
28         rm -f *.o astman smsq .depend
29
30 astman: astman.o ../md5.o
31         $(CC) $(CFLAGS) -o astman astman.o ../md5.o -lnewt
32
33 smsq: smsq.o
34         $(CC) $(CFLAGS) -o smsq smsq.o -lpopt
35
36 ifneq ($(wildcard .depend),)
37 include .depend
38 endif
39
40 depend: .depend
41
42 .depend:
43         ../mkdep $(CFLAGS) `ls *.c`
44