Commit ba242305 authored by Laurent Claustre's avatar Laurent Claustre

New camera ADSC added and python binding configuration updated

parent e889e747
......@@ -289,6 +289,40 @@ build_targets += $(roperscientific-full)
endif
############################
# LIMA - ADSC
############################
ifneq ($(COMPILE_ADSC),0)
ADSC_LDFLAGS := -L. -L../camera/adsc/sdk/adsc_sources/lib/linux
ADSC_LDLIBS := -lauxlib -ldetcon_th
name := adsc
adsc-objs := ../camera/adsc/src/Adsc.o
version-file := ../camera/adsc/VERSION
adsc-flags := $(ADSC_LDFLAGS)
adsc-deps := $(ADSC_LDLIBS)
full-version := $(shell cat $(version-file))
maj-version := $(shell echo $(full-version) | cut -f1 -d.)
adsc-base := liblima$(name).so
adsc-full := $(adsc-base).$(full-version)
adsc-maj := $(adsc-base).$(maj-version)
adsc-flags += -fPIC -Wl,-soname,$(adsc-maj)
$(adsc-full): $(adsc-objs)
$(CXX) -shared -o $@ $(adsc-flags) $+ $(adsc-deps)
rm -f $(adsc-maj); ln -s $(adsc-full) $(adsc-maj)
rm -f $(adsc-base); ln -s $(adsc-maj) $(adsc-base)
build_targets += $(adsc-full)
endif
src: $(build_targets)
......
......@@ -72,4 +72,12 @@ ifneq ($(COMPILE_ROPERSCIENTIFIC),0)
sub-dirs += roperscientific
endif
ifndef COMPILE_ADSC
COMPILE_ADSC = 0
endif
ifneq ($(COMPILE_ADSC),0)
sub-dirs += adsc
endif
include ../global.inc
adsc @ bfbff0b7
Subproject commit a14dc15c97eee0f5fda9074fa75687e64e9f0019
Subproject commit bfbff0b73890baeb1098533ea51f216723b5f424
......@@ -30,10 +30,11 @@ COMPILE_PILATUS=0
COMPILE_BASLER=0
COMPILE_PROSILICA=0
COMPILE_ROPERSCIENTIFIC=0
COMPILE_ADSC=0
COMPILE_CBF_SAVING=0
COMPILE_NXS_SAVING=0
export COMPILE_CORE COMPILE_SPS_IMAGE COMPILE_SIMULATOR \
COMPILE_ESPIA COMPILE_FRELON COMPILE_MAXIPIX COMPILE_PILATUS \
COMPILE_BASLER COMPILE_PROSILICA COMPILE_ROPERSCIENTIFIC \
COMPILE_BASLER COMPILE_PROSILICA COMPILE_ROPERSCIENTIFIC COMPILE_ADSC \
COMPILE_CBF_SAVING COMPILE_NXS_SAVING
......@@ -105,6 +105,13 @@ ROPERSCIENTIFIC_MAJ_VERSION = $(shell echo $(ROPERSCIENTIFIC_FULL_VERSION) | cut
INSTALL_ROPERSCIENTIFIC_VDIR = $(INSTALL_ROPERSCIENTIFIC_DIR)/v$(ROPERSCIENTIFIC_FULL_VERSION)
endif
ifneq ($(COMPILE_ADSC), 0)
INSTALL_ADSC_DIR = $(INSTALL_PLAT_DIR)/Adsc
ADSC_FULL_VERSION = $(shell cat camera/adsc/VERSION)
ADSC_MAJ_VERSION = $(shell echo $(ADSC_FULL_VERSION) | cut -d. -f1)
INSTALL_ADSC_VDIR = $(INSTALL_ADSC_DIR)/v$(ADSC_FULL_VERSION)
endif
.PHONY: install
PROCESSOR_TYPE := $(shell uname -i)
......@@ -201,4 +208,16 @@ ifneq ($(COMPILE_ROPERSCIENTIFIC), 0)
cp build/liblimaroperscientific.so.$(ROPERSCIENTIFIC_FULL_VERSION) $(INSTALL_LIB_DIR)
cp -d build/liblimaroperscientific.so.$(ROPERSCIENTIFIC_MAJ_VERSION) $(INSTALL_LIB_DIR)
cp sip/roperscientific/limaroperscientific.so $(INSTALL_ROPERSCIENTIFIC_VDIR)
endif
\ No newline at end of file
endif
ifneq ($(COMPILE_ADSC), 0)
mkdir -p $(INSTALL_ADSC_VDIR)
cp camera/adsc/python/__init__.py $(INSTALL_ADSC_DIR)
rm -rf $(INSTALL_LIB_DIR)/liblimaadsc.so*
cp build/liblimaadsc.so.$(ADSC_FULL_VERSION) $(INSTALL_LIB_DIR)
cp -d build/liblimaadsc.so.$(ADSC_MAJ_VERSION) $(INSTALL_LIB_DIR)
cp sip/adsc/limaadsc.so $(INSTALL_ADSC_VDIR)
cp camera/adsc/sdk/adsc_sources/lib/linux/libauxlib.so $(INSTALL_LIB_DIR)/libauxlib.so
cp camera/adsc/sdk/adsc_sources/lib/linux/libdetcon_th.so $(INSTALL_LIB_DIR)/libdetcon_th.so
endif
......@@ -54,6 +54,9 @@ ifneq ($(COMPILE_ROPERSCIENTIFIC), 0)
sip-modules += roperscientific
endif
ifneq ($(COMPILE_ADSC), 0)
sip-modules += adsc
endif
all: src
......
TARGET = limaadsc.so
OFILES = lima_init_numpy.o siplimaadsccmodule.o siplimaadscAdscCamera.o siplimaadscAdscHwInterface.o siplimaadscAdscBinCtrlObj.o siplimaadscAdscSyncCtrlObj.o siplimaadscAdscDetInfoCtrlObj.o
HFILES = sipAPIlimaadsc.h
CC = gcc
CXX = g++
LINK = g++
CPPFLAGS = -DNDEBUG -I. -I../core -I../../third-party/Processlib/sip -I/users/blissadm/python/bliss_python/redhate5/lib/python2.6/site-packages/numpy/core/include -I/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/include/python2.6 -I../../third-party/Processlib/core/include -I../../third-party/Processlib/tasks/include -I../../common/include -I../../hardware/include -I../../control/include -I../../control/software_operation/include -I../../camera/adsc/include
CFLAGS = -pipe -fPIC -O2 -Wall -W
CXXFLAGS = -pthread -g -DWITH_SPS_IMAGE -I. -I../core -I../../third-party/Processlib/sip -I/users/blissadm/python/bliss_python/redhate5/lib/python2.6/site-packages/numpy/core/include -I/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/include/python2.6 -I../../third-party/Processlib/core/include -I../../third-party/Processlib/tasks/include -I../../common/include -I../../hardware/include -I../../control/include -I../../control/software_operation/include -I../../camera/adsc/include -pipe -fPIC -O2 -Wall -W
LFLAGS = -shared -Wl,-rpath,../../build
LIBS = -L../../build -lpthread -llimaadsc
.SUFFIXES: .c .o .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
.C.o:
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
all: $(TARGET)
$(OFILES): $(HFILES)
$(TARGET): $(OFILES)
$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
install: $(TARGET)
@test -d $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages || mkdir -p $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages
cp -f $(TARGET) $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages/$(TARGET)
strip $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages/$(TARGET)
@test -d $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/share/sip/lima || mkdir -p $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/share/sip/lima
cp -f limaadsc.sip $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/share/sip/lima/limaadsc.sip
@test -d $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages || mkdir -p $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages
cp -f limaconfig.py $(DESTDIR)/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/lib/python2.6/site-packages/limaconfig.py
clean:
-rm -f $(TARGET)
-rm -f lima_init_numpy.o
-rm -f siplimaadsccmodule.o
-rm -f siplimaadscAdscCamera.o
-rm -f siplimaadscAdscHwInterface.o
-rm -f siplimaadscAdscBinCtrlObj.o
-rm -f siplimaadscAdscSyncCtrlObj.o
-rm -f siplimaadscAdscDetInfoCtrlObj.o
//###########################################################################
// 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/>.
//###########################################################################
#include <Python.h>
#define PY_ARRAY_UNIQUE_SYMBOL _LimaNumPy
#include "numpy/arrayobject.h"
extern "C"
{
void lima_import_array()
{
import_array();
}
}
target = limaadsc
sources = lima_init_numpy.cpp siplimaadsccmodule.cpp siplimaadscAdscCamera.cpp siplimaadscAdscHwInterface.cpp siplimaadscAdscBinCtrlObj.cpp siplimaadscAdscSyncCtrlObj.cpp siplimaadscAdscDetInfoCtrlObj.cpp
headers = sipAPIlimaadsc.h
%Module limaadsc 0
%ModuleHeaderCode
extern "C" { void lima_import_array();}
%End
%PostInitialisationCode
lima_import_array();
%End
%Module limaadsc 0
%ModuleHeaderCode
extern "C" { void lima_import_array();}
%End
%PostInitialisationCode
lima_import_array();
%End
%Import ../../third-party/Processlib/sip/processlib_tmp.sip
%Import ../core/limacore_tmp.sip
%Include ../../camera/adsc/sip/AdscInterface.sip
%Include ../../camera/adsc/sip/AdscCamera.sip
import sipconfig
# These are installation specific values created when lima was configured.
# The following line will be replaced when this template is used to create
# the final configuration module.
_pkg_config = {
'lima_sip_dir': '/segfs/bliss/depot/pythonbliss_5.0/installdir/redhate5/python/share/sip'
}
_default_macros = None
class Configuration(sipconfig.Configuration):
"""The class that represents lima configuration values.
"""
def __init__(self, sub_cfg=None):
"""Initialise an instance of the class.
sub_cfg is the list of sub-class configurations. It should be None
when called normally.
"""
# This is all standard code to be copied verbatim except for the
# name of the module containing the super-class.
if sub_cfg:
cfg = sub_cfg
else:
cfg = []
cfg.append(_pkg_config)
sipconfig.Configuration.__init__(self, cfg)
class limaModuleMakefile(sipconfig.ModuleMakefile):
"""The Makefile class for modules that %Import lima.
"""
def finalise(self):
"""Finalise the macros.
"""
# In case a C++ library is needed for link.
# Not necessary here, it's done in the configure.py script
# self.extra_libs.append("lima")
# Let the super-class do what it needs to.
sipconfig.ModuleMakefile.finalise(self)
This diff is collapsed.
......@@ -34,7 +34,8 @@ modules = [('core', ['common', 'hardware', 'control']),
('maxipix', [os.path.join('camera','maxipix')]),
('basler', [os.path.join('camera','basler')]),
('prosilica', [os.path.join('camera','prosilica')]),
('roperscientific', [os.path.join('camera','roperscientific')])]
('roperscientific', [os.path.join('camera','roperscientific')]),
('adsc', [os.path.join('camera','adsc')])]
espiaModules = ['espia', 'frelon', 'maxipix']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment