Merge "BuildSystem: Remove chan_h323 leftovers."
[asterisk/asterisk.git] / agi / Makefile
1 #
2 # Asterisk -- An open source telephony toolkit.
3 #
4 # Makefile for AGI-related stuff
5 #
6 # Copyright (C) 1999-2006, 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
14 ASTTOPDIR?=..
15 -include $(ASTTOPDIR)/menuselect.makeopts
16
17 .PHONY: clean all uninstall
18
19 AGIS=$(MENUSELECT_AGIS)
20
21 ifeq ($(OSARCH),SunOS)
22   LIBS+=-lsocket -lnsl
23 endif
24
25 ifeq ($(OSARCH),mingw32)
26     AGIS:=
27 endif
28
29 include $(ASTTOPDIR)/Makefile.rules
30
31 _ASTCFLAGS+=-DSTANDALONE
32
33 all: $(AGIS)
34
35 strcompat.c: ../main/strcompat.c
36         @cp $< $@
37
38 eagi-test: eagi-test.o strcompat.o
39
40 eagi-sphinx-test: eagi-sphinx-test.o
41
42 install: all
43         $(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
44         for x in $(AGIS); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(AGI_DIR)" ; done
45
46 uninstall:
47         for x in $(AGIS); do rm -f "$(DESTDIR)$(AGI_DIR)/$$x" ; done
48
49 clean:
50         rm -f *.so *.o look eagi-test eagi-sphinx-test
51         rm -f .*.d *.s *.i
52         rm -f strcompat.c
53
54 ifneq ($(wildcard .*.d),)
55    include .*.d
56 endif