New Version 1.6
[lcr.git] / Makefile.am
index 844c2d8..84bfd89 100644 (file)
@@ -41,10 +41,20 @@ INSTALLATION_DEFINES = \
  -DCONFIG_DATA="\"$(CONFIGdir)\"" \
  -DSHARE_DATA="\"$(SHAREdir)\"" \
  -DLOG_DIR="\"$(LOGdir)\"" \
- -DEXTENSION_DATA="\"$(EXTENSIONdir)/extensions\""
+ -DEXTENSION_DATA="\"$(EXTENSIONdir)\""
 
-INCLUDES = $(all_includes) -I/usr/include/mISDNuser $(INSTALLATION_DEFINES) 
+if ENABLE_GSM
 
+GSM_INCLUDE = -DWITH_GSM -I./openbsc/include
+
+GSM_SOURCE = gsm_audio.c gsm.cpp gsm_conf.c openbsc/src/bsc_init.c openbsc/src/vty_interface.c openbsc/src/vty_interface_layer3.c
+
+GSM_LIB = /usr/lib/libgsm.a ./openbsc/src/libbsc.a ./openbsc/src/libmsc.a ./openbsc/src/libvty.a -ldbi -lcrypt
+
+#gsm_audio.po: gsm_audio.c gsm_audio.h
+#      $(CC) -D_GNU_SOURCE -fPIC -c gsm_audio.c -o gsm_audio.po
+
+endif
 
 bin_PROGRAMS = lcradmin gentones genwave
 
@@ -74,7 +84,9 @@ install-exec-hook:
        $(INSTALL) chan_lcr.so $(astmoddir)
 endif
 
-lcr_SOURCES = action.cpp       mISDN.cpp        tones.c \
+INCLUDES = $(all_includes) $(GSM_INCLUDE) -Wall -I/usr/include/mISDNuser $(INSTALLATION_DEFINES)
+
+lcr_SOURCES = $(GSM_SOURCE) action.cpp       mISDN.cpp        tones.c \
        action_efi.cpp   crypt.cpp        mail.c           trace.c \
        action_vbox.cpp  dss1.cpp         main.c           \
        vbox.cpp alawulaw.c       endpoint.cpp     interface.c     message.c \
@@ -83,7 +95,8 @@ lcr_SOURCES = action.cpp       mISDN.cpp        tones.c \
        callerid.c       joinremote.cpp  route.c \
        cause.c          socket_server.c
 
-lcr_LDADD = $(LIBCRYPTO) -lmisdn -lpthread
+lcr_LDADD = $(LIBCRYPTO) -lmisdn -lpthread $(GSM_LIB)
+
 
 lcradmin_SOURCES = lcradmin.c cause.c options.c
 genextension_SOURCES = genext.c options.c extension.c
@@ -111,6 +124,14 @@ install-data-hook:
        @if test -a $(CONFIGdir)/routing.conf ; then \
                echo "NOTE: routing.conf already exists, not changed." ; else \
                cp -v default/routing.conf $(CONFIGdir) ; fi
+if ENABLE_GSM
+       @if test -a $(CONFIGdir)/gsm.conf ; then \
+               echo "NOTE: gsm.conf already exists, not changed." ; else \
+               cp -v default/gsm.conf $(CONFIGdir) ; fi
+       @if test -a $(CONFIGdir)/openbsc.cfg ; then \
+               echo "NOTE: openbsc.cfg already exists, not changed." ; else \
+               cp -v default/openbsc.cfg $(CONFIGdir) ; fi
+endif
        @if test -a $(CONFIGdir)/numbering_int.conf ; then \
                echo "NOTE: numbering_int.conf is obsolete, please use routing." ; fi
        @if test -a $(CONFIGdir)/numbering_ext.conf ; then \
@@ -134,6 +155,9 @@ install-data-hook:
                echo "NOTE: special efi tones already exists, not overwritten." ; else \
                cp -a tones_efi $(SHAREdir) ; fi
 
+clean-generic:
+       rm -f *.po
+
 # test rule, nothing important
 #echo:
 #      -echo $(all_libraries) >&2