#
#	~/mc/mcv3k/src/Makefile
#
#	makefile to compile and link the MCV3K Monte Carlo program
#
#	TP,	12-Se-2000,	PSI
#
#	TP,	21-Nov-2001:	extended to Linux
#
#--------------------------------------------------------------------------
#
#	for Digital Unix
#	
#FF = f77
#CFLAGS = -c
#------------------------------
#       for Linux
#
FF = g77
CFLAGS = -c -Wno-globals -finit-local-zero -fno-automatic

cern_lib = $(CERN_ROOT)/lib

BIN_DIR = $(HOME)/bin
OBJ =	mcv3k.o mcv3k_sub.o
.f.o:
	$(FF) $(CFLAGS)  $*.f

all: mcv3k readmcv3k

mcv3k:	$(OBJ)
	$(FF) -o $(BIN_DIR)/mcv3k $(OBJ) $(cern_lib)/libmathlib.a \
	$(cern_lib)/libkernlib.a

readmcv3k: read_mcv3k_out_nt.o
	$(FF) -o $(BIN_DIR)/read_mcv3k_out_nt read_mcv3k_out_nt.o $(cern_lib)/libpacklib.a \
	$(cern_lib)/libkernlib.a


clean:
	rm -f *.o *~

install:
	cp -pv define_mcv3k run_mcv3k $(BIN_DIR)

#
#--------------------------------------------------------------------------
#
#	EOF
#
