aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-30 19:39:55 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-02 14:03:00 +0200
commitb8f22bd6c7d5a60f2db9afdcd4931ab1ccc3a2b8 (patch)
tree99e43c16575ccbc46f696a17a2a250805a2e88cd /src
parentfd815bba12c05e12fa3f73c54c071475f0105686 (diff)
src/gprs/Makefile.am: Move build of shared .c files to an internal lib
Build files shared by osmo-sgsn, osmo-gbpy and osmo-gtphub into a .la library, so we can later split each application into its own subdir and clearly identify what's used by who. Due to a dependency error with .Po files, I cannot depend on the specific .o files directly in LDADD for each binary, but it works fine on follow up commits when binaries are splitted into different makefiles, so it will be done later. Change-Id: Ib7665c530c086a5f3135c395bb8bf19ed4a882b6
Diffstat (limited to 'src')
-rw-r--r--src/gprs/Makefile.am32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am
index 05d5b4c3..0471bfe7 100644
--- a/src/gprs/Makefile.am
+++ b/src/gprs/Makefile.am
@@ -35,6 +35,25 @@ OSMO_LIBS = \
$(LIBGTP_LIBS) \
$(NULL)
+noinst_LTLIBRARIES = libcommon.la
+
+libcommon_la_SOURCES = \
+ gprs_gb_parse.c \
+ gprs_llc_parse.c \
+ crc24.c \
+ gprs_utils.c \
+ sgsn_ares.c \
+ $(NULL)
+
+libcommon_la_LIBADD = \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ $(LIBOSMOVTY_LIBS) \
+ $(LIBGTP_LIBS) \
+ $(LIBOSMOSIGTRAN_LIBS) \
+ $(LIBCARES_LIBS) \
+ $(NULL)
+
bin_PROGRAMS = \
osmo-gbproxy \
osmo-sgsn \
@@ -49,12 +68,9 @@ osmo_gbproxy_SOURCES = \
gb_proxy_patch.c \
gb_proxy_tlli.c \
gb_proxy_peer.c \
- gprs_gb_parse.c \
- gprs_llc_parse.c \
- crc24.c \
- gprs_utils.c \
$(NULL)
osmo_gbproxy_LDADD = \
+ libcommon.la \
$(OSMO_LIBS) \
-lrt \
$(NULL)
@@ -77,20 +93,17 @@ osmo_sgsn_SOURCES = \
sgsn_vty.c \
sgsn_libgtp.c \
gprs_llc.c \
- gprs_llc_parse.c \
gprs_llc_vty.c \
- crc24.c \
sgsn_ctrl.c \
sgsn_auth.c \
gprs_subscriber.c \
- gprs_utils.c \
sgsn_cdr.c \
- sgsn_ares.c \
slhc.c \
gprs_llc_xid.c \
v42bis.c \
$(NULL)
osmo_sgsn_LDADD = \
+ libcommon.la \
$(OSMO_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOGSUPCLIENT_LIBS) \
@@ -113,10 +126,9 @@ osmo_gtphub_SOURCES = \
gtphub_sock.c \
gtphub_ares.c \
gtphub_vty.c \
- sgsn_ares.c \
- gprs_utils.c \
$(NULL)
osmo_gtphub_LDADD = \
+ libcommon.la \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \