From 6592692448f8b4f35e2eb8fc9d6e31375a6a4ae3 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sun, 4 Aug 2019 18:21:06 +0300 Subject: [PATCH] genesys: Compile genesys_devices.cc as a separate translation unit --- backend/Makefile.am | 3 ++- backend/genesys.cc | 1 - backend/genesys_devices.cc | 2 ++ backend/genesys_low.h | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/Makefile.am b/backend/Makefile.am index 2c20110cd..c4a4e1256 100644 --- a/backend/Makefile.am +++ b/backend/Makefile.am @@ -484,6 +484,7 @@ libgenesys_la_SOURCES = genesys.cc genesys.h \ genesys_buffer.h genesys_buffer.cc \ genesys_calibration.h \ genesys_device.h genesys_device.cc \ + genesys_devices.cc \ genesys_enums.h \ genesys_error.h genesys_error.cc \ genesys_gl646.cc genesys_gl646.h genesys_gl841.cc genesys_gl841.h \ @@ -505,7 +506,7 @@ libsane_genesys_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) libsane_genesys_la_LIBADD = $(COMMON_LIBS) libgenesys.la ../sanei/sanei_magic.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo $(MATH_LIB) $(USB_LIBS) $(RESMGR_LIBS) EXTRA_DIST += genesys.conf.in # TODO: Why are this distributed but not compiled? -EXTRA_DIST += genesys_conv.cc genesys_conv_hlp.cc genesys_devices.cc +EXTRA_DIST += genesys_conv.cc genesys_conv_hlp.cc libgphoto2_i_la_SOURCES = gphoto2.c gphoto2.h libgphoto2_i_la_CPPFLAGS = $(AM_CPPFLAGS) $(GPHOTO2_CPPFLAGS) -DBACKEND_NAME=gphoto2 diff --git a/backend/genesys.cc b/backend/genesys.cc index be737a904..c166cd1ff 100644 --- a/backend/genesys.cc +++ b/backend/genesys.cc @@ -64,7 +64,6 @@ #include "genesys_sanei.h" #include "../include/sane/sanei_config.h" #include "../include/sane/sanei_magic.h" -#include "genesys_devices.cc" #include #include diff --git a/backend/genesys_devices.cc b/backend/genesys_devices.cc index a611f5100..ad397aa21 100644 --- a/backend/genesys_devices.cc +++ b/backend/genesys_devices.cc @@ -55,6 +55,8 @@ /* Some setup DAC and CCD tables */ /* ------------------------------------------------------------------------ */ +#define DEBUG_DECLARE_ONLY + #include "genesys_low.h" StaticInit> s_frontends; diff --git a/backend/genesys_low.h b/backend/genesys_low.h index 28f5b7491..1d4796dcc 100644 --- a/backend/genesys_low.h +++ b/backend/genesys_low.h @@ -669,6 +669,11 @@ private: }; extern StaticInit> s_sensors; +extern StaticInit> s_frontends; +extern StaticInit> s_gpo; +extern StaticInit> s_motors; +extern StaticInit> s_usb_devices; + void genesys_init_sensor_tables(); void genesys_init_frontend_tables(); void genesys_init_gpo_tables();