2001-07-28 20:19:35 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for AGI-related stuff
|
2001-07-28 20:19:35 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Copyright (C) 1999-2005, Digium
|
2001-07-28 20:19:35 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
2001-07-28 20:19:35 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2003-02-23 06:00:11 +00:00
|
|
|
AGIS=agi-test.agi eagi-test eagi-sphinx-test
|
2001-07-28 20:19:35 +00:00
|
|
|
|
|
|
|
CFLAGS+=
|
|
|
|
|
2004-12-14 23:36:30 +00:00
|
|
|
LIBS=
|
|
|
|
ifeq ($(OSARCH),SunOS)
|
2005-08-30 02:54:02 +00:00
|
|
|
LIBS=-lsocket -lnsl ../strcompat.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
|
|
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
2004-12-14 23:36:30 +00:00
|
|
|
endif
|
|
|
|
|
2003-05-06 00:00:20 +00:00
|
|
|
all: depend $(AGIS)
|
2001-07-28 20:19:35 +00:00
|
|
|
|
|
|
|
install: all
|
2003-10-25 17:27:53 +00:00
|
|
|
mkdir -p $(DESTDIR)$(AGI_DIR)
|
|
|
|
for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
|
2001-07-28 20:19:35 +00:00
|
|
|
|
2003-02-23 06:00:11 +00:00
|
|
|
eagi-test: eagi-test.o
|
2004-12-14 23:36:30 +00:00
|
|
|
$(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)
|
2004-06-22 17:42:14 +00:00
|
|
|
|
2003-02-23 06:00:11 +00:00
|
|
|
eagi-sphinx-test: eagi-sphinx-test.o
|
2004-12-14 23:36:30 +00:00
|
|
|
$(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS)
|
2003-02-23 06:00:11 +00:00
|
|
|
|
2001-07-28 20:19:35 +00:00
|
|
|
clean:
|
2004-05-04 01:46:01 +00:00
|
|
|
rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
|
2001-07-28 20:19:35 +00:00
|
|
|
|
|
|
|
%.so : %.o
|
|
|
|
$(CC) -shared -Xlinker -x -o $@ $<
|
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:
|
2005-06-20 17:26:08 +00:00
|
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|