"Fossies" - the Fresh Open Source Software Archive

Member "cfitsio-4.0.0/Makefile.in" (20 May 2021, 6109 Bytes) of package /linux/misc/cfitsio-4.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # Makefile for cfitsio library:
    3 #
    4 # Oct-96 : original version by 
    5 #
    6 #       JDD/WDP
    7 #       NASA GSFC
    8 #       Oct 1996
    9 #
   10 # 25-Jan-01 : removed conditional drvrsmem.c compilation because this
   11 #             is now handled within the source file itself.
   12 # 09-Mar-98 : modified to conditionally compile drvrsmem.c. Also
   13 # changes to target all (deleted clean), added DEFS, LIBS, added
   14 # DEFS to .c.o, added SOURCES_SHMEM and MY_SHMEM, expanded getcol*
   15 # and putcol* in SOURCES, modified OBJECTS, mv changed to /bin/mv
   16 # (to bypass aliasing), cp changed to /bin/cp, add smem and
   17 # testprog targets. See also changes and comments in configure.in
   18 
   19 
   20 # Default library name:
   21 PACKAGE		= cfitsio
   22 
   23 # CFITSIO version numbers:
   24 CFITSIO_MAJOR   = @CFITSIO_MAJOR@
   25 CFITSIO_MINOR	= @CFITSIO_MINOR@
   26 CFITSIO_MICRO   = @CFITSIO_MICRO@
   27 CFITSIO_SONAME	= @CFITSIO_SONAME@
   28 
   29 prefix		= @prefix@
   30 exec_prefix	= @exec_prefix@
   31 CFITSIO_BIN	= ${DESTDIR}@bindir@
   32 CFITSIO_LIB	= ${DESTDIR}@libdir@
   33 CFITSIO_INCLUDE	= ${DESTDIR}@includedir@
   34 INSTALL_DIRS	= ${DESTDIR}@INSTALL_ROOT@ ${CFITSIO_INCLUDE} ${CFITSIO_LIB} ${CFITSIO_LIB}/pkgconfig
   35 
   36 
   37 SHELL =		/bin/sh
   38 ARCHIVE =	@ARCHIVE@
   39 RANLIB =	@RANLIB@
   40 CC =		@CC@
   41 CFLAGS =	@CFLAGS@
   42 CPPFLAGS =	@CPPFLAGS@
   43 SSE_FLAGS =	@SSE_FLAGS@
   44 FC =		@FC@
   45 LDFLAGS =	@LDFLAGS@
   46 LDFLAGS_BIN =	@LDFLAGS_BIN@
   47 DEFS =		@DEFS@
   48 LIBS =		@LIBS@
   49 LIBS_CURL =	@LIBS_CURL@
   50 FLEX =		flex
   51 BISON =		bison
   52 
   53 SHLIB_LD =	@SHLIB_LD@
   54 SHLIB_SUFFIX =	@SHLIB_SUFFIX@
   55 CFITSIO_SHLIB =	@CFITSIO_SHLIB@
   56 CFITSIO_SHLIB_SONAME = @CFITSIO_SHLIB_SONAME@
   57 
   58 
   59 CORE_SOURCES = 	buffers.c cfileio.c checksum.c drvrfile.c drvrmem.c \
   60 		drvrnet.c drvrsmem.c editcol.c edithdu.c eval_l.c \
   61 		eval_y.c eval_f.c fitscore.c getcol.c getcolb.c getcold.c getcole.c \
   62 		getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c \
   63 		getcoluk.c getcolui.c getcoluj.c getkey.c group.c grparser.c \
   64 		histo.c iraffits.c \
   65 		modkey.c putcol.c putcolb.c putcold.c putcole.c putcoli.c \
   66 		putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \
   67 		putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \
   68 		swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \
   69 		pliocomp.c fits_hcompress.c fits_hdecompress.c \
   70 		simplerng.c @GSIFTP_SRC@
   71 
   72 ZLIB_SOURCES =	zcompress.c zuncompress.c
   73 
   74 SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@
   75 
   76 OBJECTS = 	${SOURCES:.c=.o}
   77 
   78 CORE_OBJECTS = 	${CORE_SOURCES:.c=.o} ${ZLIB_SOURCES:.c=.o}
   79 
   80 
   81 FITSIO_SRC =	f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c
   82 
   83 # ============ description of all targets =============
   84 #       -  <<-- ignore error code
   85 
   86 all:
   87 		@if [ "x${FC}" = x ]; then \
   88 			${MAKE} all-nofitsio; \
   89 		else \
   90 			${MAKE} stand_alone; \
   91 		fi
   92 
   93 all-nofitsio:
   94 		${MAKE} stand_alone "FITSIO_SRC="
   95 
   96 stand_alone:	lib${PACKAGE}.a shared
   97 
   98 lib${PACKAGE}.a:	${OBJECTS}
   99 		${ARCHIVE} $@ ${OBJECTS}; \
  100 		${RANLIB} $@;
  101 
  102 shared: lib${PACKAGE}${SHLIB_SUFFIX}
  103 
  104 lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS}
  105 		${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS}
  106 		@if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \
  107 			ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \
  108 			ln -sf ${CFITSIO_SHLIB_SONAME} $@; \
  109 		fi
  110 
  111 install:	lib${PACKAGE}.a ${INSTALL_DIRS}
  112 		@for lib in lib${PACKAGE}.a lib${PACKAGE}${SHLIB_SUFFIX} \
  113 				${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; do \
  114 		    if [ -f $$lib ]; then \
  115 			echo "/bin/cp -a $$lib ${CFITSIO_LIB}"; \
  116 			/bin/cp -a $$lib ${CFITSIO_LIB}; \
  117 		    fi; \
  118 		done
  119 		/bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}
  120 		/bin/cp cfitsio.pc ${CFITSIO_LIB}/pkgconfig
  121 		@for task in ${FPACK_UTILS} ${UTILS}; do \
  122 		    if [ -f $$task ]; then \
  123 			if [ ! -d ${CFITSIO_BIN} ]; then mkdir -p ${CFITSIO_BIN}; fi; \
  124 			echo "/bin/cp $$task ${CFITSIO_BIN}"; \
  125 			/bin/cp $$task ${CFITSIO_BIN}; \
  126 		    fi; \
  127 		done
  128 
  129 .c.o:
  130 		${CC} -c -o ${<D}/${@F} ${CFLAGS} ${CPPFLAGS} ${DEFS} $<
  131 
  132 UTILS		= cookbook fitscopy imcopy smem speed testprog
  133 
  134 FPACK_UTILS	= fpack funpack
  135 
  136 # Optional build target:
  137 utils:		${FPACK_UTILS} ${UTILS}
  138 
  139 swapproc.o:	swapproc.c
  140 		${CC} -c ${CFLAGS} ${CPPFLAGS} ${SSE_FLAGS} ${DEFS} $<
  141 
  142 smem:		smem.o lib${PACKAGE}.a ${OBJECTS}
  143 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm
  144 
  145 testprog:	testprog.o lib${PACKAGE}.a ${OBJECTS}
  146 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
  147 
  148 fpack:		fpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
  149 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
  150 
  151 funpack:	funpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
  152 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
  153 
  154 fitscopy:	fitscopy.o lib${PACKAGE}.a ${OBJECTS}
  155 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
  156 
  157 speed:		speed.o lib${PACKAGE}.a ${OBJECTS}
  158 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
  159 
  160 imcopy:		imcopy.o lib${PACKAGE}.a ${OBJECTS}
  161 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
  162 
  163 cookbook:	cookbook.o lib${PACKAGE}.a ${OBJECTS}
  164 		${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
  165 
  166 eval:		# Rebuild eval_* files from flex/bison source
  167 		${FLEX} -t eval.l > eval_l.c1
  168 		# Note workaround for yyfree=fffree conflict
  169 		/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' eval_l.c1 -e 's/fffree/yyfffree/g' > eval_l.c
  170 		/bin/rm -f eval_l.c1
  171 		${BISON} -d -v -y eval.y
  172 		/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.c > eval_y.c
  173 		/bin/sed -e 's/yy/ff/g' -e 's/YY/FF/g' y.tab.h > eval_tab.h
  174 		/bin/rm -f y.tab.c y.tab.h
  175 
  176 clean:
  177 	-	/bin/rm -rf *.o zlib/*.o *.dSYM lib${PACKAGE}* y.output so_locations \
  178 		${UTILS} ${FPACK_UTILS} testprog.fit
  179 
  180 distclean:	clean
  181 	-	/bin/rm -f Makefile cfitsio.pc config.log config.status configure.lineno
  182 
  183 # Make target which outputs the list of the .o contained in the cfitsio lib
  184 # usefull to build a single big shared library containing Tcl/Tk and other
  185 # extensions.  used for the Tcl Plugin. 
  186 
  187 cfitsioLibObjs:
  188 	@echo ${CORE_OBJECTS}
  189 
  190 cfitsioLibSrcs:
  191 	@echo ${SOURCES}
  192 
  193 # This target actually builds the objects needed for the lib in the above
  194 # case
  195 objs: ${CORE_OBJECTS}
  196 
  197 ${INSTALL_DIRS}:
  198 	@if [ ! -d $@ ]; then mkdir -p $@; fi