File: makedefs.in

package info (click to toggle)
wcslib 5.16-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,488 kB
  • ctags: 15,924
  • sloc: ansic: 30,968; lex: 7,902; fortran: 6,608; sh: 3,572; sed: 447; pascal: 153; makefile: 12
file content (242 lines) | stat: -rw-r--r-- 8,502 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#-----------------------------------------------------------------------------
# GNU makefile definitions for building WCSLIB 5.16
#
# makedefs is generated from makedefs.in by configure.  It contains variable
# definitions and some general-purpose rules for building WCSLIB.
#
# Targets defined here
# --------------------
#   printenv:  Print the environment as seen within makefile rules.
#   show:      Print the values of all makefile variables used.
#
# Notes:
#   1) If you need to make changes then it may be preferable to modify
#      makedefs.in (not makedefs).  The makefile will detect this and
#      automatically re-run config.status to regenerate makedefs.
#
#   2) There are three choices for trigd functions - cosd(), sind(), tand(),
#      acosd(), asind(), atand(), and atan2d(), made by setting WCSTRIG:
#
#      1: Use the wrapper functions supplied with WCSLIB (default):
#         WCSTRIG := WRAPPER
#
#      2: Use native trigd functions supplied in a mathematics library such
#         as libsunmath (you will also need to add the library to the LIBS
#         variable below):
#         WCSTRIG := NATIVE
#
#      3: Use C preprocessor macro implementations of the trigd functions
#         (this method is typically 20% faster but may lead to rounding
#         errors near the poles):
#         WCSTRIG := MACRO
#
#   3) Variables for creating the shared (dynamic) library are currently
#      only set by 'configure' if the GNU C compiler is used.  However,
#      you can set these variables by hand, preferably in makedefs.in.
#
#      Shared libraries require position-independent code (PIC) which imposes
#      a performance overhead.  Consequently the static libraries are
#      compiled separately without this option.
#
#      The shared library will be installed with version number, e.g. as
#      libwcs.so.5.16 or libwcs.5.16.dylib with or without the symlink
#      required to make it visible to the linker (controlled by the SHRLN
#      variable).  On Macs it is deliberately not created because its very
#      existence precludes static linking with the cctools linker.  You can
#      still link dynamically by using -lwcs.5.16.
#
#   4) PGPLOT is Tim Pearson's Fortran graphics library with separate C
#      interface available from astro.caltech.edu.  It is only required by
#      one utility, wcsgrid, and the test programs that plot test grids
#      (tprj2, tcel1, tcel2, tspc, ttab2, ttab3, twcsmix, and tpih2).  You can
#      skip these by setting PGPLOTLIB to blank.
#
#      It is difficult for configure to deduce what auxiliary graphics
#      libraries may be needed for PGPLOT since it depends on which of many
#      possible graphics drivers were selected when PGPLOT was installed.
#      Therefore it is quite likely that you will need to add additional
#      libraries to PGPLOTLIB.
#
#   5) CFITSIO is Bill Pence's FITS I/O library written in C with Fortran
#      wrappers, available from http://heasarc.gsfc.nasa.gov/fitsio.
#
#      CFITSIO is required by three utilities, HPXcvt, wcsgrid, and wcsware,
#      and also by the test programs twcstab and twcshdr.  wcsware and the
#      test programs use fits_read_wcstab() which is implemented by
#      getwcstab.c.  However, this implementation is included in CFITSIO post
#      3.004beta, so getwcstab.c is required here only for older releases
#      (controlled by variable GETWCSTAB).  getwcstab.o itself is not inserted
#      into the WCSLIB object library.
#
#      If available, CFITSIO is also optionally used for test programs
#      tfitshdr, tbth1, tpih1 and tpih2 by setting preprocessor macro
#      -DDO_CFITSIO.
#
# Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
# http://www.atnf.csiro.au/people/Mark.Calabretta
# $Id: makedefs.in,v 5.16 2017/01/15 04:25:03 mcalabre Exp $
#-----------------------------------------------------------------------------
# Version.
  LIBVER    := @LIBVER@
  WCSLIBPKG := wcslib-@PACKAGE_VERSION@

# System architecture.
  ARCH     := @ARCH@

# Flex and options.
  FLEX     := @FLEX@
  FLFLAGS  :=

# C preprocessor and options.
  CPP      := @CPP@
  CPPFLAGS := @CPPFLAGS@ @DEFS@
  WCSTRIG  := WRAPPER

# C compiler and options.
  CC       := @CC@
  CFLAGS   := @CFLAGS@

# Fortran compiler and options.
  FC       := @F77@
  FFLAGS   := @FFLAGS@

# Static object library.
  WCSLIB   := libwcs-$(LIBVER).a
  RANLIB   := @RANLIB@

# Shared (dynamic) library (see note 3 above).
  SHRLIB   := @SHRLIB@
  SONAME   := @SONAME@
  SHRFLAGS := @SHRFLAGS@
  SHRLD    := @SHRLD@
  SHRLN    := @SHRLN@

# What subdirectories to build.
  SUBDIRS  := @SUBDIRS@
  TSTDIRS  := @TSTDIRS@

# Top of the 'make install' hierarchy: pgsbox -> Fortran -> C.
  INSTDIR  := @INSTDIR@

# Installation utilities and locations.
  LN_S     := @LN_S@
  INSTALL  := @INSTALL@

  # Needed for the definitions provided by autoconf.
  prefix          := @prefix@
  exec_prefix     := @exec_prefix@
  datarootdir     := @datarootdir@
  PACKAGE_TARNAME := @PACKAGE_TARNAME@
  docdir          := @docdir@

  LIBDIR   := $(DESTDIR)@libdir@
  BINDIR   := $(DESTDIR)@bindir@
  INCDIR   := $(DESTDIR)@includedir@/wcslib-$(LIBVER)
  INCLINK  := $(DESTDIR)@includedir@/wcslib
  DOCDIR   := $(DESTDIR)@docdir@
  DOCLINK  := $(dir $(DESTDIR)@docdir@)wcslib
  HTMLDIR  := $(DESTDIR)@htmldir@
  PDFDIR   := $(DESTDIR)@pdfdir@
  MANDIR   := $(DESTDIR)@mandir@

# For putting timestamps in the build log.
  TIMER    := date +"%a %Y/%m/%d %X %z, executing on $$HOST"


# The remaining options are for building utilities and test programs.
# -------------------------------------------------------------------
# Linker options (use CC for linking).
  LD       = $(CC)
  LDFLAGS := @LDFLAGS@

# PGPLOT (see note 4 above).
  PGPLOTINC := @PGPLOTINC@
  PGPLOTLIB := @PGPLOTLIB@
  CPGPLOTLIB := @CPGPLOTLIB@

# CFITSIO (see note 5 above).
  CFITSIOINC := @CFITSIOINC@
  CFITSIOLIB := @CFITSIOLIB@
  GETWCSTAB  := @GETWCSTAB@

# Libraries required by the above Fortran compiler.
  FLIBS := @FLIBS@

# Libraries required by WCSLIB itself.
  LIBS := @LIBS@


#-----------------------------------------------------------------------------
# You shouldn't need to change anything below here.
#-----------------------------------------------------------------------------

SHELL := /bin/sh
VPATH := ..

# Common targets.
.PHONY : all build printenv show

all : show build

# Print the environment as seen by makefile rules.
printenv :
	-@ printenv | sort

# Print variable definitions.
show :: wcsconfig.h
	-@ echo ''
	-@ uname -a
	-@ echo ''
	-@ $(MAKE) --version | head -1
	-@ echo '  MAKEFLAGS   := $(MAKEFLAGS)'
	-@ echo ''
	-@ echo 'For building and installing $(WCSLIBPKG)...'
	-@ echo '  ARCH        := $(ARCH)'
	-@ echo '  FLEX        := $(FLEX)'
	-@ echo '  FLFLAGS     := $(FLFLAGS)'
	-@ echo '  CPP         := $(CPP)'
	-@ echo '  CPPFLAGS    := $(CPPFLAGS)'
	-@ echo '  WCSTRIG     := $(WCSTRIG)'
	-@ echo '  CC          := $(CC)'
	-@ echo '  CFLAGS      := $(CFLAGS)'
	-@ echo '  FC          := $(FC)'
	-@ echo '  FFLAGS      := $(FFLAGS)'
	-@ echo '  WCSLIB      := $(WCSLIB)'
	-@ echo '  RANLIB      := $(RANLIB)'
	-@ echo '  SHRLIB      := $(SHRLIB)'
	-@ echo '  SONAME      := $(SONAME)'
	-@ echo '  SHRFLAGS    := $(SHRFLAGS)'
	-@ echo '  SHRLD       := $(SHRLD)'
	-@ echo '  SHRLN       := $(SHRLN)'
	-@ echo '  LN_S        := $(LN_S)'
	-@ echo '  INSTALL     := $(INSTALL)'
	-@ echo '  LIBDIR      := $(LIBDIR)'
	-@ echo '  BINDIR      := $(BINDIR)'
	-@ echo '  INCDIR      := $(INCDIR)'
	-@ echo '  INCLINK     := $(INCLINK)'
	-@ echo '  DOCDIR      := $(DOCDIR)'
	-@ echo '  DOCLINK     := $(DOCLINK)'
	-@ echo '  HTMLDIR     := $(HTMLDIR)'
	-@ echo '  PDFDIR      := $(PDFDIR)'
	-@ echo '  MANDIR      := $(MANDIR)'
	-@ echo '  TIMER       := $(TIMER)'
	-@ echo ''
	-@ echo 'Important wcsconfig.h defines...'
	-@ echo "  `grep HAVE_SINCOS $<`"
	-@ echo "  `grep WCSLIB_INT64 $<`"
	-@ echo ''
	-@ echo 'To build utilities and test programs...'
	-@ echo '  LD          := $(LD)'
	-@ echo '  LDFLAGS     := $(LDFLAGS)'
	-@ echo '  PGPLOTINC   := $(PGPLOTINC)'
	-@ echo '  PGPLOTLIB   := $(PGPLOTLIB)'
	-@ echo '  CPGPLOTLIB  := $(CPGPLOTLIB)'
	-@ echo '  CFITSIOINC  := $(CFITSIOINC)'
	-@ echo '  CFITSIOLIB  := $(CFITSIOLIB)'
	-@ echo '  GETWCSTAB   := $(GETWCSTAB)'
	-@ echo '  FLIBS       := $(FLIBS)'
	-@ echo '  LIBS        := $(LIBS)'
	-@ echo ''

# Code development overrides, for use in the code subdirectories.
-include ../flavours