summaryrefslogtreecommitdiffstats
path: root/funtools/wcs/Makefile.in
blob: 53ed80aac24a94b45d5d483045b9844da2f117e0 (plain)
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
#
# This file is a Makefile for wcssubs.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#

PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@

DISTNAME = wcs-${VERSION}
DISTDIR = ../export/${DISTNAME}
FTPDIR	= ../ftp

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix =		@prefix@
exec_prefix =		@exec_prefix@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =

# Directory in which to install the .a or .so binary for the WCS library:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib

# Directory in which to install the program wish:
BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin

# Directory in which to install the include file wcs.h:
INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = 		@CFLAGS@

# To add ld switches, change the following line:
LDFLAGS =		@LDFLAGS@

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =			/bin/sh

# extra modules added by configure.in to fix OS bugs
EXTRA_OBJS = 		@EXTRA_OBJS@

# There are just too many different versions of "install" around;
# better to use the install-sh script that comes with the distribution,
# which is slower but guaranteed to work.

INSTALL = 		@srcdir@/install-sh -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA =		${INSTALL} -m 644

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

AC_FLAGS =		@DEFS@
RANLIB =		@RANLIB@

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

CC =		@CC@

CC_SWITCHES =	-I. ${CFLAGS} -DWCS_VERSION="\"$(VERSION)\"" ${AC_FLAGS}

DEPEND_SWITCHES = -I. ${CFLAGS} ${AC_FLAGS}

SRCS =  wcsinit.c wcs.c wcscon.c fitsfile.c imhfile.c fileutil.c \
	hget.c hput.c iget.c imio.c worldpos.c tnxpos.c dsspos.c platepos.c \
        wcslib.c lin.c cel.c proj.c sph.c wcstrig.c dateutil.c distort.c \
	zpxpos.c

OBJS =  wcsinit.o wcs.o wcscon.o fitsfile.o imhfile.o \
	hget.o hput.o iget.o imio.o worldpos.o platepos.o \
	tnxpos.o zpxpos.o dsspos.o poly.o \
        wcslib.o lin.o cel.o proj.o sph.o wcstrig.o dateutil.o distort.o

# these are all the modules going into the "normal" wcs library
LIBOBJS =	${OBJS}

# whether to build library at all
WHICHLIB =	@WHICHLIB@
EXTLIB =	@EXTLIB@

# the default library for this package
DEFLIB =	@DEFLIB@
# the actual library we are building (if this is a subpackage)
LIB =		@LIB@

PROGS =

TESTPROGS =

all:		$(WHICHLIB) $(PROGS)

testall:	$(TESTPROGS)

All:		all testall

install:	install-binaries

extlib:
		@echo "No build needed -- using external WCS library: $(EXTLIB)"

lib:		$(LIBOBJS)
		ar cruv $(LIB) $(LIBOBJS)
		$(RANLIB) $(LIB)

# Note: before running ranlib below, must cd to target directory because
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).

install-binaries: $(LIB) $(PROGS)
	@for i in $(LIB_INSTALL_DIR) $(INCLUDE_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@if [ "$(LIB)" = "$(DEFLIB)" ] ; then \
	    XLIB=`basename $(LIB)`; \
	    echo "Installing $$XLIB"; \
	    $(INSTALL_DATA) $$XLIB $(LIB_INSTALL_DIR)/$$XLIB; \
	    (cd $(LIB_INSTALL_DIR); $(RANLIB) $$XLIB); \
	    chmod 555 $(LIB_INSTALL_DIR)/$$XLIB; \
        fi;
	@echo "Installing fitshead.h"
	@$(INSTALL_DATA) fitshead.h $(INCLUDE_INSTALL_DIR)/fitshead.h
	@echo "Installing wcs.h"
	@$(INSTALL_DATA) wcs.h $(INCLUDE_INSTALL_DIR)/wcs.h
	@echo "Installing wcslib.h"
	@$(INSTALL_DATA) wcslib.h $(INCLUDE_INSTALL_DIR)/wcslib.h

Makefile:	Makefile.in
		$(SHELL) config.status

RM =		rm -f

clean:
		$(RM) *.a *.so *.o *.exe core errs *pure* .nfs* \
			foo* *~ *.log \#* TAGS *.E a.out errors \
			$(PROGS) $(TESTPROGS) \
			gmon.out *.pg *.bak \
			config.info config.log \
			doc/*~
		$(RM) -r autom4te.cache

distclean:	clean
		$(RM) Makefile config.status config.cache config.log

depend:
		makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)


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

cel.o:		wcslib.h
distort.o:	wcs.h fitshead.h wcslib.h
fitsfile.o:	fitsfile.h fitshead.h
hget.o:		fitshead.h
hput.o:		fitshead.h
iget.o:		fitshead.h
imhfile.o:	fitsfile.h fitshead.h
imio.o:		fitshead.h
lin.o:		wcslib.h
platepos.o:	wcs.h fitshead.h wcslib.h
proj.o:		wcslib.h
sph.o:		wcslib.h
tnxpos.o:	wcs.h fitshead.h wcslib.h
wcs.o:		wcs.h fitshead.h wcslib.h
wcsinit.o:	wcs.h fitshead.h wcslib.h
wcscon.o:	wcs.h fitshead.h wcslib.h
wcslib.o:	wcslib.h
wcstrig.o:	wcslib.h
worldpos.o:	wcs.h fitshead.h wcslib.h
dateutil.o:	fitsfile.h fitshead.h
fileutil.o:	fitsfile.h

# DO NOT DELETE THIS LINE -- make depend depends on it.