Commit 2028f8ef authored by Holger Witsch's avatar Holger Witsch

make read_spec_sps work (again ?) and get the Makefile back, because make

works and cmake doesn't ;-?
parent a016ee51
Pipeline #11295 failed with stages
in 1 minute and 16 seconds
#=============================================================================
#
# file : Makefile
#
# description : Makefile to generate a TANGO device server.
#
# project : Fpga
#
#=============================================================================
# This file is generated by POGO
# (Program Obviously used to Generate tango Object)
#=============================================================================
#
#
# MAKE_ENV is the path to find common environment to buil project
#
MAKE_ENV = /segfs/tango/cppserver/env
#=============================================================================
# PACKAGE_NAME is the name of the library/device/exe you want to build
#
PACKAGE_NAME = Fpga
MAJOR_VERS = 1
MINOR_VERS = 0
RELEASE = Release_$(MAJOR_VERS)_$(MINOR_VERS)
# #=============================================================================
# # RELEASE_TYPE
# # - DEBUG : debug symbols - no optimization
# # - OPTIMIZED : no debug symbols - optimization level set to O2
# #-----------------------------------------------------------------------------
RELEASE_TYPE = DEBUG
#=============================================================================
# OUTPUT_TYPE can be one of the following :
# - 'STATIC_LIB' for a static library (.a)
# - 'SHARED_LIB' for a dynamic library (.so)
# - 'DEVICE' for a device server (will automatically include and link
# with Tango dependencies)
# - 'SIMPLE_EXE' for an executable with no dependency (for exemple the test tool
# of a library with no Tango dependencies)
#
OUTPUT_TYPE = DEVICE
#=============================================================================
# OUTPUT_DIR is the directory which contains the build result.
# if not set, the standard location is :
# - ./lib if OUTPUT_TYPE is SHARED_LIB or STATIC_LIB
# - ./bin for others
#
#OUTPUT_DIR =
#=============================================================================
# INC_DIR_USER is the list of all include path needed by your sources
# - for a device server, tango dependencies are automatically appended
# - '-I ../include' and '-I .' are automatically appended in all cases
#
INC_DIR_USER=-I Sps/Include -I Sps/Src
#=============================================================================
# LIB_DIR_USER is the list of user library directories
# - for a device server, tango libraries directories are automatically appended
# - '-L ../lib' is automatically appended in all cases
#
LIB_DIR_USER=-L lib/debian9 -ladq
#=============================================================================
# LFLAGS_USR is the list of user link flags
# - for a device server, tango libraries directories are automatically appended
# - '-ldl -lpthread' is automatically appended in all cases
#
# !!! ATTENTION !!!
# Be aware that the order matters.
# For example if you must link with libA, and if libA depends itself on libB
# you must use '-lA -lB' in this order as link flags, otherwise you will get
# 'undefined reference' errors
#
#LFLAGS_USR+=
#=============================================================================
# CXXFLAGS_USR lists the compilation flags specific for your library/device/exe
# This is the place where to put your compile-time macros using '-Dmy_macro'
#
# -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ for ACE
#
CXXFLAGS_USR+= -DLINUX
#=============================================================================
# TANGO_REQUIRED
# - TRUE : your project depends on TANGO
# - FALSE : your project does not depend on TANGO
#-----------------------------------------------------------------------------
# - NOTE : if PROJECT_TYPE is set to DEVICE, TANGO will be auto. added
#-----------------------------------------------------------------------------
TANGO_REQUIRED = TRUE
#=============================================================================
# include Standard TANGO compilation options
#
include $(MAKE_ENV)/tango.opt
#=============================================================================
# POST_PROCESSING: action to be done after normal make.
# e.g.: change executable file name, .....
# POST_PROCESSING = \
# cp -p bin/$(BIN_DIR)/$(PACKAGE_NAME) ~blissadm/server/$(BIN_DIR)/$(PACKAGE_NAME)
POST_PROCESSING = \
@echo "\n\nCopying executable to target machine ... ";\
echo "$(OUTPUT_DIR)/$(PROJECT_NAME) TO blissadm@ld28nano:/users/blissadm/server/debian9"; \
scp -p $(OUTPUT_DIR)/$(PROJECT_NAME) blissadm@ld28nano:/users/blissadm/server/debian9
SPS_DIR = Sps
SPS_SRC = $(SPS_DIR)/Src
SPS_INC = $(SPS_DIR)/Include
#=============================================================================
# SVC_OBJS is the list of all objects needed to make the output
#
SVC_INCL = $(PACKAGE_NAME).h $(PACKAGE_NAME)Class.h Numbat.h
SVC_OBJS = \
$(LIB_OBJS) \
$(OBJDIR)/ClassFactory.o \
$(OBJDIR)/main.o
LIB_OBJS = \
$(OBJDIR)/$(PACKAGE_NAME).o \
$(OBJDIR)/$(PACKAGE_NAME)Class.o \
$(OBJDIR)/$(PACKAGE_NAME)StateMachine.o \
$(ADDITIONAL_OBJS)
SVC_INHERITANCE_OBJ =
#------------ Object files for additional files ------------
ADDITIONAL_OBJS = \
$(OBJDIR)/FpgaAcquisitionThread.o \
$(OBJDIR)/Numbat_Functions.o \
$(OBJDIR)/sps.o
#=============================================================================
# include common targets
#
include $(MAKE_ENV)/common_target.opt
# on debian7 this is possible. target.opt excludes it.
#CXX11 = -std=c++11
$(OBJDIR)/FpgaAcquisitionThread.o: FpgaAcquisitionThread.cpp $(SVC_INCL)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(OBJDIR)/Numbat_Functions.o: Numbat_Functions.c $(SVC_INCL)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(OBJDIR)/sps.o: $(SPS_SRC)/sps.c $(SPS_INC)/spec_shm.h
$(CC) $(CXXFLAGS) -c $< -o $@
#bin/$(BIN_DIR)/test_sps:
test_sps: $(OBJDIR)/sps.o test_sps.cpp
$(CXX) -g -D_DEBUG $(CXXFLAGS) test_sps.cpp $< -o test_sps
read_spec_sps: $(OBJDIR)/sps.o read_spec_sps.cpp
$(CXX) -g -D_DEBUG $(CXXFLAGS) read_spec_sps.cpp $< -o read_spec_sps
......@@ -4,6 +4,7 @@
#include <iostream>
#include <cstdlib>
#include <string>
#include <string.h>
#include <vector>
#include <math.h> /* sin */
......@@ -48,7 +49,9 @@ int main(int argc, char *argv[])
std::cout << "meta " << metastr << std::endl;
char *envkeystr;
std::string xxx = arrayname + "_ENV";
char xxx[256];
strcpy(xxx, arrayname);
strcat(xxx, "_ENV");
std::cout << xxx << std::endl;
envkeystr = SPS_GetNextEnvKey(spec_version, xxx.c_str(), 0);
envkeystr = SPS_GetNextEnvKey(spec_version, xxx, 0);
}
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