now chan_lcr.so is moved to asterisk' modules directory when installing.
[lcr.git] / Makefile.am
index c29195a..8eebb53 100644 (file)
@@ -28,6 +28,8 @@
 
 INSTALLdir = /usr/local/lcr
 
+astmoddir = /usr/lib/asterisk/modules
+
 INSTALLATION_DEFINES = \
  -DCONFIG_DATA="\"$(INSTALLdir)\"" \
  -DSHARE_DATA="\"$(INSTALLdir)\"" \
@@ -43,7 +45,7 @@ if ENABLE_ASTERISK_CHANNEL_DRIVER
 sbin_PROGRAMS = lcr genrc genextension chan_lcr.so
 chan_lcr_so_SOURCES = 
 chan_lcr_so_LDFLAGS = -shared
-chan_lcr_so_LDADD = chan_lcr.o bchannel.o 
+chan_lcr_so_LDADD = chan_lcr.o bchannel.o options.o
 
 chan_lcr.o: chan_lcr.c chan_lcr.h
        $(CC) $(INCLUDES) -D_GNU_SOURCE -c chan_lcr.c
@@ -112,6 +114,10 @@ install-data-hook:
        @if test -a $(INSTALLdir)/tones_efi ; then \
                echo "NOTE: special efi tones already exists, not overwritten." ; else \
                cp -a tones_efi $(INSTALLdir) ; fi
+if ENABLE_ASTERISK_CHANNEL_DRIVER
+       @echo "Moving chan_lcr.so (if it fails, do it manually)"
+       mv $(sbindir)/chan_lcr.so $(astmoddir)
+endif
 
 # test rule, nothing important
 #echo: