2003-04-28 19:58:43 +00:00
|
|
|
#
|
|
|
|
# Don't use ast mm routines
|
|
|
|
#
|
|
|
|
CFLAGS+=-DNO_AST_MM
|
2004-06-04 15:44:14 +00:00
|
|
|
|
|
|
|
OSARCH=$(shell uname -s)
|
|
|
|
ifeq (${OSARCH},FreeBSD)
|
|
|
|
CFLAGS+=-I/usr/local/include -L/usr/local/lib
|
|
|
|
endif
|
|
|
|
|
2003-01-30 15:03:20 +00:00
|
|
|
TARGET=$(shell if [ -f /usr/include/newt.h ]; then echo "astman"; else echo "none" ; fi)
|
2004-06-04 15:44:14 +00:00
|
|
|
TARGET=$(shell if [ -f /usr/local/include/newt.h ]; then echo "astman"; else echo "none" ; fi)
|
2003-05-06 00:00:20 +00:00
|
|
|
all: depend $(TARGET)
|
2002-07-27 14:29:35 +00:00
|
|
|
|
|
|
|
install:
|
2003-01-30 15:03:20 +00:00
|
|
|
if [ "$(TARGET)" != "none" ]; then \
|
2002-07-27 14:29:35 +00:00
|
|
|
for x in $(TARGET); do \
|
2003-10-25 17:27:53 +00:00
|
|
|
install -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/astman; \
|
2002-07-27 14:29:35 +00:00
|
|
|
done ; \
|
|
|
|
fi
|
|
|
|
|
2003-01-30 15:03:20 +00:00
|
|
|
none:
|
|
|
|
@echo Not building the Asterisk Manager "astman"
|
|
|
|
|
2002-07-27 14:29:35 +00:00
|
|
|
clean:
|
2003-05-06 00:00:20 +00:00
|
|
|
rm -f *.o astman .depend
|
2002-07-27 14:29:35 +00:00
|
|
|
|
2003-03-10 20:39:12 +00:00
|
|
|
astman: astman.o ../md5.o
|
2004-06-04 15:44:14 +00:00
|
|
|
$(CC) $(CFLAGS) -o astman astman.o ../md5.o -lnewt
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2003-08-19 16:42:30 +00:00
|
|
|
ifneq ($(wildcard .depend),)
|
2003-05-06 00:00:20 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 00:00:20 +00:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
|
|
|
../mkdep $(CFLAGS) `ls *.c`
|
|
|
|
|