You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XWDRIV 1 /XWINDOW Workstations running X Window System C
compile
# if not done already
cd pgplot
./makemake $PWD linux g77_gcc_aout
make
important note
*** Finished compilation of PGPLOT ***
Note that if you plan to install PGPLOT in a different
directory than the current one, the following files will be
needed.
libpgplot.a
grfont.dat
rgb.txt
pgxwin_server
Also note that subsequent usage of PGPLOT programs requires that
the full path of the chosen installation directory be named in
an environment variable named PGPLOT_DIR.
example command to comile code that uses pgplot
the instructions below rely that PGPLOT_DIR is set - for example:
TARGET = example
# note: you can set the PGPLOT_DIR environment variable to the location of the PGPLOT library
# or you can set it here
# PGPLOT_DIR = /usr/local/pgplot
CC = gfortran
CFLAGS = -w -ffixed-line-length-0
LIBS = -L$(PGPLOT_DIR) -lpgplot -L/usr/X11R6/lib -lX11 `$(PGPLOT_DIR)/cpg/libgcc_path.sh` -lgcc -lm -lc
SRC = $(TARGET).f
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
clean:
@rm -f $(TARGET)
then run
make clean
make
compile ONE target - named example1 and example2 - depends on example1.f and example2.f
TARGETS = example example2
# note: you can set the PGPLOT_DIR environment variable to the location of the PGPLOT library
# or you can set it here
# PGPLOT_DIR = /usr/local/pgplot
CC = gfortran
CFLAGS = -w -ffixed-line-length-0
LIBS = -L$(PGPLOT_DIR) -lpgplot -L/usr/X11R6/lib -lX11 `$(PGPLOT_DIR)/cpg/libgcc_path.sh` -lgcc -lm -lc
all: $(TARGETS)
$(TARGETS):
$(CC) $(CFLAGS) -o $@ $@.f $(LIBS)
clean:
@rm -f $(TARGETS)
compile ALL *.f files in the directory (!)
# note: you can set the PGPLOT_DIR environment variable to the location of the PGPLOT library
# or you can set it here
# PGPLOT_DIR = /usr/local/pgplot
CC = gfortran
CFLAGS = -w -ffixed-line-length-0
LIBS = -L$(PGPLOT_DIR) -lpgplot -L/usr/X11R6/lib -lX11 `$(PGPLOT_DIR)/cpg/libgcc_path.sh` -lgcc -lm -lc
SRCS = $(wildcard *.f)
TARGETS = $(SRCS:.f=)
all: $(TARGETS)
$(TARGETS): %: %.f
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
clean:
@rm -f $(TARGETS)
note: you can select what files to use using the wildcard statement - for example to compile only the example-starting files use SRCS = $(wildcard example*.f)