Skip to content

Commit

Permalink
Merge the 3 librohc_*.so libraries into one single librohc.so library.
Browse files Browse the repository at this point in the history
The 3 libraries are used together almost everytime, so better have one single
library. It avoids exposing some private parts of the librohc_common.so
library.

Also remove the dllexport.h and its ROHC_EXPORT constant, and the symbols of
the now-internal librohc_*.so libraries. Also, rename of the source files
that shared the same name in compression and decompression parts: includes
are now clearer.
  • Loading branch information
didier-barvaux committed Jun 27, 2014
1 parent acc5220 commit e4f7f65
Show file tree
Hide file tree
Showing 89 changed files with 605 additions and 903 deletions.
22 changes: 8 additions & 14 deletions app/fuzzer/Makefile.am
Expand Up @@ -24,18 +24,15 @@ rohc_fuzzer_CPPFLAGS = \
-I$(top_srcdir)/src/decomp

rohc_fuzzer_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs \
-L$(top_builddir)/src/decomp/.libs
$(configure_ldflags)

rohc_fuzzer_SOURCES = \
fuzzer.c

rohc_fuzzer_LDADD = \
-lrohc_comp \
-lrohc_decomp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/decomp/librohc_decomp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)

rohc_fuzzer.1: $(rohc_fuzzer_SOURCES) $(builddir)/rohc_fuzzer
Expand All @@ -55,18 +52,15 @@ rohc_rtp_fuzzer_CPPFLAGS = \
-I$(top_srcdir)/src/decomp

rohc_rtp_fuzzer_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs \
-L$(top_builddir)/src/decomp/.libs
$(configure_ldflags)

rohc_rtp_fuzzer_SOURCES = \
rtp_fuzzer.c

rohc_rtp_fuzzer_LDADD = \
-lrohc_comp \
-lrohc_decomp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/decomp/librohc_decomp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)

rohc_rtp_fuzzer.1: $(rohc_rtp_fuzzer_SOURCES) $(builddir)/rohc_rtp_fuzzer
Expand Down
20 changes: 7 additions & 13 deletions app/performance/Makefile.am
Expand Up @@ -25,35 +25,29 @@ rohc_test_performance_CPPFLAGS = \
-I$(top_srcdir)/src/decomp \
$(libpcap_includes)
rohc_test_performance_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs \
-L$(top_builddir)/src/decomp/.libs
$(configure_ldflags)
rohc_test_performance_SOURCES = test_performance.c
rohc_test_performance_LDADD = \
-l$(pcap_lib_name) \
-lrohc_comp \
-lrohc_decomp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/decomp/librohc_decomp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)


rohc_gen_stream_CFLAGS = \
$(configure_cflags)
rohc_gen_stream_CPPFLAGS = \
-I$(top_srcdir)/src/ \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/comp \
$(libpcap_includes)
rohc_gen_stream_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs
$(configure_ldflags)
rohc_gen_stream_SOURCES = rohc_gen_stream.c
rohc_gen_stream_LDADD = \
-l$(pcap_lib_name) \
-lrohc_comp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)


Expand Down
11 changes: 4 additions & 7 deletions app/sniffer/Makefile.am
Expand Up @@ -23,19 +23,16 @@ rohc_sniffer_CPPFLAGS = \
$(libpcap_includes)

rohc_sniffer_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs \
-L$(top_builddir)/src/decomp/.libs
$(configure_ldflags)

rohc_sniffer_SOURCES = \
sniffer.c

rohc_sniffer_LDADD = \
-l$(pcap_lib_name) \
-lrohc_comp \
-lrohc_decomp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/decomp/librohc_decomp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)


Expand Down
8 changes: 3 additions & 5 deletions app/stats/Makefile.am
Expand Up @@ -25,17 +25,15 @@ rohc_stats_CPPFLAGS = \
$(libpcap_includes)

rohc_stats_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs
$(configure_ldflags)

rohc_stats_SOURCES = \
rohc_stats.c

rohc_stats_LDADD = \
-l$(pcap_lib_name) \
-lrohc_comp \
-lrohc_common \
$(top_builddir)/src/comp/librohc_comp.la \
$(top_builddir)/src/common/librohc_common.la \
$(additional_platform_libs)


Expand Down
1 change: 0 additions & 1 deletion autogen.sh
Expand Up @@ -59,7 +59,6 @@ $( dirname $0 )/configure \
--enable-app-fuzzer \
--enable-app-performance \
--enable-app-sniffer \
--enable-app-tunnel \
--enable-app-stats \
--enable-rohc-tests \
--enable-doc \
Expand Down
1 change: 0 additions & 1 deletion doc/Makefile.am
Expand Up @@ -94,7 +94,6 @@ endif


rohc_all_sources = \
$(top_srcdir)/src/*.h \
$(top_srcdir)/src/test/*.c \
$(top_srcdir)/src/common/*.c \
$(top_srcdir)/src/common/*.h \
Expand Down
32 changes: 12 additions & 20 deletions examples/Makefile.am
Expand Up @@ -26,14 +26,12 @@ simple_rohc_program_CPPFLAGS = \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/comp
simple_rohc_program_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs
-L$(top_builddir)/src/.libs \
$(configure_ldflags)
simple_rohc_program_SOURCES = \
simple_rohc_program.c
simple_rohc_program_LDADD = \
-lrohc_comp \
-lrohc_common \
-lrohc \
$(additional_platform_libs)


Expand All @@ -43,12 +41,12 @@ print_rohc_version_CFLAGS = \
print_rohc_version_CPPFLAGS = \
-I$(top_srcdir)/src/common
print_rohc_version_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs
-L$(top_builddir)/src/.libs \
$(configure_ldflags)
print_rohc_version_SOURCES = \
print_rohc_version.c
print_rohc_version_LDADD = \
-lrohc_common \
-lrohc \
$(additional_platform_libs)


Expand All @@ -60,16 +58,12 @@ example_rohc_decomp_CPPFLAGS = \
-I$(top_srcdir)/src/comp \
-I$(top_srcdir)/src/decomp
example_rohc_decomp_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs \
-L$(top_builddir)/src/decomp/.libs
-L$(top_builddir)/src/.libs \
$(configure_ldflags)
example_rohc_decomp_SOURCES = \
example_rohc_decomp.c
example_rohc_decomp_LDADD = \
-lrohc_decomp \
-lrohc_comp \
-lrohc_common \
-lrohc \
$(additional_platform_libs)


Expand All @@ -80,13 +74,11 @@ rtp_detection_CPPFLAGS = \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/comp
rtp_detection_LDFLAGS = \
$(configure_ldflags) \
-L$(top_builddir)/src/common/.libs \
-L$(top_builddir)/src/comp/.libs
-L$(top_builddir)/src/.libs \
$(configure_ldflags)
rtp_detection_SOURCES = \
rtp_detection.c
rtp_detection_LDADD = \
-lrohc_comp \
-lrohc_common \
-lrohc \
$(additional_platform_libs)

18 changes: 9 additions & 9 deletions linux/kmod/Makefile
Expand Up @@ -24,15 +24,15 @@ rohc_common_sources = \
../../src/common/sdvl.c \
../../src/common/ip.c \
../../src/common/net_pkt.c \
../../src/common/comp_list.c \
../../src/common/rohc_list.c \
../../src/common/feedback_parse.c

rohc_comp_sources = \
../../src/comp/schemes/cid.c \
../../src/comp/schemes/wlsb.c \
../../src/comp/schemes/scaled_rtp_ts.c \
../../src/comp/schemes/list.c \
../../src/comp/schemes/list_ipv6.c \
../../src/comp/schemes/comp_wlsb.c \
../../src/comp/schemes/comp_scaled_rtp_ts.c \
../../src/comp/schemes/comp_list.c \
../../src/comp/schemes/comp_list_ipv6.c \
../../src/comp/schemes/rfc4996.c \
../../src/comp/rohc_comp.c \
../../src/comp/c_uncompressed.c \
Expand All @@ -45,11 +45,11 @@ rohc_comp_sources = \
../../src/comp/c_tcp.c

rohc_decomp_sources = \
../../src/decomp/schemes/wlsb.c \
../../src/decomp/schemes/decomp_wlsb.c \
../../src/decomp/schemes/ip_id_offset.c \
../../src/decomp/schemes/scaled_rtp_ts.c \
../../src/decomp/schemes/list.c \
../../src/decomp/schemes/list_ipv6.c \
../../src/decomp/schemes/decomp_scaled_rtp_ts.c \
../../src/decomp/schemes/decomp_list.c \
../../src/decomp/schemes/decomp_list_ipv6.c \
../../src/decomp/schemes/rfc4996.c \
../../src/decomp/rohc_decomp_detect_packet.c \
../../src/decomp/rohc_decomp.c \
Expand Down
2 changes: 1 addition & 1 deletion rohc.pc.in
Expand Up @@ -6,5 +6,5 @@ includedir=@includedir@
Name: RObust Header Compression (ROHC)
Description: Free and efficient library that implements the ROHC protocol
Version: @VERSION@
Libs: -L${libdir} -lrohc -lrohc_decomp -lrohc_comp -lrohc_common @additional_platform_libs@
Libs: -L${libdir} -lrohc @additional_platform_libs@
Cflags: -I${includedir}
3 changes: 2 additions & 1 deletion src/Makefile.am
Expand Up @@ -21,6 +21,7 @@ librohc_la_LIBADD = \
$(additional_platform_libs)
librohc_la_LDFLAGS = \
$(configure_ldflags) \
-export-symbols $(srcdir)/librohc.symbols \
-no-undefined \
-version-info $(ROHC_API_CURRENT):$(ROHC_API_REVISION):$(ROHC_API_AGE)
librohc_la_CFLAGS =
Expand All @@ -31,5 +32,5 @@ librohc_la_DEPENDENCIES = \
$(builddir)/decomp/librohc_decomp.la

EXTRA_DIST = \
dllexport.h
librohc.symbols

15 changes: 5 additions & 10 deletions src/common/Makefile.am
Expand Up @@ -9,7 +9,7 @@
SUBDIRS = protocols .


lib_LTLIBRARIES = librohc_common.la
noinst_LTLIBRARIES = librohc_common.la

sources = \
rohc_common.c \
Expand All @@ -23,7 +23,7 @@ sources = \
sdvl.c \
ip.c \
net_pkt.c \
comp_list.c \
rohc_list.c \
feedback_parse.c

public_headers = \
Expand Down Expand Up @@ -53,32 +53,27 @@ private_headers = \
sdvl.h \
ip.h \
net_pkt.h \
comp_list.h \
rohc_list.h \
feedback_parse.h

librohc_common_la_SOURCES = $(sources)
librohc_common_la_LIBADD = \
$(builddir)/protocols/librohc_proto.la \
$(additional_platform_libs)
librohc_common_la_LDFLAGS = \
$(configure_ldflags) \
-export-symbols $(srcdir)/librohc_common.symbols \
-no-undefined \
-version-info $(ROHC_API_CURRENT):$(ROHC_API_REVISION):$(ROHC_API_AGE)
$(configure_ldflags)
librohc_common_la_CFLAGS = \
$(configure_cflags)
librohc_common_la_CPPFLAGS = \
-I$(top_srcdir)/src
librohc_common_la_DEPENDENCIES = \
$(builddir)/protocols/librohc_proto.la \
$(srcdir)/librohc_common.symbols
$(builddir)/protocols/librohc_proto.la

include_HEADERS = $(public_compat_headers)
pkginclude_HEADERS = $(public_headers)
noinst_HEADERS = $(private_headers)

# extra files for releases
EXTRA_DIST = \
librohc_common.symbols \
rohc

0 comments on commit e4f7f65

Please sign in to comment.