objects may now be separated from sources M.Z.

SKIPPED:
	psi/make_gen
	psi/makefile
	psi/makefile_alpha
	psi/makefile_linux
	psi/hardsup/make_gen
	psi/hardsup/makefile
	psi/hardsup/makefile_alpha
	psi/hardsup/makefile_linux
	psi/tecs/make_gen
	psi/tecs/makefile
	psi/tecs/makefile_linux
This commit is contained in:
cvs
2003-08-25 14:28:19 +00:00
parent acf5634ef7
commit e1839599f3
21 changed files with 181 additions and 96 deletions

View File

@ -9,7 +9,7 @@
#FORTIFYOBJ=strdup.o fortify.o
#----------------select proper Makefile
MFLAGS= -f makefile_alpha
MFLAGS= -f $(SRC)makefile_alpha$(DUMMY) SRC=$(SRC)
#------------- path to HDF installation
HDFROOT=/data/lnslib

View File

@ -6,15 +6,17 @@
.SUFFIXES:
.SUFFIXES: .c .o .f
VPATH=$(SRC)
OBJ=dummy.o
all: libdummy.a
libdummy.a: $(OBJ)
- rm libdummy.a
rm -f libdummy.a
ar cr libdummy.a $(OBJ)
ranlib libdummy.a
clean:
- rm *.a
- rm *.o
rm -f *.a
rm -f *.o

6
dummy/makefile Normal file
View File

@ -0,0 +1,6 @@
# this makefile delegates to a version specific makefile
# where this subdirectory is (relative to the sics root)
S_DOWN=dummy
include ../make_forward

View File

@ -4,11 +4,10 @@
#
# Mark Koennecke, June 2003
#--------------------------------------------------------------------------
# the following line only for fortified version
#DFORTIFY=-DFORTIFY
#==========================================================================
CC = cc
CFLAGS = -std1 -g $(DFORTIFY) -I..
CFLAGS = -std1 -g $(DFORTIFY) -I$(SRC)..
DUMMY=_dummy
include ../alpha_def
include make_gen

View File

@ -1,14 +1,13 @@
#---------------------------------------------------------------------------
# Makefile for the Dummy specific part of SICS
# machine-dependent part for Tru64 Unix
# machine-dependent part for Redhat Linux with AFS at PSI
#
# Mark Koennecke, June 2003
#--------------------------------------------------------------------------
# the following line only for fortified version
#DFORTIFY=-DFORTIFY
#==========================================================================
CC = gcc
CFLAGS = -g $(DFORTIFY) -I..
CFLAGS = -g $(DFORTIFY) -I../$(SRC)
include make_gen
DUMMY=_dummy
include ../$(SRC)linux_def
include $(SRC)make_gen

View File

@ -7,6 +7,6 @@
#DFORTIFY= -DFORTIFY
#FORTIFYOBJ= fortify.o strdup.o
MFLAGS= -f makefile_linux
MFLAGS=-f $(SRC)makefile_linux$(DUMMY) SRC=$(SRC)
HDFROOT=/afs/.psi.ch/project/sinq/linux

68
make_forward Normal file
View File

@ -0,0 +1,68 @@
# This file is included by the makefile.
# It forwards the execution to a version specific makefile.
# S_DOWN, S_UP and SICS_VERSION must be defined
# M. Zolliker 08.2003
VERS_UNDEFINED=
VERS_UNDEFINED$(SICS_VERSION)=version_undefined
SICS_ROOT=$(PWD)/$(S_UP)
MD=cd $(SICS_ROOT)/obj/$(SICS_VERSION)/$(S_DOWN); \
make -f $(SRC)makefile_$(SICS_VERSION) SRC=$(SRC)
# overwrite MD when SICS_VERSION undefined
MD$(SICS_VERSION)=@ true
SRC=src/
.SUFFIXES: .none
default: $(VERS_UNDEFINED)
$(MD)
%.o: $(VERS_UNDEFINED)
$(MD) $@
%: $(VERS_UNDEFINED)
$(MD) $@
.DEFAULT: $(VERS_UNDEFINED)
$(MD) $@
tree:
@ $(SICS_ROOT)/maketree .
@ $(SICS_ROOT)/maketree matrix
@ $(SICS_ROOT)/maketree dummy
@ $(SICS_ROOT)/maketree psi
@ $(SICS_ROOT)/maketree psi/hardsup
@ $(SICS_ROOT)/maketree psi/tecs
cleanall:
$(MD:makfil=makefile_alpha) clean
$(MD:makfil=makefile_alpha_dummy) clean
version_undefined:
@ echo ""
@ echo "Usage:"
@ echo ""
@ echo "Creating objects and targets mixed up with sources:"
@ 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 "Creating objects and targets in separate subdirectories"
@ echo ""
@ echo " setenv SICS_VERSION version_xxx (assume we are using tcsh)"
@ echo " make tree (make the object directories)"
@ echo " make [target]"
@ echo ""
@ echo " where version_xxx is one of"
@ echo ""
@ ls -1 makefile_* | cut -b 10-99 | pr -t -o 4
@ echo ""
@ echo " Tip: define the environment variables at login"
@ echo ""

View File

@ -5,6 +5,8 @@
# Markus Zolliker March 2003
#---------------------------------------------------------------------------
VPATH=$(SRC)
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 \
@ -38,23 +40,17 @@ VELOOBJ = velo.o velosim.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
all: SICServer
full: matrix/libmatrix.a psi/hardsup/libhlib.a psi/tecs/libtecsl.a \
psi/libpsi.a $(BINTARGET)/SICServer
psi/libpsi.a SICServer
$(BINTARGET)/SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
$(VELOOBJ) $(DIFIL) $(EXTRA) \
$(SUBLIBS)
$(CC) -g -o SICServer \
$(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
$(VELOOBJ) $(DIFOBJ) $(EXTRA) $(LIBS)
cp SICServer $(BINTARGET)/
matrix/libmatrix.a:
cd matrix; make $(MFLAGS) libmatrix.a
@ -67,8 +63,9 @@ psi/tecs/libtecsl.a:
psi/libpsi.a:
cd psi; make $(MFLAGS) libpsi.a
clean:
rm -f *.o SICServer $(BINTARGET)/SICServer
rm -f *.o SICServer
cd psi/hardsup; make $(MFLAGS) clean
cd matrix; make $(MFLAGS) clean
cd psi/tecs; make $(MFLAGS) clean

View File

@ -5,6 +5,8 @@
# Markus Zolliker March 2003
#---------------------------------------------------------------------------
VPATH=$(SRC)
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 \
@ -38,30 +40,25 @@ VELOOBJ = velo.o velosim.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: SICServer
all: $(BINTARGET)/SICServer
full: matrix/libmatrix.a dummy/libdummy.a SICServer
full: matrix/libmatrix.a dummy/libdummy.a $(BINTARGET)/SICServer
$(BINTARGET)/SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
$(VELOOBJ) $(DIFIL) $(EXTRA) \
$(SUBLIBS)
$(CC) -g -o SICServer \
$(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \
$(VELOOBJ) $(DIFOBJ) $(EXTRA) $(LIBS)
cp SICServer $(BINTARGET)/
matrix/libmatrix.a:
cd matrix; make $(MFLAGS) libmatrix.a
dummy/libdummy.a:
cd dummy; make $(MFLAGS)
cd dummy; make $(MFLAGS) libdummy.a
clean:
rm -f *.o SICServer $(BINTARGET)/SICServer
rm -f *.o SICServer
cd matrix; make $(MFLAGS) clean
cd dummy; make $(MFLAGS) clean

8
makefile Normal file
View File

@ -0,0 +1,8 @@
# this makefile delegates to a version specific makefile
# where this subdirectory is (relative to root)
S_DOWN=.
# where root is
S_UP=.
include make_forward

View File

@ -9,24 +9,20 @@
#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
#---------------------------------------------------------------------------
include alpha_def
CC = cc
CFLAGS = -I$(HDFROOT)/include -I. $(DFORTIFY) -DHDF4 -DHDF5 -Ipsi/hardsup \
CFLAGS = -I$(HDFROOT)/include $(DFORTIFY) -DHDF4 -DHDF5 \
-I$(SRC). -I$(SRC)psi/hardsup \
-g -std1 -warnprotos
BINTARGET = bin
EXTRA=
LIBS = -L$(HDFROOT)/lib -Lpsi/hardsup -Lmatrix -lmatrix -Lpsi/tecs \
-Lpsi -lpsi -lhlib -ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \
psi/tecs/libtecsl.a
LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \
-ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
$(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \
$(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc

View File

@ -5,35 +5,20 @@
# 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
#---------------------------------------------------------------------------
#----------------select proper Makefile
MFLAGS= -f makefile_alpha_dummy
DUMMY=_dummy
include alpha_def
HDFROOT=/data/lnslib
CC = cc
CFLAGS = -I$(HDFROOT)/include -I. $(DFORTIFY) -DHDF4 -DHDF5 \
CFLAGS = -I$(HDFROOT)/include -I$(SRC). $(DFORTIFY) -DHDF4 -DHDF5 \
-g -std1 -warnprotos
BINTARGET = bin
EXTRA=
LIBS = -L$(HDFROOT)/lib -Lmatrix -lmatrix \
-Ldummy -ldummy -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
SUBLIBS = matrix/libmatrix.a dummy/libdummy.a
LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \
-ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
$(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \
$(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc

View File

@ -9,11 +9,13 @@
#NI= -DHAVENI
#NIOBJ= nigpib.o
#NILIB=-lgpibenet
#---------------------------------------------------------------------------
include linux_def
include $(SRC)linux_def
CC = gcc
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ipsi/hardsup -I. \
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) \
-I$(SRC)psi/hardsup -I$(SRC). \
-fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY)
BINTARGET = bin

View File

@ -1,26 +1,22 @@
#---------------------------------------------------------------------------
# Makefile for SICS
# machine-dependent part for Tru64 Unix
# machine-dependent part for Red Hat Linux
#
# 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
#----------------select proper Makefile
MFLAGS= -f makefile_linux_dummy
DUMMY=_dummy
include $(SRC)linux_def
CC = gcc
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -I. \
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -I$(SRC). \
-fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY)
BINTARGET = bin
HDFROOT=/afs/psi.ch/project/sinq/linux
EXTRA=nintf.o
SUBLIBS = dummy/libdummy.a matrix/libmatrix.a
@ -30,7 +26,7 @@ LIBS = -L$(HDFROOT)/lib $(SUBLIBS) \
$(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
include make_gen_dummy
include $(SRC)make_gen_dummy

32
maketree Executable file
View File

@ -0,0 +1,32 @@
#!/bin/tcsh
# create the version specific object tree
#
# M.Zolliker 08.2003
#
if ("$SICS_VERSION" == "") then
echo SICS_VERSION undefined
else
set SICS_ROOT=${0:h}
# determine object directory
set o="$SICS_ROOT/obj/$SICS_VERSION/$1"
# determine makefile
set m="$SICS_ROOT/$1/makefile_$SICS_VERSION"
if (-e $m) then
if (! -e $o) then
echo create directory $o
mkdir -p $o
else
echo $o exists
endif
rm -f $o/src
echo ln -s $SICS_ROOT/$1 $o/src
ln -s $SICS_ROOT/$1 $o/src
endif
endif

View File

@ -4,6 +4,8 @@
# Mark Koennecke, November 1996
#--------------------------------------------------------------------------
VPATH=$(SRC)
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

8
matrix/makefile Normal file
View File

@ -0,0 +1,8 @@
# this makefile delegates to a version specific makefile
# where this subdirectory is (relative to the sics root)
S_DOWN=matrix
# where root is (from here)
S_UP=..
include ../make_forward

View File

@ -0,0 +1,2 @@
DUMMY=_dummy
include makefile_alpha

View File

@ -6,7 +6,7 @@
# Markus Zolliker, March 2003
#--------------------------------------------------------------------------
include ../linux_def
include ../$(SRC)linux_def
CC = gcc
CFLAGS = -g $(DFORTIFY)

View File

@ -1,15 +1,2 @@
#---------------------------------------------------------------------------
# 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
DUMMY=_dummy
include $(SRC)makefile_linux

1
o2t.h
View File

@ -19,4 +19,3 @@
int argc, char *argv[]);
#endif