Add support for TCH/H and half rate codec
[lcr.git] / Makefile.am
index 8da7b3f..11a2beb 100644 (file)
@@ -43,31 +43,54 @@ INSTALLATION_DEFINES = \
  -DLOG_DIR="\"$(LOGdir)\"" \
  -DEXTENSION_DATA="\"$(EXTENSIONdir)\""
 
+SUBDIRS = include
+
 if ENABLE_MISDN
 
 MISDN_INCLUDE = -DWITH_MISDN -DWITH_CRYPT
-MISDN_SOURCE = mISDN.cpp dss1.cpp crypt.cpp
+MISDN_SOURCE = mISDN.cpp fxs.cpp dss1.cpp crypt.cpp
 MISDN_LIB = -lmisdn
 
 endif
 
+SUBDIRS =
+
 GSM_INCLUDE =
 GSM_SOURCE =
 GSM_LIB =
 
 if ENABLE_GSM
 
-GSM_INCLUDE +=
+#if ENABLE_GSMFR
 
-GSM_SOURCE += gsm_audio.c gsm.cpp
-  
-GSM_LIB += /usr/lib/libgsm.a
+GSM_INCLUDE += -DWITH_GSMFR
+
+GSM_LIB += libgsmfr/lib/libgsm.a
+
+SUBDIRS += libgsmfr
 
-#gsm_audio.po: gsm_audio.c gsm_audio.h
-#      $(CC) -D_GNU_SOURCE -fPIC -c gsm_audio.c -o gsm_audio.po
+#endif
+
+if ENABLE_GSMHR
+
+GSM_INCLUDE += -DWITH_GSMHR
+
+GSM_LIB += libgsmhr/libgsmhr.la
+
+SUBDIRS += libgsmhr
 
 endif
 
+if ENABLE_GSMAMR
+
+GSM_INCLUDE += -DWITH_GSMAMR
+
+GSM_LIB += -lopencore-amrnb
+
+endif
+
+GSM_SOURCE += gsm_audio.c gsm.cpp
+
 if ENABLE_GSM_BS
 
 GSM_INCLUDE += -DWITH_GSM_BS
@@ -84,6 +107,9 @@ GSM_SOURCE += gsm_ms.cpp
 
 endif
 
+endif
+
+
 if ENABLE_SS5
 
 SS5_INCLUDE = -DWITH_SS5
@@ -142,7 +168,7 @@ uninstall-hook:
        cd '$(DESTDIR)$(astmoddir)' && rm -f chan_lcr.so
 endif
 
-INCLUDES = $(all_includes) $(MISDN_INCLUDE) $(GSM_INCLUDE) $(SS5_INCLUDE) $(SIP_INCLUDE) -Wall $(INSTALLATION_DEFINES)
+INCLUDES = $(all_includes) -I$(top_srcdir)/include $(MISDN_INCLUDE) $(GSM_INCLUDE) $(SS5_INCLUDE) $(SIP_INCLUDE) -Wall $(INSTALLATION_DEFINES)
 
 lcr_SOURCES = \
        main.c select.c trace.c options.c tones.c alawulaw.c cause.c interface.c message.c callerid.c socket_server.c \