Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xray.sai.msu.ru/~ivan/gmt/patch/makefile.linux.dynamic
Дата изменения: Fri Jun 4 20:52:55 1999
Дата индексирования: Tue Oct 2 15:18:47 2012
Кодировка:

Поисковые слова: вторая космическая скорость
# @(#)makefile.gmt 1.17 03/12/99
#
# Copyright (c) 1991-1999 by P. Wessel and W. H. F. Smith
# See COPYING file for copying and redistribution conditions.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program 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 General Public License for more details.
#
# Contact info: www.soest.hawaii.edu/gmt
#-------------------------------------------------------------------------------
# Makefile for GMT Version 3.2
# GNU, Sys V, and BSD Compatible
#
# Follow the instructions in this makefile to customize your setup.
# To compile/link them, try "make init", "make all", and "make install".
# When done, clean out directory with "make clean". If the example
# scripst have been installed in ../examples, try "make examples".
# To start completely from scratch, first do "make spotless".
#
# Authors: Paul Wessel, SOEST, U. of Hawaii
# Walter H. F. Smith, Lab for Satellite Altimetry, NOAA
#
# Date: 1-MAR-1999
#-------------------------------------------------------------------------------
# Get Default Macros
#-------------------------------------------------------------------------------
#

include makegmt.macros # Edit this file to change current settings

#-------------------------------------------------------------------------------
# !! STOP EDITING HERE, THE REST IS FIXED !!
#-------------------------------------------------------------------------------
NETCDFLIB = $(NETCDF)/lib
NETCDFINC = $(NETCDF)/include
SHELL=/bin/sh
MAKE_OPTS = RANLIB=$(RANLIB)
CFLAGS = -I$(NETCDFINC) $(SI) $(CC_OPT) $(TRIANGLE_D) -fPIC
CDF = -L$(NETCDFLIB) -lnetcdf

PS = -L. -lpsl
GMT = -L. -lgmt

LIB_C = fourt.c \
gmt_cdf.c \
gmt_customio.c \
gmt_grdio.c \
gmt_init.c \
gmt_io.c \
gmt_map.c \
gmt_plot.c \
gmt_shore.c \
gmt_stat.c \
gmt_support.c \
gmt_vector.c

GMT_H = gmt.h \
gmt_math.h \
gmt_nan.h \
gmt_boundcond.h \
gmt_shore.h \
gmt_project.h \
gmt_grd.h \
gmt_funcnames.h \
gmt_colors.h \
gmt_grdio.h \
gmt_customio.h \
gmt_bcr.h \
gmt_unique.h \
gmt_keywords.h \
gmt_io.h \
pslib.h

GMT_I = gmt_init.h \
gmt_defaults.h \
gmt_media_name.h \
gmt_media_size.h \
PS_font_names.h \
PS_font_heights.h

PS_H = pslib.h \
pslib_inc.h \
PS_font_names.h \
PS_font_heights.h

PROGS_C = blockmean.c blockmedian.c blockmode.c filter1d.c fitcircle.c \
grdfilter.c gmtconvert.c gmtdefaults.c gmtmath.c gmtselect.c \
gmtset.c grd2cpt.c grd2xyz.c grdcontour.c grdcut.c grdclip.c \
grdedit.c grdfft.c grdgradient.c grdhisteq.c grdimage.c grdinfo.c \
grdlandmask.c grdmask.c grdtrack.c grdreformat.c grdmath.c \
grdpaste.c grdproject.c grdsample.c grdtrend.c grdvector.c grdview.c \
grdvolume.c makecpt.c mapproject.c minmax.c nearneighbor.c project.c \
psbasemap.c psclip.c pscoast.c pshistogram.c psimage.c psmask.c \
psrose.c psscale.c pstext.c pscontour.c pswiggle.c psxy.c psxyz.c \
sample1d.c spectrum1d.c splitxyz.c surface.c trend1d.c trend2d.c \
triangulate.c xyz2grd.c

#-------------------------------------------------------------------------------
# object file dependencies
#-------------------------------------------------------------------------------

LIB_O = ${LIB_C:.c=.o}

PROGS_O = ${PROGS_C:.c=.o}

PROGS = ${PROGS_C:.c=}

$(LIB_O): $(GMT_H) $(GMT_I)

$(PROGS_O): $(GMT_H)

# Jonathan Shewchuck's triangulation model (www.cs.cmu.edu/~quake)
# Only used if TRIANGLE_D and TRIANGLE_O are set in makegmt.macros
# Please read README.TRIANGLE in this source directory

triangle.o: triangle.c
$(CC) -c $(CFLAGS) -DNO_TIMER -DTRILIBRARY -DREDUCED -DCDT_ONLY $<

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

LIB = libpsl.so.3.2 libgmt.so.3.2

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

all: init libs $(PROGS)

init: gmt_nan.h gmt_math.h

gmt_nan.h:
$(CC) $(CFLAGS) gmt_nan_init.c $(CDF) -lm -o gmt_nan_init
./gmt_nan_init

gmt_math.h:
$(CSH) gmt_math_init.$(CSH)

install: all
for i in $(PROGS); do \
cp $$i$(DOS) $(BINDIR); \
done

examples:
if [ -d ../examples ]; then \
cd ../examples; \
$(CSH) do_examples.$(CSH); \
cd ../src; \
else \
echo "examples directory not installed"; \
fi

clean:
rm -f $(PROGS) *.o gmt_nan_init

spotless: clean
rm -f gmt_nan.h gmt_math.h

#-------------------------------------------------------------------------------
# libraries
#-------------------------------------------------------------------------------

libs: $(LIB)

libpsl.so.3.2: pslib.o
$(CC) $(CFLAGS) -shared -Wl,-soname,libpsl.so.3 -o libpsl.so.3.2 pslib.o
[ -f libpsl.so.3 ] || ln -s libpsl.so.3.2 libpsl.so.3
[ -f libpsl.so ] || ln -s libpsl.so.3 libpsl.so
# $(AR) cvr libpsl.a $?
# $(RANLIB) libpsl.a

pslib.o: pslib.c $(PS_H)
$(CC) $(CFLAGS) -c pslib.c

libgmt.so.3.2: $(LIB_O) $(TRIANGLE_O)
$(CC) $(CFLAGS) -shared -Wl,-soname,libgmt.so.3 -o libgmt.so.3.2 $(LIB_O) $(TRIANGLE_O)
[ -f libgmt.so.3 ] || ln -s libgmt.so.3.2 libgmt.so.3
[ -f libgmt.so ] || ln -s libgmt.so.3 libgmt.so
# $(AR) cvr $@ $?
# $(RANLIB) $@

#-------------------------------------------------------------------------------
# program dependencies
#-------------------------------------------------------------------------------

$(PROGS): $(LIB) $(PROGS_O)
$(CC) $(CFLAGS) $@.o -L. -lgmt -lpsl $(CDF) -lm -o $@

.c.o:
$(CC) -c $(CFLAGS) $<