Commit 97140775 authored by Roberto Arturo Homs-Regojo's avatar Roberto Arturo Homs-Regojo

Merge branch 'core-1.7' of github.com:esrf-bliss/Lima into core-1.7

parents 88d6d7e4 58aa80ed
Subproject commit 4527bfc00e9d88c9e0e8b9528dec7f6b444cf93d
Subproject commit ecfee93f38d485649884e28ddaeff4e3142a6675
......@@ -20,9 +20,6 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../config.inc
############################
# HELPER MACROS
############################
......@@ -31,6 +28,10 @@ this-dir := $(shell pwd)
lima-dir := $(this-dir)/..
third-party-dir := $(lima-dir)/third-party
LIMA_DIR = $(lima-dir)
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
full-version = $(shell cat $(1))
minor-version = $(shell echo $(call full-version,$(1)) | cut -f1-2 -d.)
ifneq ($(LINK_STRICT_VERSION),0)
......@@ -44,20 +45,6 @@ lib-full = $(call lib-base,$(1)).$(call full-version,$(2))
lib-minor = $(call lib-base,$(1)).$(call minor-version,$(2))
lib-link = $(call lib-base,$(1)).$(call link-version,$(2))
lib-flags = -fPIC -Wl,-soname,$(call lib-link,$(1),$(2))
lib-depshcmd = for p in $(1); do \
d=$$(echo $${p} | cut -d, -f1); \
l=$$(echo $${p} | cut -d, -f2); \
template=$$(echo $${p} | cut -d, -f3); \
if [ ! -z $${template} ] ; then \
eval echo $${template}; \
else \
echo $(2); \
fi \
done
lib-depflagsstr = "-L $${d} -Wl,-rpath=$${d}"
lib-depflags = $(shell $(call lib-depshcmd,$(1),$(lib-depflagsstr)))
lib-deplibs = $(shell $(call lib-depshcmd,$(1),"-l$${l}"))
lib-deps = $(shell $(call lib-depshcmd,$(1),"$${d}/lib$${l}.so"))
# 1=name, 2=ver-file 3=deps 4=flags 5=libs, 6=target, 7=objs
compile-lib = \
......@@ -75,40 +62,12 @@ create-links = \
# LIMA - CORE
############################
CORE_LDFLAGS :=
CORE_LDLIBS := -lrt
CORE_DEPLIBS := $(third-party-dir)/Processlib/build,processlib
ifneq ($(COMPILE_CBF_SAVING),0)
CORE_LDLIBS += -lcrypto
CORE_DEPLIBS += $(third-party-dir)/CBFLib/lib,cbf,'$${d}/lib$${l}.a'
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CORE_DEPLIBS += $(third-party-dir)/cfitsio/lib,cfitsio \
$(third-party-dir)/CCfits/.libs,CCfits
endif
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CORE_LDLIBS += -lz
endif
ifneq ($(COMPILE_EDFLZ4_SAVING),0)
CORE_LDLIBS += -llz4
endif
ifneq ($(COMPILE_TIFF_SAVING),0)
CORE_LDLIBS += -ltiff
endif
CORE_LDFLAGS := $(CT_LDFLAGS)
CORE_LDLIBS := $(CT_LDLIBS)
CORE_DEPLIBS := $(CT_DEPLIBS)
ifneq ($(COMPILE_HDF5_SAVING),0)
PROCESSOR_TYPE := $(shell uname -m)
CORE_DEPLIBS += $(third-party-dir)/hdf5/src/.libs,hdf5 \
$(third-party-dir)/hdf5/c++/src/.libs,hdf5_cpp
endif
ifneq ($(COMPILE_CONFIG),0)
CORE_DEPLIBS += $(third-party-dir)/libconfig/lib/.libs,config++
endif
ifneq ($(COMPILE_CORE),0)
......
Subproject commit abae92807d739a5d5810dff99a2dd28d3814c496
Subproject commit 0c900768d0a18cee5b9e570da26064762bcfdb49
Subproject commit 32a596d6921e93168a5624d793bbb653a1aed516
Subproject commit 3006220926eeee96f855e8ebdd64d4e96046084a
Subproject commit 8e995e521658a44570127bf01315befaac9f8c4a
Subproject commit 820cec6271f39803ba82e755b8b93eec3a356dec
Subproject commit 5b422b1451a5f4b674c92b8fa664fdc386e6e730
Subproject commit 0cf4590aee261d66e7a4b8318557bc93eb4b1640
Subproject commit 7b929bcfafd3d3ab7548330a3cce43e9f65ca843
Subproject commit 67e0068d244cbb5e8fa417ecbfb4f98105913a1a
......@@ -19,14 +19,19 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
simu-objs = SimulatorFrameBuilder.o SimulatorCamera.o SimulatorInterface.o \
SimulatorSyncCtrlObj.o SimulatorDetInfoCtrlObj.o SimulatorShutterCtrlObj.o
SRCS = $(simu-objs:.o=.cpp)
CXX = g++
INC = -I../include -I../../../common/include -I../../../hardware/include
CXXFLAGS += $(INC) -Wall -pthread -fPIC -g
CPPFLAGS = -I../include $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
all: Simu.o
......@@ -37,7 +42,7 @@ clean:
rm -f Simu.o *.P $(simu-objs)
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -47,4 +52,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,36 +19,38 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
simu-objs = ../src/Simu.o
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
test-objs = test.o
test-ext-objs = $(simu-objs)
testsimulator-objs = testsimulator.o
testsimulator-ext-objs = $(simu-objs)
testsimuhwinterface-objs = testsimuhwinterface.o
testsimuhwinterface-ext-objs = $(simu-objs)
SRCS = $(test-objs:.o=.cpp) $(testsimulator-objs:.o=.cpp) \
$(testsimuhwinterface-objs:.o=.cpp)
INC = -I../include -I../../../common/include -I../../../hardware/include -I../../../third-party/Processlib/core/include
CXXFLAGS += $(INC) -Wall -pthread -g
LDFLAGS = -L../../../third-party/Processlib/build -lprocesslib -L../../../build -llimacore -pthread -lrt
CPPFLAGS = -I../include $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) \
$(LIMA_DIR)/build,limacore \
$(LIMA_DIR)/build,limasimulator
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: test testsimulator testsimuhwinterface
test: $(test-objs) $(test-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
test: $(test-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
testsimulator: $(testsimulator-objs) $(testsimulator-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
testsimulator: $(testsimulator-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
testsimuhwinterface: $(testsimuhwinterface-objs) \
$(testsimuhwinterface-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
testsimuhwinterface: $(testsimuhwinterface-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
clean:
rm -f $(test-objs) test *.edf
......@@ -57,7 +59,7 @@ clean:
rm -f *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......
......@@ -19,7 +19,10 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../../config.inc
LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
common-objs := Constants.o SizeUtils.o Timestamp.o ThreadUtils.o Exceptions.o \
MemUtils.o RegExUtils.o AcqState.o Debug.o VideoUtils.o Event.o \
......@@ -29,10 +32,11 @@ has_not_inotify = $(shell grep INOTIFY_USER /boot/config-$(shell uname -r) >/dev
SRCS = $(common-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../hardware/include -I../../third-party/Processlib/core/include -Wall -pthread -fPIC -g
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
ifeq ($(has_not_inotify),0)
CXXFLAGS += -DHAS_INOTIFY
CPPFLAGS += -DHAS_INOTIFY
endif
ifndef COMPILE_CONFIG
......@@ -41,7 +45,7 @@ endif
ifneq ($(COMPILE_CONFIG),0)
common-objs += ConfigUtils.o
CXXFLAGS += -DWITH_CONFIG -I../../third-party/libconfig/lib
CPPFLAGS += -DWITH_CONFIG -I$(LIMA_DIR)/third-party/libconfig/lib
endif
all: Common.o
......@@ -54,7 +58,7 @@ clean:
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -64,4 +68,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,20 +19,27 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/control/control.inc
SRCS = testregex.cpp
CXXFLAGS = -Wall -I ../include -pthread -g
LDFLAGS = -L../../build/ -Wl,--no-as-needed,-rpath=$(shell pwd)/../../build -llimacore -lpthread
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) $(LIMA_DIR)/build,limacore
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: testregex
testregex: testregex.o
$(CXX) $(LDFLAGS) -o $@ $+
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
clean:
rm -f *.o testregex
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -42,4 +49,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
############################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2011
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
ct-objs = CtSaving.o CtControl.o CtAcquisition.o CtBuffer.o \
CtImage.o CtSaving_Edf.o CtShutter.o CtAccumulation.o CtVideo.o \
CtEvent.o
CT_INCLS = -I$(LIMA_DIR)/common/include \
-I$(LIMA_DIR)/hardware/include \
-I$(LIMA_DIR)/control/include \
-I$(LIMA_DIR)/control/software_operation/include \
-I$(LIMA_DIR)/third-party/Processlib/core/include \
-I$(LIMA_DIR)/third-party/Processlib/tasks/include \
-I$(LIMA_DIR)/third-party/Sps/Include # \
# -I/usr/include/nexuscpp/include
CT_CPPFLAGS =
CT_CXXFLAGS =
CT_DEPLIBS = $(LIMA_DIR)/third-party/Processlib/build,processlib
CT_LDFLAGS = -pthread
CT_LDLIBS = -lrt
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
endif
ifneq ($(COMPILE_CBF_SAVING),0)
ct-objs += CtSaving_Cbf.o
CT_INCLS += -I$(LIMA_DIR)/third-party/CBFLib/include
CT_CPPFLAGS += -DWITH_CBF_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/CBFLib/lib,cbf,'$${d}/lib$${l}.a'
CT_LDLIBS += -lcrypto
endif
ifndef COMPILE_HDF5_SAVING
COMPILE_HDF5_SAVING = 0
endif
ifneq ($(COMPILE_HDF5_SAVING),0)
ct-objs += CtSaving_Hdf5.o
CT_INCLS += -I$(LIMA_DIR)/third-party/hdf5/src
CT_INCLS += -I$(LIMA_DIR)/third-party/hdf5/c++/src
CT_CPPFLAGS += -DWITH_HDF5_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/hdf5/src/.libs,hdf5 \
$(LIMA_DIR)/third-party/hdf5/c++/src/.libs,hdf5_cpp
endif
ifndef COMPILE_NXS_SAVING
COMPILE_NXS_SAVING = 0
endif
ifneq ($(COMPILE_NXS_SAVING),0)
ct-objs += CtSaving_Nxs.o
# nexuscpp lib is not yet available but soon !
#CT_INCLS += -I$(LIMA_DIR)/third-party/NXSLib/include
CT_INCLS += `pkg-config nexuscpp --cflags-only-I`
CT_CPPFLAGS += -DWITH_NXS_SAVING
endif
ifndef COMPILE_FITS_SAVING
COMPILE_FITS_SAVING = 0
endif
ifneq ($(COMPILE_FITS_SAVING),0)
ct-objs += CtSaving_Fits.o
CT_INCLS += -I$(LIMA_DIR)/third-party/cfitsio -I$(LIMA_DIR)/third-party
CT_CPPFLAGS += -DWITH_FITS_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/cfitsio/lib,cfitsio,'$${d}/lib$${l}.a' \
$(LIMA_DIR)/third-party/CCfits/.libs,CCfits
endif
ifndef COMPILE_EDFGZ_SAVING
COMPILE_EDFGZ_SAVING = 0
endif
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CT_CPPFLAGS += -DWITH_EDFGZ_SAVING
CT_LDLIBS += -lz
endif
ifndef COMPILE_EDFLZ4_SAVING
COMPILE_EDFLZ4_SAVING = 0
endif
ifneq ($(COMPILE_EDFLZ4_SAVING),0)
CT_CPPFLAGS += -DWITH_EDFLZ4_SAVING
CT_LDLIBS += -llz4
endif
ifndef COMPILE_TIFF_SAVING
COMPILE_TIFF_SAVING = 0
endif
ifneq ($(COMPILE_TIFF_SAVING),0)
ct-objs += CtSaving_Tiff.o
CT_CPPFLAGS += -DWITH_TIFF_SAVING
CT_LDLIBS += -ltiff
endif
ifndef COMPILE_SPS_IMAGE
COMPILE_SPS_IMAGE = 0
endif
ifneq ($(COMPILE_SPS_IMAGE),0)
ct-objs += CtSpsImage.o $(LIMA_DIR)/third-party/Sps/Src/sps.o
CT_CPPFLAGS += -DWITH_SPS_IMAGE
endif
ifndef COMPILE_CONFIG
COMPILE_CONFIG = 0
endif
ifneq ($(COMPILE_CONFIG),0)
ct-objs += CtConfig.o
CT_INCLS += -I$(LIMA_DIR)/third-party/libconfig/lib
CT_CPPFLAGS += -DWITH_CONFIG
CT_DEPLIBS += $(LIMA_DIR)/third-party/libconfig/lib/.libs,config++
endif
CT_CPPFLAGS += $(CT_INCLS)
CT_CXXFLAGS += -fPIC -Wall -pthread -g
############################
# HELPER MACROS
############################
lib-depshcmd = for p in $(1); do \
d=$$(echo $${p} | cut -d, -f1); \
l=$$(echo $${p} | cut -d, -f2); \
template=$$(echo $${p} | cut -d, -f3); \
if [ ! -z $${template} ] ; then \
eval echo $${template}; \
else \
echo $(2); \
fi \
done
lib-depflagsstr = "-L $${d} -Wl,-rpath=$${d}"
lib-depflags = $(shell $(call lib-depshcmd,$(1),$(lib-depflagsstr)))
lib-deplibs = $(shell $(call lib-depshcmd,$(1),"-l$${l}"))
lib-deps = $(shell $(call lib-depshcmd,$(1),"$${d}/lib$${l}.so"))
......@@ -19,13 +19,17 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
ct-objs := SoftOpInternalMgr.o SoftOpExternalMgr.o SoftOpId.o
SRCS = $(ct-objs:.o=.cpp)
INCLUDES=-I../include -I../../../third-party/Processlib/core/include -I../../../third-party/Processlib/tasks/include -I../../../common/include
CXXFLAGS += $(INCLUDES) -fPIC -Wall -pthread -g
CPPFLAGS = -I../include \
-I$(LIMA_DIR)/third-party/Processlib/core/include \
-I$(LIMA_DIR)/third-party/Processlib/tasks/include \
-I$(LIMA_DIR)/common/include
CXXFLAGS = -fPIC -Wall -pthread -g
all: CtSoftwareOperation.o
......@@ -37,7 +41,7 @@ clean:
rm -f CtSoftwareOperation.o $(ct-objs) *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -48,4 +52,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -159,7 +159,7 @@ long SaveContainerFits::_writeFile(void* f,Data &aData,
}
delete naxes;
return Data.size(); // @todo fix me (it's only use for statistics)
return aData.size(); // @todo fix me (it's only use for statistics)
}
void SaveContainerFits::writeHeader(std::auto_ptr<CCfits::FITS> &fitsFile, CtSaving::HeaderMap &header)
......
......@@ -19,125 +19,29 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../../config.inc
LIMA_DIR := $(shell pwd)/../..
ct-objs := CtSaving.o CtControl.o CtAcquisition.o CtBuffer.o \
CtImage.o CtSaving_Edf.o CtShutter.o CtAccumulation.o CtVideo.o \
CtEvent.o
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
INCLUDES = -I. -I../include -I../../common/include -I../../hardware/include \
-I../software_operation/include \
-I../../third-party/Processlib/core/include \
-I../../third-party/Processlib/tasks/include \
-I../../third-party/Sps/Include # \
# -I/usr/include/nexuscpp/include
ifneq ($(LIBS),0)
LIBS=
endif
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
endif
ifndef COMPILE_NXS_SAVING
COMPILE_NXS_SAVING = 0
endif
ifndef COMPILE_FITS_SAVING
COMPILE_FITS_SAVING = 0
endif
ifndef COMPILE_EDFGZ_SAVING
COMPILE_EDFGZ_SAVING = 0
endif
ifndef COMPILE_EDFLZ4_SAVING
COMPILE_EDFLZ4_SAVING = 0
endif
ifndef COMPILE_TIFF_SAVING
COMPILE_TIFF_SAVING = 0
endif
ifneq ($(COMPILE_CBF_SAVING),0)
ct-objs += CtSaving_Cbf.o
INCLUDES += -I../../third-party/CBFLib/include
CXXFLAGS += -DWITH_CBF_SAVING
endif
ifneq ($(COMPILE_HDF5_SAVING),0)
ct-objs += CtSaving_Hdf5.o
INCLUDES += -I../../third-party/hdf5/src
INCLUDES += -I../../third-party/hdf5/c++/src
CXXFLAGS += -DWITH_HDF5_SAVING
endif
ifneq ($(COMPILE_NXS_SAVING),0)
ct-objs += CtSaving_Nxs.o
# nexuscpp lib is not yet available but soon !
#INCLUDES += -I../../third-party/NXSLib/include
INCLUDES += `pkg-config nexuscpp --cflags-only-I`
CXXFLAGS += -DWITH_NXS_SAVING
endif
ifneq ($(COMPILE_FITS_SAVING),0)
ct-objs += CtSaving_Fits.o
CXXFLAGS += -DWITH_FITS_SAVING -I../../third-party/cfitsio \
-I../../third-party
#LIBS += -L../../third-party/CCfits/.libs \
-L../../third-party/cfitsio/libs \
-lcfitsio \
-lCCfits
endif
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CXXFLAGS += -DWITH_EDFGZ_SAVING
endif
ifneq ($(COMPILE_EDFLZ4_SAVING),0)
CXXFLAGS += -DWITH_EDFLZ4_SAVING
endif
ifneq ($(COMPILE_TIFF_SAVING),0)
ct-objs += CtSaving_Tiff.o
CXXFLAGS += -DWITH_TIFF_SAVING
endif
ifndef COMPILE_SPS_IMAGE
COMPILE_SPS_IMAGE = 0
endif
ifneq ($(COMPILE_SPS_IMAGE),0)
ct-objs += CtSpsImage.o ../../third-party/Sps/Src/sps.o
CXXFLAGS += -DWITH_SPS_IMAGE
endif
ifndef COMPILE_CONFIG
COMPILE_CONFIG = 0
endif
ifneq ($(COMPILE_CONFIG),0)
ct-objs += CtConfig.o
CXXFLAGS += -DWITH_CONFIG -I../../third-party/libconfig/lib
endif
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
LDFLAGS = $(CT_LDFLAGS)
LDLIBS = $(CT_LIBS) $(lib-deplibs $(CT_DEPLIBS))
SRCS = $(ct-objs:.o=.cpp)
CXXFLAGS += $(INCLUDES) -fPIC -Wall -pthread -g
all: Ct.o
Ct.o: $(ct-objs) ../software_operation/src/CtSoftwareOperation.o
ld $(LIBS) -o $@ -r $+
ld -o $@ -r $+
clean:
rm -f Ct.o $(ct-objs) *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -147,4 +51,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,58 +19,38 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../../config.inc
LIMA_DIR := $(shell pwd)/../..
simu-objs = ../../camera/simulator/src/Simu.o
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
simutest-objs = simutest.o
simutest-ext-objs = $(simu-objs)
SRCS = $(simutest-objs:.o=.cpp)
INC = -I../include -I../../common/include -I../control/include \
-I../../hardware/include -I../../camera/simulator/include \
-I../software_operation/include \
-I../../third-party/Processlib/core/include \
-I../../third-party/Processlib/tasks/include
CPPFLAGS += $(INC)
CXXFLAGS += -g -Wall -pthread
LDFLAGS = -pthread
LDLIBS = -L../../build -llimacore \
-L../../third-party/Processlib/build -lprocesslib
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) $(LIMA_DIR)/build,limacore
build_targets = roicountertest
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
endif
ifneq ($(COMPILE_CBF_SAVING),0)
LDLIBS += -L../../third-party/CBFLib/lib -lcbf
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CXXFLAGS += -DWITH_FITS_SAVING -I../../third-party/cfitsio \
-I../../third-party
LDLIBS += -L../../third-party/CCfits/.libs \
-L../../third-party/cfitsio/lib \
-lcfitsio \
-lCCfits
endif
ifndef COMPILE_SIMULATOR
COMPILE_SIMULATOR = 0
endif
ifneq ($(COMPILE_SIMULATOR),0)
build_targets += simutest
CPPFLAGS += -I$(LIMA_DIR)/camera/simulator/include
DEPLIBS += $(LIMA_DIR)/build,limasimulator
endif
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: $(build_targets)
simutest: $(simutest-objs) $(simutest-ext-objs)
simutest: $(simutest-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
roicountertest: roicountertest.o
......@@ -81,7 +61,7 @@ clean:
roicountertest roicountertest.o
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -91,4 +71,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -56,13 +56,13 @@ bool HwFileEventCallbackHelper::nextFileExpected(int file_number,
bool continueAcq = m_cbk.newFrameReady(aNewFrameInfo);
if(continueFlag) continueFlag = continueAcq;
DatasPendingType::iterator i = m_pending_frame_infos.begin();
while(i != m_pending_frame_infos.end() && continueFlag)
while(i != m_pending_frame_infos.end())
{
++file_number;
if(i->first == file_number)
{
next_file_number_expected = file_number + 1;
continueFlag = m_cbk.newFrameReady(i->second);
continueFlag = m_cbk.newFrameReady(i->second) && continueFlag;
m_pending_frame_infos.erase(i);
}
else
......
......@@ -19,6 +19,11 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../..