Merge branch 'master' of ssh://gitorious.psi.ch/sinqdev/sics

This commit is contained in:
2015-03-17 11:45:06 +01:00
8 changed files with 38 additions and 40 deletions

View File

@ -63,7 +63,7 @@ OBJ = $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) $(VELOOBJ) $(DIFIL) $(EXTRA) $(EPICSOBJ)
#--- This .SECONDARY. target is necessary to preserve generated .c files for debugging #--- This .SECONDARY. target is necessary to preserve generated .c files for debugging
.SECONDARY.: sicspoll.c polldriv.c .SECONDARY.: sicspoll.c polldriv.c
all: libmat libhlib libtecsl libpsi SICServer all: libmat libhlib libpsi SICServer
# use this target when some of the libraries SUBLIBS might be incomplete # use this target when some of the libraries SUBLIBS might be incomplete
full: purge all full: purge all
@ -81,12 +81,7 @@ $(SICSROOT)/sicspsi/hardsup/libhlib.a: libhlib
libhlib: libhlib:
cd $(SICSROOT)/sicspsi/hardsup; make $(MFLAGS) libhlib.a cd $(SICSROOT)/sicspsi/hardsup; make $(MFLAGS) libhlib.a
$(SICSROOT)/sicspsi/tecs/libtecsl.a: libtecsl $(SICSROOT)/sicspsi/libpsi.a: libpsi
libtecsl:
cd $(SICSROOT)/sicspsi/tecs; make $(MFLAGS) libtecsl.a
$SICSROOT)/sicspsi/libpsi.a: libpsi
libpsi: libpsi:
cd $(SICSROOT)/sicspsi; make $(MFLAGS) libpsi.a cd $(SICSROOT)/sicspsi; make $(MFLAGS) libpsi.a
@ -98,7 +93,6 @@ clean:
rm -f *.o *.d SICServer rm -f *.o *.d SICServer
cd $(SICSROOT)/sicspsi/hardsup; make $(MFLAGS) clean cd $(SICSROOT)/sicspsi/hardsup; make $(MFLAGS) clean
cd matrix; make $(MFLAGS) clean cd matrix; make $(MFLAGS) clean
cd $(SICSROOT)/sicspsi/tecs; make $(MFLAGS) clean
cd $(SICSROOT)/sicspsi; make $(MFLAGS) clean cd $(SICSROOT)/sicspsi; make $(MFLAGS) clean
Dbg.o: Dbg.c Dbg.o: Dbg.c

View File

@ -1,22 +1,4 @@
# M. Zolliker 03.2005 # when SICS_MAKE_VERSION is defined: use this makefile version
# if not: show usage (see makefile_)
%: usage include makefile_$(SICS_MAKE_VERSION)
@echo
%.o: usage
@echo
default: usage
usage:
@ echo ""
@ echo "Usage:"
@ echo ""
@ echo " make -f makefile_xxx [target]"
@ echo ""
@ echo ' where makefile_xxx is one of'
@ echo ""
@ ls -1 makefile_* | pr -t -o 4
# DO NOT DELETE

25
makefile_ Normal file
View File

@ -0,0 +1,25 @@
# M. Zolliker 03.2005
# this file shows the correct usage of make in the sics source directory
%: usage
@echo
%.o: usage
@echo
default: usage
usage:
@ echo ""
@ echo "Usage:"
@ echo ""
@ echo " make -f makefile_xxx [target]"
@ echo ""
@ echo ' where makefile_xxx is one of'
@ echo ""
@ ls -1 makefile_?* | pr -t -o 4
@ echo ""
@ echo " or use make without args:"
@ echo ""
@ echo " setenv SICS_MAKE_VERSION slinux"
@ echo " make [target]"

View File

@ -19,8 +19,7 @@ CFLAGS = -I$(HDFROOT)/include $(DFORTIFY) -DHDF4 -DHDF5 \
-g -std1 -warnprotos -g -std1 -warnprotos
BINTARGET = bin BINTARGET = bin
EXTRA= EXTRA=
SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \ SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a
psi/tecs/libtecsl.a
LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \ LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \
-ltcl -lfor $(HDFROOT)/lib/libhdf5.a \ -ltcl -lfor $(HDFROOT)/lib/libhdf5.a \
$(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \ $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \

View File

@ -22,8 +22,7 @@ CFLAGS = -I$(HDFROOT)/include -I/usr/include/hdf -I$(TCLINC) -DHDF4 -DHDF5 \
BINTARGET = bin BINTARGET = bin
EXTRA=nintf.o EXTRA=nintf.o
SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \ SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a
psi/tecs/libtecsl.a
LIBS = -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB)\ LIBS = -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB)\
-ltcl -lNeXus -lhdf5 -lmfhdf -ldf \ -ltcl -lNeXus -lhdf5 -lmfhdf -ldf \
-lmxml -lghttp -ljpeg -ljson -ldl -lz -lm -lc -lmxml -lghttp -ljpeg -ljson -ldl -lz -lm -lc

View File

@ -22,8 +22,7 @@ CFLAGS = -I$(HDFROOT)/include -I/sw/include -DNXXML -DHDF5 -DHDF4 $(NI) -DMACOSX
BINTARGET = bin BINTARGET = bin
EXTRA=nintf.o EXTRA=nintf.o
SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \ SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a
psi/tecs/libtecsl.a
LIBS = -L$(HDFROOT)/lib -L/sw/lib $(SUBLIBS) $(NILIB)\ LIBS = -L$(HDFROOT)/lib -L/sw/lib $(SUBLIBS) $(NILIB)\
-ltcl $(HDFROOT)/lib/libhdf5.a -lmfhdf -ldf \ -ltcl $(HDFROOT)/lib/libhdf5.a -lmfhdf -ldf \
$(HDFROOT)/lib/libsz.a \ $(HDFROOT)/lib/libsz.a \

View File

@ -28,7 +28,7 @@ CFLAGS = -I$(HDFROOT)/include -DNXXML -DHDF5 $(NI) \
BINTARGET = bin BINTARGET = bin
EXTRA=nintf.o EXTRA=nintf.o
SUBLIBS = $(SICSROOT)/sicspsi/libpsi.a $(SICSROOT)/sicspsi/hardsup/libhlib.a \ SUBLIBS = $(SICSROOT)/sicspsi/libpsi.a $(SICSROOT)/sicspsi/hardsup/libhlib.a \
matrix/libmatrix.a $(SICSROOT)/sicspsi/tecs/libtecsl.a matrix/libmatrix.a
LIBS = -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB) $(EPICSLIBS) \ LIBS = -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB) $(EPICSLIBS) \
-ltcl -lNeXus $(HDFROOT)/lib/libhdf5.a \ -ltcl -lNeXus $(HDFROOT)/lib/libhdf5.a \
$(HDFROOT)/lib/libsz.a \ $(HDFROOT)/lib/libsz.a \

View File

@ -163,10 +163,10 @@ long SyncedBegin(long syncid)
return SYNCED_NO_MEMORY; return SYNCED_NO_MEMORY;
} }
} }
sp++;
if (sp >= NSTACK) { if (sp >= NSTACK) {
return SYNCED_STACK_OVERFLOW; return SYNCED_STACK_OVERFLOW;
} }
sp++;
sync->count++; sync->count++;
actualSync = sync; actualSync = sync;
return sync->id; return sync->id;
@ -181,13 +181,13 @@ long SyncedEnd(long syncid)
if (sp <= 0) { if (sp <= 0) {
return SYNCED_STACK_UNDERFLOW; return SYNCED_STACK_UNDERFLOW;
} }
sync = actualSync;
sp--; sp--;
sync = actualSync;
actualSync = stack[sp]; actualSync = stack[sp];
sync->count--; if (sync->count <= 0) {
if (sync->count < 0) {
return SYNCED_COUNT_UNDERFLOW; return SYNCED_COUNT_UNDERFLOW;
} }
sync->count--;
if (syncid != 0 && syncid != sync->id) { if (syncid != 0 && syncid != sync->id) {
return SYNCED_ID_MISMATCH; return SYNCED_ID_MISMATCH;
} }