forked from esheldon/fitsio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
177 lines (136 loc) · 5.42 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
#
# Makefile for cfitsio library:
# libcfits.a
#
# Oct-96 : original version by
#
# JDD/WDP
# NASA GSFC
# Oct 1996
#
# 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
# CFITSIO version numbers:
CFITSIO_MAJOR = @CFITSIO_MAJOR@
CFITSIO_MINOR = @CFITSIO_MINOR@
CFITSIO_SONAME = @CFITSIO_SONAME@
prefix = @prefix@
exec_prefix = @exec_prefix@
DESTDIR =
CFITSIO_LIB = ${DESTDIR}@libdir@
CFITSIO_INCLUDE = ${DESTDIR}@includedir@
INSTALL_DIRS = @INSTALL_ROOT@ ${CFITSIO_INCLUDE} ${CFITSIO_LIB} ${CFITSIO_LIB}/pkgconfig
SHELL = /bin/sh
ARCHIVE = @ARCHIVE@
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
SSE_FLAGS = @SSE_FLAGS@
FC = @FC@
LDFLAGS = $(CFLAGS)
DEFS = @DEFS@
LIBS = @LIBS@
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 drvrsmem.c drvrgsiftp.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
ZLIB_SOURCES = zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c \
zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c \
zlib/uncompr.c zlib/zcompress.c zlib/zuncompress.c zlib/zutil.c
SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@
OBJECTS = ${SOURCES:.c=.o}
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: libcfitsio.a
libcfitsio.a: ${OBJECTS}
${ARCHIVE} libcfitsio.a ${OBJECTS}; \
${RANLIB} libcfitsio.a;
shared: libcfitsio${SHLIB_SUFFIX}
libcfitsio${SHLIB_SUFFIX}: ${OBJECTS}
${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS}
@if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \
ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \
ln -sf ${CFITSIO_SHLIB_SONAME} $@; \
fi
install: libcfitsio.a $(INSTALL_DIRS)
/bin/cp -a libcfitsio* ${CFITSIO_LIB}
/bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}
/bin/cp cfitsio.pc ${CFITSIO_LIB}/pkgconfig
.c.o:
$(CC) -c -o ${<D}/${@F} $(CFLAGS) $(DEFS) $<
swapproc.o: swapproc.c
$(CC) -c $(CFLAGS) $(SSE_FLAGS) $(DEFS) $<
smem: smem.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm
testprog: testprog.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o testprog testprog.o -L. -lcfitsio -lm ${LIBS}
fpack: fpack.o fpackutil.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o fpack fpack.o fpackutil.o libcfitsio.a -lm ${LIBS}
funpack: funpack.o fpackutil.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o funpack funpack.o fpackutil.o libcfitsio.a -lm ${LIBS}
fitscopy: fitscopy.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS}
speed: speed.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o speed speed.o -L. -lcfitsio -lm ${LIBS}
imcopy: imcopy.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o imcopy imcopy.o -L. -lcfitsio -lm ${LIBS}
listhead: listhead.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o listhead listhead.o -L. -lcfitsio -lm ${LIBS}
cookbook: cookbook.o libcfitsio.a ${OBJECTS}
${CC} $(CFLAGS) $(DEFS) -o cookbook cookbook.o -L. -lcfitsio -lm ${LIBS}
eval: # Rebuild eval_* files from flex/bison source
$(FLEX) -t eval.l > eval_l.c1
# Note workaround for yyfree=fffree conflict
/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' eval_l.c1 -e 's/fffree/yyfffree/g' > eval_l.c
/bin/rm -f eval_l.c1
$(BISON) -d -v -y eval.y
/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.c > eval_y.c
/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.h > eval_tab.h
/bin/rm -f y.tab.c y.tab.h
clean:
- /bin/rm -f *.o zlib/*.o libcfitsio* fpack funpack \
smem testprog y.output so_locations
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