From 13a6c8b064493a9987f7e83417098e203e792150 Mon Sep 17 00:00:00 2001 From: "Henrique F. Simoes" Date: Mon, 4 Nov 2024 15:02:48 -0300 Subject: [PATCH 1/2] Use top-level areaDetector settings for glib GLib is a dependency for other areaDetector modules, and it should be defined in the top-level areaDetector CONFIG_SITE.local. Let's use that instead of hard-coding deploy specific paths into src/Makefile. --- pimegaApp/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimegaApp/src/Makefile b/pimegaApp/src/Makefile index 529bbee..3e3cc3f 100644 --- a/pimegaApp/src/Makefile +++ b/pimegaApp/src/Makefile @@ -6,7 +6,7 @@ include $(TOP)/configure/CONFIG # Build an Support Module # ------------------------------- -USR_INCLUDES += -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include +USR_INCLUDES += $(addprefix -I, $(GLIB_INCLUDE)) #INC += pimegaDetector.h From c39bedeeb9c3acc13beca1f7d42cac3fe498f63d Mon Sep 17 00:00:00 2001 From: "Henrique F. Simoes" Date: Wed, 23 Aug 2023 11:05:19 -0300 Subject: [PATCH 2/2] Use pimega library from system installation Expect the library to be already installed in the system directories to simplify IOC build system and make the library version less coupled with support module. Since develop cycles happen in a high frequency now, this is being preferred over importing headers and binaries into a support module, as done in other areaDetector modules with proprietary SDKs. We need to explicitly define include directory for pimega library due to the usage of `#include ""` directives. By default, we expect headers to be installed under `pimega` directory, to avoid their generic subdirectories from conflicting with other application headers. This should be redefined in CONFIG_SITE.local to override the default value if needed. --- Makefile | 3 -- configure/CONFIG_SITE | 2 ++ pimegaApp/src/Makefile | 3 +- pimegaSupport/Makefile | 67 ------------------------------------------ 4 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 pimegaSupport/Makefile diff --git a/Makefile b/Makefile index d022c04..cca7c32 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,7 @@ TOP = . include $(TOP)/configure/CONFIG DIRS := $(DIRS) configure -DIRS := $(DIRS) pimegaSupport DIRS := $(DIRS) pimegaApp - -pimegaApp_DEPEND_DIRS += pimegaSupport ifeq ($(BUILD_IOCS), YES) DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard iocs)) iocs_DEPEND_DIRS += pimegaApp diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 7d14ecd..eab75b9 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -19,6 +19,8 @@ CHECK_RELEASE = YES HOST_OPT=NO +PIMEGA_INCLUDE=/usr/local/include/pimega + # Set this when you only want to compile this application # for a subset of the cross-compiled target architectures # that Base is built for. diff --git a/pimegaApp/src/Makefile b/pimegaApp/src/Makefile index 3e3cc3f..b14979b 100644 --- a/pimegaApp/src/Makefile +++ b/pimegaApp/src/Makefile @@ -7,8 +7,7 @@ include $(TOP)/configure/CONFIG # ------------------------------- USR_INCLUDES += $(addprefix -I, $(GLIB_INCLUDE)) - -#INC += pimegaDetector.h +USR_INCLUDES += $(addprefix -I, $(PIMEGA_INCLUDE)) LIBRARY_IOC_Linux += pimegaDetector diff --git a/pimegaSupport/Makefile b/pimegaSupport/Makefile deleted file mode 100644 index 2a790b4..0000000 --- a/pimegaSupport/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -TOP=.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE -#============================= - -USR_INCLUDES += -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include - -INC += pimega.h -INC += decode.h -INC += utils.h -INC += lib/acquisition.h -INC += lib/backend_config.h -INC += lib/backend_interface.h -INC += lib/config_file.h -INC += lib/config.h -INC += lib/dac.h -INC += lib/debug.h -INC += lib/generic.h -INC += lib/load.h -INC += lib/monitoring.h -INC += lib/omr.h -INC += lib/scan.h -INC += lib/sd_card.h -INC += lib/system.h -INC += lib/test_pulse.h -INC += lib/trigger.h -INC += lib/pimega_thread.h -INC += lib/message_broker.hpp -INC += lib/zmq_message_broker.hpp -INC += driver/US_acquisition.h -INC += driver/US_dac.h -INC += driver/US_debug.h -INC += driver/US_ethernet.h -INC += driver/US_generic.h -INC += driver/US_interface.h -INC += driver/US_load.h -INC += driver/US_monitoring.h -INC += driver/US_omr.h -INC += driver/US_scan.h -INC += driver/US_sd_card.h -INC += driver/US_serial.h -INC += driver/US_system.h -INC += driver/US_test_pulse.h -INC += driver/US_trigger.h -INC += compatibility/compatibility.h -INC += compatibility/default/trigger/trigger.h -INC += compatibility/default/default_enums.h -INC += compatibility/default/test_pulse/test_pulse.h -INC += compatibility/default/system/system.h -INC += compatibility/old_versions/old_versions.h -INC += compatibility/old_versions/version_4_0_x/commands.h -INC += compatibility/old_versions/version_3_16_x_4_0_x/commands.h - -ifeq (linux-x86_64, $(findstring linux-x86_64, $(T_A))) -LIB_INSTALLS_Linux += ../os/linux-x86_64/libpimega.so -endif - -ifeq (linux-ppc64, $(findstring linux-ppc64, $(T_A))) -LIB_INSTALLS_Linux += ../os/linux-ppc64/libpimega.so -endif - -#============================= - -include $(TOP)/configure/RULES -#---------------------------------------- -# ADD RULES AFTER THIS LINE