From 5a570d17320e8839592119839e55477a407e5be9 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 3 Oct 2008 17:34:03 +0000 Subject: [PATCH] Only export functions that are part of the public api. --- src/Makefile.am | 16 +++++++++- src/libdivecomputer.symbols | 60 +++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/libdivecomputer.symbols diff --git a/src/Makefile.am b/src/Makefile.am index 2b9f3f2..1b2be11 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,9 @@ libdivecomputer_HEADERS = \ lib_LTLIBRARIES = libdivecomputer.la -libdivecomputer_la_LDFLAGS = -no-undefined +libdivecomputer_la_LDFLAGS = \ + -no-undefined \ + -export-symbols libdivecomputer.exp libdivecomputer_la_SOURCES = \ device.h device-private.h device.c \ @@ -64,3 +66,15 @@ libdivecomputer_la_SOURCES += \ irda.h irda.c \ uwatec_smart.h uwatec_smart.c endif + +libdivecomputer_la_DEPENDENCIES = libdivecomputer.exp + +libdivecomputer.exp: libdivecomputer.symbols +if IRDA + $(CPP) -P -DSERIAL -DIRDA - < $< | sed -e '/^$$/d' > $@ +else + $(CPP) -P -DSERIAL - < $< | sed -e '/^$$/d' > $@ +endif + +CLEANFILES = libdivecomputer.exp +EXTRA_DIST = libdivecomputer.symbols diff --git a/src/libdivecomputer.symbols b/src/libdivecomputer.symbols new file mode 100644 index 0000000..e593b82 --- /dev/null +++ b/src/libdivecomputer.symbols @@ -0,0 +1,60 @@ +device_close +device_dump +device_foreach +device_get_type +device_handshake +device_read +device_set_progress +device_version +device_write + +message +message_set_logfile + +#ifdef SERIAL +oceanic_atom2_device_handshake +oceanic_atom2_device_open +oceanic_atom2_device_quit +reefnet_sensuspro_device_open +reefnet_sensuspro_device_set_timestamp +reefnet_sensuspro_device_write_interval +reefnet_sensuspro_extract_dives +reefnet_sensusultra_device_open +reefnet_sensusultra_device_read_user +reefnet_sensusultra_device_sense +reefnet_sensusultra_device_set_maxretries +reefnet_sensusultra_device_set_timestamp +reefnet_sensusultra_device_write_averaging +reefnet_sensusultra_device_write_endcount +reefnet_sensusultra_device_write_interval +reefnet_sensusultra_device_write_threshold +reefnet_sensusultra_device_write_user +reefnet_sensusultra_extract_dives +suunto_d9_device_open +suunto_d9_device_reset_maxdepth +suunto_eon_device_open +suunto_eon_device_write_interval +suunto_eon_device_write_name +suunto_eon_extract_dives +suunto_spyder_extract_dives +suunto_vyper2_device_open +suunto_vyper2_device_reset_maxdepth +suunto_vyper_device_open +suunto_vyper_device_read_dive +suunto_vyper_device_set_delay +suunto_vyper_extract_dives +uwatec_aladin_device_open +uwatec_aladin_device_set_timestamp +uwatec_aladin_extract_dives +uwatec_memomouse_device_open +uwatec_memomouse_device_set_timestamp +uwatec_memomouse_extract_dives +#endif + +#ifdef IRDA +uwatec_smart_device_handshake +uwatec_smart_device_open +uwatec_smart_device_set_timestamp +uwatec_smart_device_version +uwatec_smart_extract_dives +#endif