Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Asterisk -- A telephony toolkit for Linux.
  3. #
  4. # Makefile for AGI-related stuff
  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. AGIS=agi-test.agi eagi-test eagi-sphinx-test
  14. CFLAGS+=
  15. LIBS=
  16. ifeq ($(OSARCH),SunOS)
  17. LIBS=-lsocket -lnsl ../strcompat.o
  18. endif
  19. ifeq ($(findstring BSD,${OSARCH}),BSD)
  20. CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
  21. endif
  22. all: depend $(AGIS)
  23. install: all
  24. mkdir -p $(DESTDIR)$(AGI_DIR)
  25. for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
  26. eagi-test: eagi-test.o
  27. $(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)
  28. eagi-sphinx-test: eagi-sphinx-test.o
  29. $(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS)
  30. clean:
  31. rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
  32. %.so : %.o
  33. $(CC) -shared -Xlinker -x -o $@ $<
  34. ifneq ($(wildcard .depend),)
  35. include .depend
  36. endif
  37. depend: .depend
  38. .depend:
  39. ../build_tools/mkdep $(CFLAGS) `ls *.c`