Different makefiles for different machines M.Z.

This commit is contained in:
cvs
2003-03-18 09:43:43 +00:00
parent 1969980f0f
commit f42a780057
17 changed files with 409 additions and 102 deletions

View File

@@ -1,7 +0,0 @@
# list of prerequisites including paths for VPATH
Q=$^
# Fortran/C source file name
F=$<
C=$<

View File

@@ -1,7 +0,0 @@
# list of prerequisites including paths for VPATH
Q=$>
# Fortran/C source file name
F=$*.f
C=$*.c

62
tecs/make_gen Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +0,0 @@
default:
%:
@echo "define the environment variable MACHINE to one of:"
@ls make_opt_* | cut -b 10-99

View File

@@ -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

44
tecs/makefile_alpha Normal file
View File

@@ -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

46
tecs/makefile_linux Normal file
View File

@@ -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