aboutsummaryrefslogtreecommitdiff
path: root/plotlib/misc
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2009-05-11 00:27:49 +0000
committerDimitri Sokolyuk <demon@dim13.org>2009-05-11 00:27:49 +0000
commit0d4f43d355de79178b1142e9735902cf641670b6 (patch)
tree2ced2323f6351db2a51090b3fd13eb11f69ff53f /plotlib/misc
Xfoil 6.97
Diffstat (limited to 'plotlib/misc')
-rw-r--r--plotlib/misc/Makefile.linux.shared222
-rw-r--r--plotlib/misc/README17
-rw-r--r--plotlib/misc/Readme.absoft65
-rw-r--r--plotlib/misc/makesplitlib50
4 files changed, 354 insertions, 0 deletions
diff --git a/plotlib/misc/Makefile.linux.shared b/plotlib/misc/Makefile.linux.shared
new file mode 100644
index 0000000..70827fc
--- /dev/null
+++ b/plotlib/misc/Makefile.linux.shared
@@ -0,0 +1,222 @@
+#***********************************************************************
+# Module: Makefile.linux
+#
+# Copyright (C) 1996 Harold Youngren, Mark Drela
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Report problems to: guppy@maine.com
+# or drela@mit.edu
+#***********************************************************************
+
+#=======================================================================
+# This Makefile was used to make a shared library version of the plotlib
+# on Linux. This has not been updated or supported.
+#=======================================================================
+
+
+
+#================================#
+# Makefile for Xplot11 library #
+#================================#
+
+#point to your install directory
+INSTALLDIR= $(HOME)/lib
+#INSTALLDIR= /usr/local/lib
+#INSTALLDIR= .
+
+### Use these to set library name
+### (add DP to keep double precision version separate)
+PLTLIB = libPlt
+#PLTLIB = libPltDP
+
+###========================================================
+### Basic plot library object files
+OBJ = plt_base.o plt_font.o plt_util.o plt_color.o \
+ set_subs.o gw_subs.o ps_subs.o Xwin.o
+OBJMISC =
+OBJ3D =
+OBJOLD =
+###
+###--------------------------------------------------------
+### Uncomment to add the old plot compatibility routines
+OBJOLD = plt_old.o
+###
+###--------------------------------------------------------
+### Uncomment to add the 3D-view routines
+OBJ3D = plt_3D.o
+###
+###--------------------------------------------------------
+### Uncomment for f77 compiler w/o AND() and RSHIFT/LSHIFT functions.
+### This adds some functions to duplicate these using IAND and ISHFT
+### which often appear in these offending fortran's libraries.
+### The compilers that this has affected include:
+### HPUX f77
+### Absoft f77 on Linux
+###
+#OBJMISC = util-ops.o
+
+
+
+###================================================
+### Default compilers and flags, install commands
+F77 = f77
+CC = cc
+
+# Uncomment DP to make double-precision version
+#DP = -r8
+
+# Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
+DEFINE = -DUNDERSCORE
+
+FFLAGS = -O $(DP)
+CFLAGS = -O $(DEFINE)
+AR = ar r
+RANLIB = ranlib
+LINKLIB = -lX11
+
+
+###-------------------------------------------------------------------------
+### Uncomment for Linux, using the script f77 (unusable in Slackware 3.0)
+### Note compiler options for Linux:
+### f77 script (calls f2c/gcc) note bug in Slackware 3.0 f77 script
+### fort77 script (calls f2c/gcc) perl script from RH or from yaf77
+### g77 the GNU F77 compiler
+F77 = g77
+#F77 = fort77
+#F77 = f77-f2c
+CC = gcc
+# Uncomment DP to make double-precision version
+# (note -r8 does not work in g77, use f2c instead)
+#DP = -r8
+FFLAGS = -O2 $(DP)
+CFLAGS = -O2 $(DEFINE)
+#AR = ar r
+#RANLIB = ranlib
+LINKLIB = -L/usr/X11R6/lib -lX11
+
+
+
+
+###-------------------------------------------------------------------------
+### Basic make targets - build library, test programs
+
+$(PLTLIB): $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC)
+ $(AR) $(PLTLIB).a $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC)
+ $(RANLIB) $(PLTLIB).a
+
+test: $(PLTLIB)
+ (cd examples; make test)
+
+
+###-------------------------------------------------------------------------
+### Utility functions - install the library, clean the directory
+
+install: $(PLTLIB).a
+ mv $(PLTLIB).a $(INSTALLDIR)
+ $(RANLIB) $(INSTALLDIR)/$(PLTLIB).a
+
+clean:
+ -/bin/rm *.o
+# -/bin/rm -r PIC
+ -/bin/rm *.a *.so.*
+ -/bin/rm plot*.ps
+ (cd examples; make clean)
+
+
+###-------------------------------------------------------------------------
+### This set of targets makes the libPlt Linux ELF shared library
+### As far as I know this only works with g77 as it is the only Linux
+### compiler that makes shared libraries.
+###
+### You will need to install the library in some place that ldconfig knows
+### about to get this to work as a shared library.
+### 1) Before making the shared library you may need to change the -lf2c
+### library reference in the $(PLTLIB).so target below to the shared
+### fortran library that you are using (most Linuxes use libf2c, hence
+### the -lf2c).
+### 2) Install the shared library in some place (like /usr/local/lib).
+### 3) Make the following links in that directory
+### ln -s libPlt.so.0.21 libPlt.so.0
+### ln -s libPlt.so.0 libPlt.so
+### 4) Look in /etc/ld.so.conf and check that the library directory is
+### in the list of directories and add it if it isn't.
+### 5) Then run ldconfig -v (as root) to get the loader to recognize the
+### shared library.
+
+$(PLTLIB).so:
+ mkdir -p PIC
+ make -f Makefile.linux.shared shared
+ gcc -shared -Wl,-soname,$(PLTLIB).so.0 -o $(PLTLIB).so.0.21 \
+ PIC/*.o -lf2c -lm -lc
+
+SHAREDOBJ = $(patsubst %.o,PIC/%.o,$(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC))
+
+shared: $(SHAREDOBJ)
+###-------------------------------------------------------------------------
+
+
+
+###-------------------------------------------------------------------------
+### compile plot package routines
+
+plt_base.o: plt_base.f pltlib.inc
+ $(F77) -c $(FFLAGS) plt_base.f
+
+plt_color.o: plt_color.f pltlib.inc
+ $(F77) -c $(FFLAGS) plt_color.f
+
+plt_font.o: plt_font.f CHAR.INC SLAN.INC MATH.INC SYMB.INC
+ $(F77) -c $(FFLAGS) plt_font.f
+
+plt_util.o: plt_util.f
+ $(F77) -c $(FFLAGS) plt_util.f
+
+plt_3D.o: plt_3D.f
+ $(F77) -c $(FFLAGS) plt_3D.f
+
+plt_old.o: plt_old.f pltlib.inc
+ $(F77) -c $(FFLAGS) plt_old.f
+
+set_subs.o: set_subs.f pltlib.inc
+ $(F77) -c $(FFLAGS) set_subs.f
+
+gw_subs.o: gw_subs.f pltlib.inc
+ $(F77) -c $(FFLAGS) gw_subs.f
+
+ps_subs.o: ps_subs.f pltlib.inc
+ $(F77) -c $(FFLAGS) ps_subs.f
+
+util-ops.o: util-ops.f
+ $(F77) -c $(FFLAGS) util-ops.f
+
+Xwin.o: Xwin.c
+ $(CC) -c $(CFLAGS) Xwin.c
+
+
+### May need to specify these on a brain-dead make system
+#.f.o: $(F77) -c $(FFLAGS) $<
+#.c.o: $(CC) -c $(CFLAGS) $<
+
+
+### Handles the shared library objects
+
+PIC/%.o : %.f
+ $(F77) -c $(FFLAGS) -fPIC -o $@ $<
+PIC/%.o : %.c
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC -o $@ $<
+
+
+
diff --git a/plotlib/misc/README b/plotlib/misc/README
new file mode 100644
index 0000000..abf03e3
--- /dev/null
+++ b/plotlib/misc/README
@@ -0,0 +1,17 @@
+This directory contains random, outdated but potentially useful info or
+Makefiles.
+
+You may need to read through these and change things substantially to get them working on your machine. They may be of some help.
+
+makesplitlib Script for making a libPlt.a with each routine in a separate
+ object file. This may be necessary if you want to change
+ particular subroutines within the plotlib with your own
+ versions and get them to link. The current library archives
+ all the routines within a source file into one linkable entity.
+
+Makefile.linux.shared This makefile was used to make a shared object (ELF)
+ library for Linux. If you know what this means I don't
+ really need to tell you more.
+
+Readme.absoft Discusses the quirks of the Absoft Fortran compiler(s). The
+ Linux versions were the ones specifically addressed here.
diff --git a/plotlib/misc/Readme.absoft b/plotlib/misc/Readme.absoft
new file mode 100644
index 0000000..9c35095
--- /dev/null
+++ b/plotlib/misc/Readme.absoft
@@ -0,0 +1,65 @@
+/***********************************************************************
+ Module: Readme.absoft
+
+ Copyright (C) 1996 Harold Youngren, Mark Drela
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ Report problems to: guppy@maine.com
+ or drela@mit.edu
+***********************************************************************/
+
+Xplot11
+C Version 4.46 11/28/01
+
+
+This Readme file pertains to the Absoft Linux f77 compiler, version 5.x, this
+stuff has not been checked for later versions...
+
+Various compilers support intrinsics for RSHIFT, LSHIFT and AND(). Absoft
+is among those that do not have these supported (also HPUX f77 at last check).
+
+I added a file (util-ops.f) that needs to be included for the Absoft f77 environment. This file contains functions for bit shifts RSHIFT,LSHIFT and
+arithmetic AND(I1,I2) for fortrans that lack these intrinsics.
+
+See the Makefile where this is one of the commented out options.
+
+Note that a number of compile switches need to be set when using the Absoft
+f77 compiler. See the Makefile for these.
+
+
+Absoft Linux f77 flags that I use...
+
+DP = -N113 (only for making a double precision version of the library)
+FFLAGS = -s -f -O -B100 -B108 -N3 -N90 $(DP)
+
+-s static
+-f force to lower case
+-O optimize
+-B100 Pentium Pro flag (use -B101 for general Pentium compatibility)
+-B108 append single underscore to names
+-N3 explicitly opened unformatted files contain record information
+-N90 pass character args same as g77 and f2c
+-N113 lame version of -r8 flag to promote singles into doubles
+
+Note that you will need to link with the libU77 library if you use some
+of the UNIX fortran-isms like GETARG. This is supplied by Absoft but is not
+in their default link libs. You need to add this library to a link statement
+something like this:
+
+f77 -o foobar foobar.o -lU77
+
+HY
+
diff --git a/plotlib/misc/makesplitlib b/plotlib/misc/makesplitlib
new file mode 100644
index 0000000..6383dad
--- /dev/null
+++ b/plotlib/misc/makesplitlib
@@ -0,0 +1,50 @@
+#!/bin/csh
+# Shell script for making split version of the Xplot11 library
+# The split version allows one to link to routines of the same name without
+# fatal link errors as each module can be extracted as needed.
+#
+# This makes a subdirectory ../merge in the Xplot11 source directory
+# that contains an fsplit version of the source files. It then compiles
+# these to make objects, then a library in a crude hack (no makefile).
+# The resulting library is placed in this directory as libPlt-split.a for
+# the user to do what he wishes.
+# HHY 8/30/96
+
+# Optionally get f77 flags from #1 argument to makesplitlib
+# i.e. makesplitlib "-I../foobar -O4 -r8"
+#
+set f77flags = "-O2"
+set f77 = "g77"
+set fsplit = "fsplit-gup"
+
+
+if ($1 != "") set f77flags = $1
+echo "Using fortran compile flags ($f77flags) (option set by arg 1)"
+
+echo "Creating ../merge subdirectory"
+if !(-e ./merge) mkdir merge
+
+cd merge
+
+echo "Starting fsplit of all files in Xplot11 directory"
+foreach file (../*.f)
+ echo "Splitting $file"
+ $fsplit $file
+end
+
+echo "Compiling all split fortran files..."
+foreach file (*.f)
+ $f77 -c $f77flags -I../ $file
+end
+
+echo "Compiling the C interface file"
+cc -c -O -I../ ../Xwin.c
+
+echo "Making library from objects"
+ar -r libPlt-split.a *.o
+
+echo "Moving library to main Xplot11 directory"
+mv libPlt-split.a ..
+
+exit
+