Files
Erik Fröjdhandmaliakal_d 01a5e4f2d1
Build on RHEL9 docker image / build (push) Successful in 3m39s
Build on RHEL8 docker image / build (push) Successful in 4m49s
Run Simulator Tests on local RHEL9 / build (push) Successful in 19m31s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m59s
1010/Enabling optimizations for slsDetectorServers (#1640)
* enabled -O2 for ctb and mythen + a few additional warnings

(cherry picked from commit 4d2f37c205)

* configure stack size for blackfin servers to 256kB instead of the default 4kB

(cherry picked from commit 5468b1e4dd)

* enable opt for JF and Moench, ratemax make local for eiger

(cherry picked from commit 5500800503)

* fixed misplaced volatile on Beb_Read32

(cherry picked from commit 7b9f408df1)

* removed dead code in eiger server (which had 2 byte read passt end)

10.1.0.rc: only the Eiger part of the original commit is applied. The
usleep_bf change (return -1 for sleeps that cannot be represented) does
not apply, usleep_bf does not exist on this branch.

(cherry picked from commit 8e24c0196f)

* deal with fall through of table filling in ratecorr table

(cherry picked from commit f69856b5ff)

* memory clobber for inline asm and added flags on eiger

(cherry picked from commit a8c391509e)

* -O2 for gotthard and xilinx

(cherry picked from commit bf73241a47)

* fixes to remove the new warnings

(cherry picked from commit eb525e96be)

* fixed new eiger warnings

(cherry picked from commit 9c86c36534)

* binaries in

* fixes for warnings (already in developer from list.h separation PR)

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2026-10-28 11:32:23 +01:00

49 lines
1.7 KiB
Makefile
Executable File

# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
current_dir = $(shell pwd)
main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/
md5_dir = ../../slsSupportLib/src/
script_dir = ../../etc/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wredundant-decls -Werror=return-type -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
# FLAT stack size: elf2flt defaults to 4 KB, the update and startup paths need more than 8 KB
LDLIBS += -Wl,-elf2flt=-s262144
PROGS = moenchDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
all: clean $(PROGS)
version: clean versioning $(PROGS)
boot: $(OBJS)
version_name=APIMOENCH
version_path=slsDetectorServers/moenchDetectorServer
versioning:
echo `tput setaf 6; python $(script_dir)updateAPIVersion.py $(version_name) $(version_path); tput sgr0;`
$(PROGS): $(OBJS)
# echo $(OBJS)
mkdir -p $(DESTDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
mv $(PROGS) $(DESTDIR)
cp detid_moench.txt $(DESTDIR)
rm *.gdb
rm $(main_src)*.o $(md5_dir)*.o
clean:
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o