X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=Makefile.am;h=622bc06419bcf8927aaa696b9fd612d7fa774e51;hp=844c2d86cc1ec025d1c2df65d814776c8058b5c9;hb=7308159228add750d8c3729846d950de5599a9e5;hpb=122a9b232937a3c8dcf791165f6db67c357fd1bf diff --git a/Makefile.am b/Makefile.am index 844c2d8..622bc06 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,10 +41,56 @@ 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) +GSM_INCLUDE = +GSM_SOURCE = +GSM_LIB = +if ENABLE_GSM + +GSM_INCLUDE += + +GSM_SOURCE += gsm_audio.c gsm.cpp gsm_conf.c + +GSM_LIB += /usr/lib/libgsm.a + +#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_GSM_BS + +GSM_INCLUDE += -DWITH_GSM_BS -I./openbsc/include -I./libosmocore/include -I./openbsc + +GSM_SOURCE += gsm_bs.cpp openbsc/src/bsc_init.c openbsc/src/bsc_vty.c openbsc/src/vty_interface_layer3.c openbsc/src/bsc_api.c openbsc/src/bsc_version.c + +GSM_LIB += ./openbsc/src/libbsc.a ./openbsc/src/libmsc.a ./openbsc/src/libvty.a -losmovty -losmocore -ldbi -lcrypt + +endif + +if ENABLE_GSM_MS + +GSM_INCLUDE += -DPACKAGE_VERSION=0 -DWITH_GSM_MS -I./layer23/include -I./libosmocore/include + +GSM_SOURCE += gsm_ms.cpp layer23/src/mobile/app_mobile.c + +GSM_LIB += ./layer23/src/mobile/libmobile.a \ + ./layer23/src/common/liblayer23.a \ + ./libosmocore/build-host/src/.libs/libosmocore.a \ + ./libosmocore/build-host/src/vty/.libs/libosmovty.a \ + ./libosmocore/build-host/src/codec/.libs/libosmocodec.a + +endif + +if ENABLE_SS5 + +SS5_INCLUDE = -DWITH_SS5 + +SS5_SOURCE = ss5.cpp ss5_encode.c ss5_decode.c + +endif bin_PROGRAMS = lcradmin gentones genwave @@ -54,19 +100,22 @@ if ENABLE_ASTERISK_CHANNEL_DRIVER noinst_PROGRAMS = chan_lcr.so chan_lcr_so_SOURCES = chan_lcr_so_LDFLAGS = -shared -chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po +chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po select.po chan_lcr.po: chan_lcr.c chan_lcr.h - $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po + $(CC) $(INCLUDES) $(AST_CFLAGS) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po bchannel.po: bchannel.c bchannel.h - $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c bchannel.c -o bchannel.po + $(CC) $(INCLUDES) -D_GNU_SOURCE $(CPPFLAGS) $(CFLAGS) -fPIC -c bchannel.c -o bchannel.po callerid.po: callerid.c callerid.h - $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c callerid.c -o callerid.po + $(CC) $(INCLUDES) -D_GNU_SOURCE $(CPPFLAGS) $(CFLAGS) -fPIC -c callerid.c -o callerid.po options.po: options.c options.h - $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c options.c -o options.po + $(CC) $(INCLUDES) -D_GNU_SOURCE $(CPPFLAGS) $(CFLAGS) -fPIC -c options.c -o options.po + +select.po: select.c select.h + $(CC) $(INCLUDES) -D_GNU_SOURCE $(CPPFLAGS) $(CFLAGS) -fPIC -c select.c -o select.po install-exec-hook: mkdir -p $(astmoddir) @@ -74,8 +123,10 @@ install-exec-hook: $(INSTALL) chan_lcr.so $(astmoddir) endif -lcr_SOURCES = action.cpp mISDN.cpp tones.c \ - action_efi.cpp crypt.cpp mail.c trace.c \ +INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) -Wall $(INSTALLATION_DEFINES) + +lcr_SOURCES = $(GSM_SOURCE) $(SS5_SOURCE) select.c action.cpp mISDN.cpp \ + tones.c loop.c remote.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 \ apppbx.cpp endpointapp.cpp join.cpp options.c \ @@ -83,7 +134,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 +163,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 +194,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