diff --git a/hardsup/make_gen b/hardsup/make_gen new file mode 100644 index 00000000..32e8a1f5 --- /dev/null +++ b/hardsup/make_gen @@ -0,0 +1,28 @@ +#--------------------------------------------------------------------------- +# Makefile for the SINQ hardware support library +# included by a machine specific makefile +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +.SUFFIXES: +.SUFFIXES: .c .o + +OBJ= el734_utility.o asynsrv_utility.o stredit.o \ + strjoin.o failinet.o geterrno.o el737_utility.o sinqhm.o serialsinq.o \ + itc4util.o dillutil.o table.o el755_utility.o el755_errorlog.o \ + makeprint.o StrMatch.o + +libhlib.a: $(OBJ) + rm -f libhlib.a + ar cr libhlib.a $(OBJ) + ranlib libhlib.a + +clean: + rm -f *.o *.a + + + + + + diff --git a/hardsup/makefile_alpha b/hardsup/makefile_alpha new file mode 100644 index 00000000..b082b911 --- /dev/null +++ b/hardsup/makefile_alpha @@ -0,0 +1,15 @@ +#--------------------------------------------------------------------------- +# Makefile for the SINQ hardware support library +# machine-dependent part for Tru64 Unix +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following line only for fortified version +DFORTIFY=-DFORTIFY +#========================================================================== + +CC = cc +CFLAGS = -std1 -g $(DFORTIFY) -I$(SRC).. -I$(SRC). + +include make_gen diff --git a/hardsup/makefile_linux b/hardsup/makefile_linux new file mode 100644 index 00000000..08a262d3 --- /dev/null +++ b/hardsup/makefile_linux @@ -0,0 +1,15 @@ +#--------------------------------------------------------------------------- +# Makefile for the SINQ hardware support library +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following line only for fortified version +DFORTIFY=-DFORTIFY +#========================================================================== + +CC = gcc +CFLAGS = -g -DLINUX $(DFORTIFY) -I$(SRC). -I$(SRC).. -I../src + +include $(SRC)make_gen diff --git a/make_gen b/make_gen new file mode 100644 index 00000000..75bfd430 --- /dev/null +++ b/make_gen @@ -0,0 +1,75 @@ +#---------------------------------------------------------------------------- +# Makefile for SICS (machine-independent part) +# +# Mark Koennecke 1996-2001 +# Markus Zolliker March 2003 +#--------------------------------------------------------------------------- + +COBJ = Sclient.o network.o ifile.o intcli.o $(FORTIFYOBJ) +SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \ + servlog.o sicvar.o nserver.o SICSmain.o \ + sicsexit.o costa.o task.o $(FORTIFYOBJ)\ + macro.o ofac.o obpar.o obdes.o drive.o status.o intserv.o \ + devexec.o mumo.o mumoconf.o selector.o selvar.o fupa.o lld.o \ + lld_blob.o buffer.o strrepl.o ruli.o lin2ang.o fomerge.o\ + script.o o2t.o alias.o napi45.o nxdata.o stringdict.o sdynar.o\ + histmem.o histdriv.o histsim.o sinqhmdriv.o interface.o callback.o \ + event.o emon.o evcontroller.o evdriver.o simev.o perfmon.o \ + danu.o itc4driv.o itc4.o nxdict.o nxsans.o varlog.o stptok.o nread.o \ + dilludriv.o scan.o fitcenter.o telnet.o token.o scontroller.o serial.o \ + tclev.o hkl.o integrate.o optimise.o dynstring.o nextrics.o nxutil.o \ + mesure.o uubuffer.o serialwait.o commandlog.o sps.o udpquieck.o \ + sanswave.o faverage.o bruker.o rmtrail.o fowrite.o ltc11.o \ + simchop.o choco.o chadapter.o docho.o trim.o eurodriv.o scaldate.o \ + hklscan.o xytable.o amor2t.o nxamor.o amorscan.o amorstat.o \ + circular.o el755driv.o maximize.o sicscron.o tecsdriv.o sanscook.o \ + tasinit.o tasutil.o t_rlp.o t_conv.o d_sign.o d_mod.o \ + tasdrive.o tasscan.o synchronize.o definealias.o swmotor.o t_update.o \ + hmcontrol.o userscan.o slsmagnet.o rs232controller.o lomax.o \ + polterwrite.o fourlib.o motreg.o motreglist.o anticollider.o \ + s_rnge.o sig_die.o gpibcontroller.o $(NIOBJ) ecb.o ecbdriv.o \ + ecbcounter.o hmdata.o tdchm.o nxscript.o A1931.o + +MOTOROBJ = motor.o el734driv.o simdriv.o el734dc.o pipiezo.o pimotor.o +COUNTEROBJ = countdriv.o simcter.o counter.o +DMCOBJ = dmc.o +VELOOBJ = velo.o velosim.o velodorn.o velodornier.o + +.SUFFIXES: +.SUFFIXES: .tcl .htm .c .o + +# the following lines are not compatible with GNUmake using VPATH +# they are not needed, as they are defined by default +#.c.o: +# $(CC) $(CFLAGS) -c $*.c + +all: $(BINTARGET)/SICServer + +$(BINTARGET)/SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \ + $(DMCOBJ) $(VELOOBJ) $(DIFIL) $(EXTRA) \ + $(SUBLIBS) + $(CC) -g -o SICServer \ + $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) $(DMCOBJ) \ + $(VELOOBJ) $(DIFOBJ) $(EXTRA) $(LIBS) + cp SICServer $(BINTARGET)/ + +matrix/libmatrix.a: + cd matrix; make $(MFLAGS) libmatrix.a + +hardsup/libhlib.a: + cd hardsup; make $(MFLAGS) libhlib.a + +tecs/libtecsl.a: + cd tecs; make $(MFLAGS) libtecsl.a + +clean: + rm -f *.o SICServer $(BINTARGET)/SICServer + cd hardsup; make $(MFLAGS) clean + cd matrix; make $(MFLAGS) clean + cd tecs; make $(MFLAGS) clean + +Dbg.o: Dbg.c + cc -g -I/data/koenneck/include -c Dbg.c +Dbg_cmd.o: Dbg_cmd.c + + diff --git a/makefile_alpha b/makefile_alpha new file mode 100644 index 00000000..f44cda6c --- /dev/null +++ b/makefile_alpha @@ -0,0 +1,36 @@ +#--------------------------------------------------------------------------- +# Makefile for SICS +# machine-dependent part for Tru64 Unix +# +# Mark Koennecke 1996-2001 +# Markus Zolliker, March 2003 +#========================================================================== +# the following lines only for fortified version +DFORTIFY=-DFORTIFY +FORTIFYOBJ=strdup.o fortify.o +#========================================================================== +# assign if the National Instrument GPIB driver is available +#NI= -DHAVENI +#NIOBJ= nigpib.o +#NILIB=-lgpibenet +#========================================================================== +# comment or uncomment if a difrac version is required +# Do not forget to remove or add comments to ofac.c as well if changes +# were made here. + +#DIFOBJ=difrac.o -Ldifrac -ldif +#DIFIL= difrac.o +#--------------------------------------------------------------------------- + +CC = cc +CFLAGS = -I$(HDFROOT)/include $(DFORTIFY) -DHDF4 -DHDF5 -I$(SRC)hardsup -g \ + -std1 -warnprotos +BINTARGET = bin +HDFROOT=/data/lnslib +EXTRA= +LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \ + -ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \ + $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \ + $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc + +include make_gen diff --git a/makefile_linux b/makefile_linux new file mode 100644 index 00000000..7f7d8bcf --- /dev/null +++ b/makefile_linux @@ -0,0 +1,38 @@ +#--------------------------------------------------------------------------- +# Makefile for SICS +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Mark Koennecke 1996-2001 +# Markus Zolliker, March 2003 +#========================================================================== +# the following lines only for fortified version +DFORTIFY=-DFORTIFY +FORTIFYOBJ=strdup.o fortify.o +#========================================================================== +# assign if the National Instrument GPIB driver is available +#NI= -DHAVENI +#NIOBJ= nigpib.o +#NILIB=-lgpibenet +#========================================================================== +# comment or uncomment if a difrac version is required +# Do not forget to remove or add comments to ofac.c as well if changes +# were made here. + +#DIFOBJ=difrac.o -Ldifrac -ldif +#DIFIL= difrac.o +#========================================================================== + +CC = gcc +CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -I$(SRC)hardsup \ + -fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY) + +BINTARGET = bin +HDFROOT=/afs/psi.ch/project/sinq/linux +EXTRA=nintf.o +SUBLIBS = hardsup/libhlib.a matrix/libmatrix.a tecs/libtecsl.a +LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \ + -ltcl8.3 $(HDFROOT)/lib/libhdf5.a \ + $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \ + $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc + +include $(SRC)make_gen diff --git a/matrix/make_gen b/matrix/make_gen new file mode 100644 index 00000000..992e1d54 --- /dev/null +++ b/matrix/make_gen @@ -0,0 +1,18 @@ +#--------------------------------------------------------------------------- +# Makefile for the Matrix library +# +# Mark Koennecke, November 1996 +#-------------------------------------------------------------------------- + +OBJ= matadd.o matcreat.o matdet.o matdump.o matdurbn.o materr.o \ + matinv.o matmul.o matsolve.o matsub.o matsubx.o mattoepz.o \ + mattran.o + +libmatrix.a: $(OBJ) + - rm -f libmatrix.a + ar cr libmatrix.a $(OBJ) + ranlib libmatrix.a + +clean: + rm -f *.o + rm -f *.a diff --git a/matrix/makefile_alpha b/matrix/makefile_alpha new file mode 100644 index 00000000..7534b737 --- /dev/null +++ b/matrix/makefile_alpha @@ -0,0 +1,15 @@ +#--------------------------------------------------------------------------- +# Makefile for the Matrix library +# machine-dependent part for Tru64 Unix +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following line only for fortified version +DFORTIFY=-DFORTIFY -I$(SRC).. +#========================================================================== + +CC = cc +CFLAGS = -std1 -g $(DFORTIFY) + +include make_gen diff --git a/matrix/makefile_linux b/matrix/makefile_linux new file mode 100644 index 00000000..8a3b93cf --- /dev/null +++ b/matrix/makefile_linux @@ -0,0 +1,15 @@ +#--------------------------------------------------------------------------- +# Makefile for the Matrix library +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following line only for fortified version +DFORTIFY=-DFORTIFY +#========================================================================== + +CC = gcc +CFLAGS = -g $(DFORTIFY) + +include $(SRC)make_gen diff --git a/tecs/make_auto_gnumake b/tecs/make_auto_gnumake deleted file mode 100644 index dffbc551..00000000 --- a/tecs/make_auto_gnumake +++ /dev/null @@ -1,7 +0,0 @@ -# list of prerequisites including paths for VPATH -Q=$^ - -# Fortran/C source file name -F=$< -C=$< - diff --git a/tecs/make_auto_gnumakeno b/tecs/make_auto_gnumakeno deleted file mode 100644 index 63df21e3..00000000 --- a/tecs/make_auto_gnumakeno +++ /dev/null @@ -1,7 +0,0 @@ -# list of prerequisites including paths for VPATH -Q=$> - -# Fortran/C source file name -F=$*.f -C=$*.c - diff --git a/tecs/make_gen b/tecs/make_gen new file mode 100644 index 00000000..5eebf3fc --- /dev/null +++ b/tecs/make_gen @@ -0,0 +1,62 @@ +#--------------------------------------------------------------------------- +# Makefile (sytem independent part) for the TECS Client library and TecsServer +# included in a machine-specific makefile +# +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- + +LIBR_OBJ =coc_util.o myc_err.o myc_str.o myc_buf.o myc_time.o +SERV_OBJ =tecs.o coc_server.o tecs_lsc.o tecs_serial.o coc_logfile.o \ + tecs_data.o $(LIBR_OBJ) +CLI_OBJ =tecs_cli.o coc_client.o $(LIBR_OBJ) +TCLI_OBJ =$(SYS_FILE).o $(SYS_FILE)_c.o $(CLI_OBJ) +TECLI_OBJ =tecs_client.o tecs_plot.o sys_util.o str.o instr_hosts.o \ + $(TCLI_OBJ) + +#.f.o: +# $(FC) $(FFLAGS) -c $F +# +#.c.o: +# $(CC) $(CFLAGS) -c $C + +libtecsl.a: $(CLI_OBJ) + rm -f $@ + $(AR) $(ARFLAGS) $@ $Q + ranlib $@ + +all: libtecsl.a TecsServer TecsClient keep_running six + +test: tecs_cli.c + echo $(VPATH) $C + +TecsServer: $(SERV_OBJ) $(HARDSUPLIB) + $(CC) $(CFLAGS) -o $@ $Q -lm $(FORTIFYOBJ) + +TecsClient: $(TECLI_OBJ) + $(FC) -o $@ $Q $(PGLIB) $(RDLIB) $(FORTIFYOBJ) + +# -- for tascom -- +libtecs.so: tecs_c.c $(CLI_OBJ) + $(CC) $(CFLAGS) -shared -o $@ $Q $(FORTIFYOBJ) + +# -- needs special include +tecs_serial.o: tecs_serial.c + $(CC) $(CFLAGS) -I$(SICS)/hardsup -c $Q + +keep_running: keep_running.c + $(CC) $(CFLAGS) -o $@ $Q $(FORTIFYOBJ) + +six: six.c term.o sys_select.o libtecsl.a + $(CC) $(CFLAGS) -o $@ $Q $(FORTIFYOBJ) + +#rstart: rstart.c myc_str.o myc_err.o instr_hosts.o +# $(CC) $(CFLAGS) -o $@ $Q $(FORTIFYOBJ) +# +#serverd: serverd.c myc_str.o myc_err.o coc_util.o myc_buf.o +# $(CC) $(CFLAGS) -o $@ $Q $(FORTIFYOBJ) +# +#starts: starts.c myc_str.o myc_err.o coc_util.o myc_buf.o +# $(CC) $(CFLAGS) -o $@ $Q $(FORTIFYOBJ) + +clean: + rm -f *.o *.a six keep_running TecsServer TecsClient diff --git a/tecs/make_tecs b/tecs/make_tecs deleted file mode 100644 index b572d017..00000000 --- a/tecs/make_tecs +++ /dev/null @@ -1,73 +0,0 @@ -#--------------------------------------------------------------------------- -# Makefile for the TECS Client library and TecsServer -# -# Markus Zolliker, March 2000 -# may now be used on different systems without change M.Z.01.2002 -# included in a machine-specific makefile -#-------------------------------------------------------------------------- - -include $(MAKE_OPT) - -VPATH=$(SRCPATH) - -# make replacements for some automatic variables -# (define $Q $C and $F) -GNUMAKE_$(MAKE_VERSION)=no -include $(SRCPATH)make_auto_gnumake$(GNUMAKE_) - -LIBR_OBJ =coc_util.o myc_err.o myc_str.o myc_buf.o myc_time.o \ - $(FORTIFYOBJ) -SERV_OBJ =tecs.o coc_server.o tecs_lsc.o tecs_serial.o coc_logfile.o \ - tecs_data.o $(LIBR_OBJ) -CLI_OBJ =tecs_cli.o coc_client.o $(LIBR_OBJ) -TCLI_OBJ =$(SYS_FILE).o $(SYS_FILE)_c.o $(CLI_OBJ) -TECLI_OBJ =tecs_client.o tecs_plot.o sys_util.o str.o instr_hosts.o \ - $(TCLI_OBJ) - -.f.o: - $(FC) $(FFLAGS) -c $F - -.c.o: - $(CC) $(CFLAGS) -c $C - -default: libtecsl.a - -all: libtecsl.a TecsServer TecsClient keep_running - -test: tecs_cli.c - echo $(VPATH) $C - -libtecsl.a: $(CLI_OBJ) - - rm $@ - $(AR) $(ARFLAGS) $@ $Q - ranlib $@ - -TecsServer: $(SERV_OBJ) - $(CC) $(CFLAGS) -o $@ $Q -lm $(HARDSUPLIB) - -TecsClient: $(TECLI_OBJ) - $(FC) -o $@ $Q $(PGLIB) $(RDLIB) - -libtecs.so: tecs_c.c $(CLI_OBJ) - $(CC) $(CFLAGS) -shared -o $@ $Q - -tecs_serial.o: tecs_serial.c - $(CC) $(CFLAGS) -I$(SICS)/hardsup -c $C - -six: six.c term.c sys_select.c libtecsl.a - $(CC) $(CFLAGS) -o $@ $Q - -rstart: rstart.c myc_str.o myc_err.o instr_hosts.o - $(CC) $(CFLAGS) -o $@ $Q - -serverd: serverd.c myc_str.o myc_err.o coc_util.o myc_buf.o - $(CC) $(CFLAGS) -o $@ $Q - -starts: starts.c myc_str.o myc_err.o coc_util.o myc_buf.o - $(CC) $(CFLAGS) -o $@ $Q - -keep_running: keep_running.c - $(CC) $(CFLAGS) -o $@ $Q - -clean: - - rm *.o *.a six keep_running TecsServer TecsClient diff --git a/tecs/make_tecs_no b/tecs/make_tecs_no deleted file mode 100644 index 81d481f6..00000000 --- a/tecs/make_tecs_no +++ /dev/null @@ -1,6 +0,0 @@ -default: - -%: - @echo "define the environment variable MACHINE to one of:" - @ls make_opt_* | cut -b 10-99 - diff --git a/tecs/makefile b/tecs/makefile index fa755730..53664a33 100644 --- a/tecs/makefile +++ b/tecs/makefile @@ -1,10 +1,3 @@ -# if MACHINE is defined, include make_tecs -# else include make_tecs_no, printing out a comment - -T_$(MACHINE)=_no - -MAKE_OPT=make_opt_$(MACHINE) - -include make_tecs$(T_) - +#include makefile_alpha +include makefile_linux diff --git a/tecs/makefile_alpha b/tecs/makefile_alpha new file mode 100644 index 00000000..583f1947 --- /dev/null +++ b/tecs/makefile_alpha @@ -0,0 +1,44 @@ +#--------------------------------------------------------------------------- +# Makefile for the TECS Client library and TecsServer +# machine-dependent part for Tru64 Unix +# +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following lines only for fortified version +DFORTIFY=-DFORTIFY -I$(SRC).. +FORTIFYOBJ=../strdup.o ../fortify.o +#========================================================================== + + +SICS=src/.. + +CC = cc +FC = f77 +CFLAGS = -std1 -g -warnprotos $(DFORITFY) +FFLAGS = -u -g +ARFLAGS = cr + +# -- system dependent routines +SYS_FILE =sys_aunix + +# -- PGPLOT library +PGLIB =$(PGPLOT_DIR)/libpgplot.a -L/usr/X11R6/lib -lX11 + +# -- library for ASYNSRV +HARDSUPLIB=../hardsup/libhlib.a + +# -- readline library +RDLIB =-lreadline -ltermcap + +# -- the following macros are used as a replacement for some automatic variables +# due to different make versions. +# This is for Tru64 standard make. +# +# list of prerequisites including paths for VPATH +Q=$> + +# Fortran/C source file name +F=$*.f +C=$*.c + +include make_gen diff --git a/tecs/makefile_linux b/tecs/makefile_linux new file mode 100644 index 00000000..f9b35a27 --- /dev/null +++ b/tecs/makefile_linux @@ -0,0 +1,46 @@ +#--------------------------------------------------------------------------- +# Makefile options for the TECS Client library and TecsServer +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Markus Zolliker, March 2003 +#-------------------------------------------------------------------------- +# the following lines only for fortified version +DFORTIFY=-DFORTIFY -I$(SRC).. +FORTIFYOBJ=../strdup.o ../fortify.o +#========================================================================== + +SICST=.. +SICS=$(SRC).. + +CC = gcc +FC = g77 +CFLAGS = -DLINUX -g $(DFORTIFY) +FFLAGS = -u -fvxt -g +ARFLAGS = cr + +# -- system dependent routines +SYS_FILE =sys_linux + +# -- PGPLOT library +#PGPLOT =/afs/psi.ch/project/sinq/linux/pgplot/ +PGPLOT =/afs/psi.ch/user/z/zolliker/pgplot/ +PGLIB =$(PGPLOT)/libpgplot.a -L/usr/X11R6/lib -lX11 + +# -- library for ASYNSRV +HARDSUPLIB=$(SICST)/hardsup/libhlib.a + +# -- readline library +RDLIB =-lreadline -ltermcap + +# -- the following macros are used as a replacement for some automatic variables +# due to different make versions. +# This is for GNU make. +# +# list of prerequisites including paths for VPATH +Q=$^ + +# Fortran/C source file name +F=$< +C=$< + +include $(SRC)make_gen