configure.ac: Add --disable-remsim-bankd

This allows builds on small/embedded platforms to avoid all the
dependencies required by remsim-bankd, including libpcsc-lite

Change-Id: I29a1a0131fdfea6742ec12d81228879066b1ff7e
changes/04/13504/1
Harald Welte 4 years ago
parent 9353c607fc
commit d7468e0b8c
  1. 12
      configure.ac
  2. 2
      doc/Makefile.am
  3. 0
      doc/examples/bankd_pcsc_slots.csv
  4. 16
      src/Makefile.am
  5. 23
      src/bankd/Makefile.am
  6. 0
      src/bankd/bankd.h
  7. 0
      src/bankd/bankd_main.c
  8. 0
      src/bankd/bankd_pcsc.c
  9. 0
      src/bankd/driver_core.c
  10. 0
      src/bankd/driver_pcsc.c
  11. 0
      src/bankd/internal.h
  12. 0
      src/bankd/main.c

@ -39,7 +39,6 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.11.0)
PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.11.0)
PKG_CHECK_MODULES(OSMOABIS, libosmoabis)
PKG_CHECK_MODULES(OSMOSIM, libosmosim)
PKG_CHECK_MODULES(PCSC, libpcsclite)
PKG_CHECK_MODULES(USB, libusb-1.0)
AC_ARG_ENABLE([remsim-server],[AS_HELP_STRING([--disable-remsim-server], [Build osmo-remsim-server])],
@ -52,6 +51,16 @@ fi
AM_CONDITIONAL(BUILD_SERVER, test "x$osmo_ac_build_server" = "xyes")
AC_SUBST(BUILD_SERVER)
AC_ARG_ENABLE([remsim-bankd],[AS_HELP_STRING([--disable-remsim-bankd], [Build osmo-remsim-bankd])],
[osmo_ac_build_bankd="$enableval"],[osmo_ac_build_bankd="yes"])
if test "$osmo_ac_build_bankd" = "yes"; then
AC_DEFINE(BUILD_BANKD, 1, [Define if we want to build osmo-remsim-bankd])
fi
AM_CONDITIONAL(BUILD_BANKD, test "x$osmo_ac_build_bankd" = "xyes")
PKG_CHECK_MODULES(PCSC, libpcsclite)
AC_SUBST(BUILD_BANKD)
AC_CONFIG_MACRO_DIR([m4])
dnl checks for header files
@ -142,6 +151,7 @@ AC_OUTPUT(
doc/manuals/Makefile
src/Makefile
src/rspro/Makefile
src/bankd/Makefile
src/server/Makefile
include/Makefile
include/osmocom/Makefile

@ -1,3 +1,5 @@
SUBDIRS = \
manuals \
$(NULL)
EXTRA_DIST = examples/bankd_pcsc_slots.csv

@ -1,4 +1,7 @@
SUBDIRS = rspro
if BUILD_BANKD
SUBDIRS += bankd
endif
if BUILD_SERVER
SUBDIRS += server
endif
@ -15,7 +18,7 @@ libosmo_rspro_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \
rspro/libosmo-asn1-rspro.la
libosmo_rspro_la_SOURCES = rspro_util.c asn1c_helpers.c
noinst_HEADERS = debug.h bankd.h client.h internal.h rspro_util.h slotmap.h rspro_client_fsm.h \
noinst_HEADERS = debug.h client.h rspro_util.h slotmap.h rspro_client_fsm.h \
asn1c_helpers.h \
simtrace2/apdu_dispatch.h \
simtrace2/libusb_util.h \
@ -23,16 +26,7 @@ noinst_HEADERS = debug.h bankd.h client.h internal.h rspro_util.h slotmap.h rspr
simtrace2/simtrace_prot.h \
simtrace2/simtrace_usb.h
bin_PROGRAMS = osmo-remsim-bankd osmo-remsim-client-st2
noinst_PROGRAMS = pcsc_test remsim-client
pcsc_test_SOURCES = driver_core.c driver_pcsc.c main.c
pcsc_test_LDADD = $(OSMOCORE_LIBS) \
$(PCSC_LIBS) libosmo-rspro.la
osmo_remsim_bankd_SOURCES = slotmap.c bankd_main.c bankd_pcsc.c rspro_client_fsm.c debug.c
osmo_remsim_bankd_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \
$(PCSC_LIBS) libosmo-rspro.la -lcsv
bin_PROGRAMS = osmo-remsim-client-st2
remsim_client_SOURCES = remsim_client.c rspro_client_fsm.c bankd_client_fsm.c debug.c
remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \

@ -0,0 +1,23 @@
AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src \
-I$(top_srcdir)/include/osmocom/rspro \
$(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMOABIS_CFLAGS) $(OSMOSIM_CFLAGS) \
$(PCSC_CFLAGS)
noinst_HEADERS = bankd.h internal.h
bin_PROGRAMS = osmo-remsim-bankd
noinst_PROGRAMS = pcsc_test
pcsc_test_SOURCES = driver_core.c driver_pcsc.c main.c
pcsc_test_LDADD = $(OSMOCORE_LIBS) \
$(PCSC_LIBS) $(top_builddir)/src/libosmo-rspro.la
osmo_remsim_bankd_SOURCES = ../slotmap.c ../rspro_client_fsm.c ../debug.c \
bankd_main.c bankd_pcsc.c
osmo_remsim_bankd_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) $(OSMOSIM_LIBS) \
$(PCSC_LIBS) $(top_builddir)/src/libosmo-rspro.la -lcsv
# as suggested in http://lists.gnu.org/archive/html/automake/2009-03/msg00011.html
FORCE:
$(top_builddir)/src/libosmo-rspro.la: FORCE
(cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libosmo-rspro.la)
Loading…
Cancel
Save