Skip to content

Commit

Permalink
Ported first to my Macintosh, then to a Linux machine, "crunchy".
Browse files Browse the repository at this point in the history
Some more files crept in in the process; makefiles, an include
file, and tests.
  • Loading branch information
Jeff Painter committed May 21, 2015
1 parent b155c48 commit 36e070c
Show file tree
Hide file tree
Showing 16 changed files with 17,648 additions and 47 deletions.
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# adapted from https://gist.github.com/octocat/9257657

# EzGet-specific exclusions, executables and other binaries
##########################################################
areamean
areamean.dSYM
stubs

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.s
*.o
*.so
*.a
*.pyc
a.out

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs databases, backups, debugging #
######################################
*.log
*.sql
*.sqlite
*.bup
*_bup
*~
*.trace

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Resources
Binary file added EzGet 1997.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions Makefile
13 changes: 8 additions & 5 deletions Makefile.Mac.gfortran
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
#
#--------------------------------------------------------------------
LIBNAME = ezget
CDMSLIB = /usr/local/lib
CDMSINC = /usr/local/include
# DEBUG = -O
DEBUG = -g -save-temps -O0
#jfp was CDMSLIB = /usr/local/lib
#jfp was CDMSINC = /usr/local/include
CDMSLIB = ${UVCDAT_SETUP_PATH}/Externals/lib
CDMSINC = ${UVCDAT_SETUP_PATH}/Externals/include
DEBUG = -O
# DEBUG = -g -save-temps -O0
# Requires Absoft FORTRAN
FC = /usr/local/bin/gfortran
CC = gcc
ARCHOPT = -arch x86_64
#ARCHOPT = -arch x86_64
#ARCHOPT = -arch i386
ARCHOPT = -m64
# FOPTS = -fcray-pointer $(ARCHOPT) -W
FOPTS = -fcray-pointer $(ARCHOPT) -I ../../libdrs/lib -I ../include
FFLAGS = $(DEBUG) $(FOPTS)
Expand Down
78 changes: 78 additions & 0 deletions Makefile.crunchy.gfortran
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# EZGet Makefile
#
# Usage:
#
# Change DEBUG as needed.
# Check the paths specified here for whether they are right for you.
# Provide a path to fcddrs.h, or copy it (it's in cdat/libcdms/include)
# make
#
#--------------------------------------------------------------------
LIBNAME = ezget
#jfp was CDMSLIB = /usr/local/lib
#jfp was CDMSINC = /usr/local/include
CDMSLIB = ${UVCDAT_SETUP_PATH}/Externals/lib
CDMSINC = ${UVCDAT_SETUP_PATH}/Externals/include
DEBUG = -O
# DEBUG = -g -save-temps -O0
# Requires Absoft FORTRAN
FC = /usr/bin/gfortran
CC = gcc
#ARCHOPT = -arch x86_64
#ARCHOPT = -arch i386
ARCHOPT = -m64
# FOPTS = -fcray-pointer $(ARCHOPT) -W
FOPTS = -fcray-pointer $(ARCHOPT) -I ../../libdrs/lib -I ../include
FFLAGS = $(DEBUG) $(FOPTS)
INSTALL_LIB = /usr/local/lib
INSTALL_INC = /usr/local/include
CPPFLAGS = $(ARCHOPT)
CPP = cpp

FOBJECTS = Src/${LIBNAME}.o
FINCLUDES = drsdef.h drscom.h cycle.h
# FINCLUDES =
FSOURCES = $(FOBJECTS:.o=.F)

COBJECTS =
CINCLUDES = drscdf.h
CSOURCES = $(COBJECTS:.o=.c)

OBJECTS = $(FOBJECTS) $(COBJECTS)
SOURCES = $(FSOURCES) $(CSOURCES)
INCLUDES = $(FINCLUDES) $(CINCLUDES)
#--------------------------------------------------------------------

all: lib${LIBNAME}.a
#lib${LIBNAME}.so

shared: drsdef.h lib${LIBNAME}.so

lib${LIBNAME}.a: $(OBJECTS)
ar rv lib${LIBNAME}.a $?

lib${LIBNAME}.so: $(OBJECTS)
$(CC) $(ARCHOPT) -lgfortran -L${CDMSLIB} -I${CDMSINC} -lcdms -shared -o lib${LIBNAME}.so $(OBJECTS)

#--------------------------------------------------------------------

install: lib${LIBNAME}.a
cp lib${LIBNAME}.a $(INSTALL_LIB); chmod 644 $(INSTALL_LIB)/lib${LIBNAME}.a
# cp drsdef.h $(INSTALL_INC); chmod 644 $(INSTALL_INC)/drsdef.h

#--------------------------------------------------------------------------

# Miscellaneous junk

tags:
etags $(SOURCES) $(INCLUDES)

clean:
-rm -f Src/*.o
-rm -f *~
-rm -f core

.SUFFIXES: .F .o

.F.o:
cd Src ; $(FC) $(FFLAGS) -c ../$<
Loading

0 comments on commit 36e070c

Please sign in to comment.