GithubHelp home page GithubHelp logo

cek / ccfits Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.73 MB

CCfits for FITS Photoshop Plugin

License: Other

C++ 61.91% CMake 0.24% Makefile 4.46% Shell 28.13% M4 2.77% Perl 0.32% CSS 1.87% JavaScript 0.22% Raku 0.08%

ccfits's Introduction

To build and install CCfits from source code on a UNIX-like (e.g. UNIX,
Linux, or Cygwin) platform, take the following steps.  For building on
a Microsoft Windows platform with Visual Developer Studio, see below.

===============================================================================
Instructions for Building CCfits on UNIX-like platforms:
===============================================================================

1. Configure
   
   The configure script will create the Makefile with the path to the
   compiler you choose (or GCC by default), and the path to the CFITSIO
   package. To see all options available with configure, type

   > ./configure --help

   1.a. Compiler Choice
 
   By default, the GCC compiler and linker will be used.  If you want to
   compile and link with a different compiler and linker, you can set
   some environment variables before running the configure script.  For
   example, to use a specific Macports C++ compiler, do the following:

   > setenv CXX /opt/local/bin/g++-mp-10  (csh syntax)

   or

   > export CXX=/opt/local/bin/g++-mp-10  (bash syntax)
   
   See also the compiler tips for installing HEASoft:
   
     https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/
   
   1.b. CFITSIO Location
   
   CCfits requires that the CFITSIO package is available on your system.  See

      http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html

   for more information.  The configure script that you will run takes an
   option to specify the location of the CFITSIO package.

   If the CFITSIO package is installed in a directory consisting of a
   'lib' subdirectory containing "libcfitsio.a" or "libcfitsio.so" and
   an 'include' subdirectory containing "fitsio.h", then you can run the
   configure script with a single option.  For example, if the cfitsio
   package is installed in this fashion in /usr/local/cfitsio/, then the
   configure script option will be

   --with-cfitsio=/usr/local/cfitsio

   If the CFITSIO package is not installed in the above manner, then you
   need to run the configure script with two options: one to specify the
   include directory and the other to specify the library directory.  For
   example, if the cfitsio package was built in /home/user/cfitsio/ then
   the two options will be

   --with-cfitsio-include=/home/user/cfitsio 
   --with-cfitsio-libdir=/home/user/cfitsio

   For users of HEASoft (instead of stand-alone CFITSIO):
   You can configure CCfits, after initializing HEASoft, using 
   
   --with-cfitsio=$HEADAS

   1.c. Build Location
   
   You have the option of carrying out the build in a separate directory
   from the source directory or in the same directory as the source.  In
   either case, you need to run the configure script in the directory
   where the build will occur.   For example, if building in the source
   directory, with the cfitsio directory in /usr/local/cfitsio/, then the
   configure command should be issued like this:

   > ./configure --with-cfitsio=/usr/local/cfitsio

   If you do the build in a separate directory from the source, you may
   need to issue the configure command something like this:

   > ../CCfits/configure --with-cfitsio=/usr/local/cfitsio
   
   1.d. Install Location
   
   If you would like to install the CCfits files in a separate location, you 
   can do that during the "make install" command (DESTDIR, described below), 
   or you can specify the location during configure.  For example, if you 
   would like the CCfits files installed in /usr/local/CCfits, you would run
   the configure command like this:
   
   > ./configure --prefix=/usr/local/CCfits


2. Build

   Building the C++ shared library will be done automatically by running make 
   (or gmake if you prefer the GNU make) without arguments like this:

   > gmake


3. Install

   To install, type:

   > make install

   The default install location will be /usr/local/lib for the library
   and /usr/local/include for the header files.  If you do not have permission to 
   write to these locations, you will need to specify another install location.
   You can change this with the --prefix option when you configure, 
   or with the DESTDIR variable when installing. The DESTDIR option 
   will create a /usr/local/ path in that specified location. 
   
   Note that you will also need to update your LD_LIBRARY_PATH:
   
   > export LD_LIBRARY_PATH="/usr/local/CCfits/usr/local/lib/:$LD_LIBRARY_PATH"

   > make DESTDIR=/usr/local/CCfits install


===============================================================================
Instructions for Microsft Windows build:
===============================================================================

These instructions follow similar steps to the building of the CFITSIO
library on Windows, described at

http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/README.win

and rely having the following already installed on your system:

a) Microsoft Visual Studio
b) The CMake build system available from http://www.cmake.org
c) The CFITSIO library available from

http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html

1. After unzipping and untarring the CCfits source code tarball, the source
   code will appear in a new \CCfits subdirectory.

2. Open the Visual Studio Developer Command Prompt window and create a
   directory named "CCfits.build" parallel to this CCfits source code directory.

      mkdir CCfits.build
      cd CCfits.build
   
   This will be the directory from which CMake generate its files and performs 
   the build.

3. Decide which CMake generator you will want to use.  The full list is
   shown by doing

      cmake.exe /?
   
   We've done successful builds using Visual Studio's 'nmake' utility, and so
   recommend choosing "NMake Makefiles" as the generator option.  However if
   you wish to perform the build inside a Visual Studio IDE, you should choose
   the appropriate "Visual Studio <version>" generator.

4.  Now run cmake.exe to generate the necessary Makefiles.  With this
    command you must specify the path to your CFITSIO library and header
    files by setting the '-DCMAKE_PREFIX_PATH' option.  This path should
    be set to the root directory of your CFITSIO installation, from which
    it will look in \lib and \include subdirectories for the library and
    header files respectively.  Your full cmake command may then look like:
    
    CCfits.build>cmake.exe -G"NMake Makefiles" -DCMAKE_PREFIX_PATH=C:\path\to\your\CFITSIO ..\CCfits
    
    If you wish to eventually install CCfits at any place other than the
    default location ("C:\Program Files"), you should pass an additional
    flag to the cmake command above:
    
    -DCMAKE_INSTALL_PREFIX=C:\path\to\your\CCfits\installation
    
5.  Build and install CCfits:

    CCfits.build> nmake

    If all goes well you should now have a CCfits.lib library and
    cookbook.exe executable in your CCfits.build directory.  To test
    the build you can run cookbook.exe, which should generate 3 output
    FITS files: atestfil, btestfil, and ctestfil.fit.
    
    Now install CCfits.lib and its header files into the default
    installation location, or the directory you specified in step 4:
    
    CCfits.build> nmake install
    

===============================================================================

Author: Paul Kunz
Revised 1 Nov 2006 by Bryan Irby
Revised Jan 2016 by Craig Gordon
Revised May 2021 by Kristin Rutkowski

ccfits's People

Contributors

cek avatar cek-nv avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.