forked from Starlink/cfitsio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
204 lines (158 loc) · 6.21 KB
/
Makefile.in
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
#
# Makefile for cfitsio library:
#
# Oct-96 : original version by
#
# JDD/WDP
# NASA GSFC
# Oct 1996
#
# 28-Jul-05 : (norman@astro.gla.ac.uk) re-added conditional drvrsmem.c
# (in @OPTIONAL_OBJECTS@), since some ranlibs (eg, OSX) object
# to an object file containing no exported symbols.
# 25-Jan-01 : removed conditional drvrsmem.c compilation because this
# is now handled within the source file itself.
# 09-Mar-98 : modified to conditionally compile drvrsmem.c. Also
# changes to target all (deleted clean), added DEFS, LIBS, added
# DEFS to .c.o, added SOURCES_SHMEM and MY_SHMEM, expanded getcol*
# and putcol* in SOURCES, modified OBJECTS, mv changed to /bin/mv
# (to bypass aliasing), cp changed to /bin/cp, add smem and
# testprog targets. See also changes and comments in configure.in
# Default library name:
PACKAGE = cfitsio
# CFITSIO version numbers:
CFITSIO_MAJOR = @CFITSIO_MAJOR@
CFITSIO_MINOR = @CFITSIO_MINOR@
CFITSIO_MICRO = @CFITSIO_MICRO@
CFITSIO_SONAME = @CFITSIO_SONAME@
prefix = @prefix@
exec_prefix = @exec_prefix@
CFITSIO_BIN = ${DESTDIR}@bindir@
CFITSIO_LIB = ${DESTDIR}@libdir@
CFITSIO_INCLUDE = ${DESTDIR}@includedir@
INSTALL_DIRS = ${DESTDIR}@INSTALL_ROOT@ ${CFITSIO_INCLUDE} ${CFITSIO_LIB} ${CFITSIO_LIB}/pkgconfig
SHELL = /bin/sh
ARCHIVE = @ARCHIVE@
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
SSE_FLAGS = @SSE_FLAGS@
FC = @FC@
LDFLAGS = @LDFLAGS@
LDFLAGS_BIN = @LDFLAGS_BIN@
DEFS = @DEFS@
LIBS = @LIBS@
LIBS_CURL = @LIBS_CURL@
FLEX = flex
BISON = bison
SHLIB_LD = @SHLIB_LD@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
CFITSIO_SHLIB = @CFITSIO_SHLIB@
CFITSIO_SHLIB_SONAME = @CFITSIO_SHLIB_SONAME@
CORE_SOURCES = buffers.c cfileio.c checksum.c drvrfile.c drvrmem.c \
drvrnet.c editcol.c edithdu.c eval_l.c \
eval_y.c eval_f.c fitscore.c getcol.c getcolb.c getcold.c getcole.c \
getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c \
getcoluk.c getcolui.c getcoluj.c getkey.c group.c grparser.c \
histo.c iraffits.c \
modkey.c putcol.c putcolb.c putcold.c putcole.c putcoli.c \
putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \
putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \
swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \
pliocomp.c fits_hcompress.c fits_hdecompress.c \
simplerng.c @GSIFTP_SRC@
# drvrsmem.o may get built here
OPTIONAL_OBJECTS = @OPTIONAL_OBJECTS@
ZLIB_SOURCES = zcompress.c zuncompress.c
SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@
OBJECTS = ${SOURCES:.c=.o} ${OPTIONAL_OBJECTS}
CORE_OBJECTS = ${CORE_SOURCES:.c=.o} ${ZLIB_SOURCES:.c=.o}
FITSIO_SRC = f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c
# ============ description of all targets =============
# - <<-- ignore error code
all:
@if [ "x${FC}" = x ]; then \
${MAKE} all-nofitsio; \
else \
${MAKE} stand_alone; \
fi
all-nofitsio:
${MAKE} stand_alone "FITSIO_SRC="
stand_alone: lib${PACKAGE}.a shared
lib${PACKAGE}.a: ${OBJECTS}
${ARCHIVE} $@ ${OBJECTS}; \
${RANLIB} $@;
shared: lib${PACKAGE}${SHLIB_SUFFIX}
lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS}
${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS}
@if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \
ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \
ln -sf ${CFITSIO_SHLIB_SONAME} $@; \
fi
install: lib${PACKAGE}.a ${INSTALL_DIRS}
@for lib in lib${PACKAGE}.a lib${PACKAGE}${SHLIB_SUFFIX} \
${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; do \
if [ -f $$lib ]; then \
echo "/bin/rm -f ${CFITSIO_LIB}/$$lib"; \
/bin/rm -f ${CFITSIO_LIB}/$$lib; \
echo "/bin/cp -a $$lib ${CFITSIO_LIB}"; \
/bin/cp -a $$lib ${CFITSIO_LIB}; \
fi; \
done
/bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}
/bin/cp cfitsio.pc ${CFITSIO_LIB}/pkgconfig
@for task in ${FPACK_UTILS} ${UTILS}; do \
if [ -f $$task ]; then \
if [ ! -d ${CFITSIO_BIN} ]; then mkdir -p ${CFITSIO_BIN}; fi; \
echo "/bin/cp $$task ${CFITSIO_BIN}"; \
/bin/cp $$task ${CFITSIO_BIN}; \
fi; \
done
.c.o:
${CC} -c -o ${<D}/${@F} ${CFLAGS} ${CPPFLAGS} ${DEFS} $<
UTILS = cookbook fitscopy imcopy smem speed testprog
FPACK_UTILS = fpack funpack
# Optional build target:
utils: ${FPACK_UTILS} ${UTILS}
swapproc.o: swapproc.c
${CC} -c ${CFLAGS} ${CPPFLAGS} ${SSE_FLAGS} ${DEFS} $<
smem: smem.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm
testprog: testprog.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
fpack: fpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
funpack: funpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
fitscopy: fitscopy.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
speed: speed.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
imcopy: imcopy.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
cookbook: cookbook.o lib${PACKAGE}.a ${OBJECTS}
${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
testf77: testf77.o lib${PACKAGE}.a ${OBJECTS}
${FC} ${LDFLAGS_BIN} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
# Tested with bison 3.8 and flex 2.6.4
eval: # Rebuild eval_* files from flex/bison source
${FLEX} -o eval_l.c eval.l
${BISON} -o eval_y.c --header=eval_tab.h eval.y
clean:
- /bin/rm -rf *.o zlib/*.o *.dSYM lib${PACKAGE}* y.output so_locations \
${UTILS} ${FPACK_UTILS} testprog.fit testf77
distclean: clean
- /bin/rm -f Makefile cfitsio.pc config.log config.status configure.lineno
# Make target which outputs the list of the .o contained in the cfitsio lib
# usefull to build a single big shared library containing Tcl/Tk and other
# extensions. used for the Tcl Plugin.
cfitsioLibObjs:
@echo ${CORE_OBJECTS}
cfitsioLibSrcs:
@echo ${SOURCES}
# This target actually builds the objects needed for the lib in the above
# case
objs: ${CORE_OBJECTS}
${INSTALL_DIRS}:
@if [ ! -d $@ ]; then mkdir -p $@; fi