summaryrefslogtreecommitdiffstats
path: root/funtools/fitsy/Makefile.in
blob: 550477823646f4d3cfadd38206f1c2b9eeac0c6d (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
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
# Makefile for library files used by GNU text utilities.
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.

# 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; either version 2, or (at your option)
# any later version.

# 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.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

SHELL = /bin/sh

srcdir = @srcdir@
VPATH = @srcdir@

# 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, .so, and .o files:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib

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

# Directory in which to install the include files:
INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include

# 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 = 		./install-sh -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA =		${INSTALL} -m 644

CC = @CC@
#CC = gcc -fPIC -Wall -Wno-comment
#CC = gcc -fbounds-checking -DBOUNDS_CHECKING
AR = ar
RANLIB = @RANLIB@
#DEFS = -DCONFIG_BROKETS @DEFS@
DEFS = @DEFS@
#CFLAGS = -g
# CFLAGS = @CFLAGS@
#CFLAGS = -ansi -pedantic -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Werror
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
YACC = @YACC@

# extra libs
EXTRA_LIBS	= @EXTRA_LIBS@

# extra objs (usually set to $ZOBJS)
EXTRA_OBJS	= @EXTRA_OBJS@

# the full set of libraries for linking
LIBS	= $(EXTRA_LIBS)

OBJECTS=cardpar.o	\
	cardfmt.o	\
	cardins.o	\
	cardfind.o	\
	headget.o	\
	headset.o	\
	headins.o	\
	headinit.o	\
	headdata.o	\
	headfind.o	\
	headfile.o	\
	headimage.o	\
	headtable.o	\
	headsimple.o	\
	headwcs.o	\
	inverse.o	\
	dataimage.o	\
	fitshead.o	\
	fitsimage.o	\
	ftacht.o	\
	ftacht2.o	\
	nd.o		\
	tableheader.o	\
	$(EXTRA_OBJS)

# comment this out to use default defintions for stand-alone compile
XFILE =	-DUSE_XFILEIO=1  -I../util

INCL =	$(XFILE) -I$(srcdir)

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

all:	$(LIB)

progs:	$(PROGS)

All:	$(LIB) $(PROGS)

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) $<

$(LIB):	$(OBJECTS)
	$(AR) cruv $@ $(OBJECTS)
	$(RANLIB) $@

objects:$(OBJECTS)

fitsy:	Force
	$(MAKE) clean
	$(MAKE) objects XFILE=""
	$(MAKE) libfitsy.a

libfitsy.a : Force
	$(AR) cruv $@ $(OBJECTS)
	$(RANLIB) $@


# these are the zlib routines:
adler32.o:	$(ZDIR)/adler32.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/adler32.c
compress.o:	$(ZDIR)/compress.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/compress.c
crc32.o:	$(ZDIR)/crc32.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/crc32.c
gzio.o:		$(ZDIR)/gzio.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/gzio.c
uncompr.o:	$(ZDIR)/uncompr.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/uncompr.c
deflate.o:	$(ZDIR)/deflate.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/deflate.c
trees.o:	$(ZDIR)/trees.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/trees.c
zutil.o:	$(ZDIR)/zutil.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/zutil.c
inflate.o:	$(ZDIR)/inflate.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/inflate.c
infblock.o:	$(ZDIR)/infblock.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/infblock.c
inftrees.o:	$(ZDIR)/inftrees.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/inftrees.c
infcodes.o:	$(ZDIR)/infcodes.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/infcodes.c
infutil.o:	$(ZDIR)/infutil.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/infutil.c
inffast.o:	$(ZDIR)/inffast.c
		$(CC) -I$(ZDIR) -c $(CPPFLAGS) $(DEFS) $(INCL) $(CFLAGS) \
		$(ZDIR)/inffast.c

install: install-binaries

install-binaries: $(LIB)
	@for i in $(LIB_INSTALL_DIR) $(INCLUDE_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 fitsy.h"
	@$(INSTALL_DATA) fitsy.h $(INCLUDE_INSTALL_DIR)/fitsy.h
	@echo "Installing xfile.h"
	@$(INSTALL_DATA) xfile.h $(INCLUDE_INSTALL_DIR)/xfile.h
#	@for i in $(PROGS) ; \
#	    do \
#		if [ -f $$i ] ; then \
#		    echo "Installing $$i" ; \
#		    $(INSTALL_PROGRAM) $$i $(BIN_INSTALL_DIR)/$$i ; \
#		fi; \
#	    done;

uninstall:

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

RM =	rm -f

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

mostlyclean: clean

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

realclean: distclean
	$(RM) TAGS