| 1 |
# |
| 2 |
# $Id: GNUmakefile,v 1.2 1999/07/28 00:23:43 d3e129 Exp $ |
| 3 |
# |
| 4 |
|
| 5 |
ARFLAGS = urs |
| 6 |
RANLIB = ranlib |
| 7 |
|
| 8 |
# SUN SOLARIS |
| 9 |
# CC = cc |
| 10 |
# CFLAGS = -O |
| 11 |
# FC = f77 |
| 12 |
# FFLAGS = -fast -O4 -stackvar -fsimple=2 -depend -dalign |
| 13 |
# LIBS = |
| 14 |
# INCLUDES = -I. |
| 15 |
# DEFINES = -DSUN |
| 16 |
# CPPFLAGS = $(INCLUDES) $(DEFINES) |
| 17 |
# BLAS := dgemm.o idamax.o crayio.o dscal.o daxpy.o dcopy.o ddot.o |
| 18 |
# LDFLAGS = |
| 19 |
|
| 20 |
# LINUX with g77 |
| 21 |
CC = gcc |
| 22 |
CFLAGS = -g -O |
| 23 |
FC = gfortran |
| 24 |
FFLAGS = -O3 -malign-double -ffast-math -fno-second-underscore |
| 25 |
## -funroll-loops ... introduces bugs in mfind_weight |
| 26 |
##g -Wimplicit -Wunused |
| 27 |
LIBS = -L. |
| 28 |
INCLUDES = -I. |
| 29 |
DEFINES = -DLINUX |
| 30 |
CPPFLAGS = $(INCLUDES) $(DEFINES) |
| 31 |
BLAS := linux_cputime.o dgemm.o idamax.o crayio.o dscal.o daxpy.o dcopy.o ddot.o |
| 32 |
LDFLAGS = |
| 33 |
|
| 34 |
# IBM AIX |
| 35 |
#EXPLICITF = TRUE |
| 36 |
# FC = xlf |
| 37 |
# FFLAGS = -O3 -qnosave -qalign=4k |
| 38 |
# LIBS = -lblas |
| 39 |
# INCLUDES = -I. |
| 40 |
# DEFINES = -DIBM -DAIX |
| 41 |
# CPPFLAGS = $(INCLUDES) $(DEFINES) |
| 42 |
# FCONVERT = $(CPP) $(CPPFLAGS) $< | sed '/^\#/D' > $*.f |
| 43 |
# BLAS = |
| 44 |
|
| 45 |
|
| 46 |
############################################ |
| 47 |
# Below here should be machine independent # |
| 48 |
############################################ |
| 49 |
|
| 50 |
|
| 51 |
OBJ := fci_mfndwt.o fci_ofndoc.o fci_num.o \ |
| 52 |
fci_ifill.o fci_mgraph.o fci_ofndwt.o fci_setup.o \ |
| 53 |
fci_mfndoc.o fci_ograph.o \ |
| 54 |
fci_err.o fci_tinit.o fci_cntone.o fci_spnad.o \ |
| 55 |
fci_prspnad.o \ |
| 56 |
fci_dfill.o fci_spnfrc.o screen.o renorm.o \ |
| 57 |
fci_onelcc.o fci_sigma.o fci_diags.o \ |
| 58 |
fci_load.o \ |
| 59 |
fci_srt1cc.o yacobi.o fci_hmod.o fci_prntri.o \ |
| 60 |
fci_make_eaj.o fci_prteop.o fci_hsort.o fci_detwalk.o \ |
| 61 |
fci_owalk_info.o fci_couple1.o fci_1pdm.o fci_output.o \ |
| 62 |
fci_2pdm.o fci_couple2.o fci_3pdm.o fci_couple3.o \ |
| 63 |
fci_hami.o fci_onepdm.o fci_intchk.o fci_prvec.o \ |
| 64 |
fci_hv.o fci_axb.o fci_solve.o fci_davids.o rsg.o $(BLAS) |
| 65 |
|
| 66 |
fci: fci.o libfci.a |
| 67 |
$(FC) $(LDFLAGS) $(FFLAGS) -o $@ $^ $(LIBS) |
| 68 |
|
| 69 |
timer: timer.o libfci.a |
| 70 |
$(FC) $(LDFLAGS) $(FFLAGS) -o $@ timer.o libblas.a libfci.a $(LIBS) |
| 71 |
|
| 72 |
libfci.a: $(OBJ) |
| 73 |
$(AR) $(ARFLAGS) $@ $^ |
| 74 |
$(RANLIB) $@ |
| 75 |
|
| 76 |
clean: |
| 77 |
-$(RM) -f core fci *.o libfci.a |
| 78 |
|
| 79 |
realclean: clean |
| 80 |
-$(RM) -f *~ \#*\# *mon.out *.prof a.out TAGS |
| 81 |
|
| 82 |
$(OBJ): fciinfo.fh fciparam.fh |
| 83 |
|
| 84 |
fci_tinit.o: fcitime.fh |
| 85 |
|
| 86 |
ifdef EXPLICITF |
| 87 |
# |
| 88 |
# Needed on when FC does not preprocess .F files with CPP to get .f files |
| 89 |
# |
| 90 |
.SUFFIXES: |
| 91 |
.SUFFIXES: .o .s .F .f .c |
| 92 |
|
| 93 |
FCONVERT = (/bin/cp $< /tmp/$$$$.c; \ |
| 94 |
$(CPP) $(CPPFLAGS) /tmp/$$$$.c | sed '/^$$/d' > $*.f; \ |
| 95 |
/bin/rm -f /tmp/$$$$.c) || exit 1 |
| 96 |
|
| 97 |
.F.o: |
| 98 |
@echo Converting $*.F '->' $*.f |
| 99 |
@$(FCONVERT) |
| 100 |
$(FC) -c $(FFLAGS) $*.f |
| 101 |
@$(RM) $*.f |
| 102 |
|
| 103 |
.F.f: |
| 104 |
@echo Converting $*.F '->' $*.f |
| 105 |
@$(FCONVERT) |
| 106 |
endif |
| 107 |
# |
| 108 |
|