Commit 3d0c0bc2 authored by Alexander Lenz's avatar Alexander Lenz

FITS saving: Add FITS saving to build system.

parent 4c92ec40
......@@ -35,7 +35,7 @@ CORE_LDLIBS += -lcbf
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CORE_LDFLAGS += -L../usr/local/lib
CORE_LDFLAGS += -L../third-party/cfitsio/lib -L../third-party/CCfits/.libs
CORE_LDLIBS += -lCCfits -lcfitsio
endif
......
......@@ -31,6 +31,10 @@ INCLUDES = -I. -I../include -I../../common/include -I../../hardware/include \
-I../../third-party/Processlib/tasks/include \
-I../../third-party/Sps/Include
ifneq ($(LIBS),0)
LIBS=
endif
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
endif
......@@ -58,8 +62,12 @@ endif
ifneq ($(COMPILE_FITS_SAVING),0)
ct-objs += CtSaving_Fits.o
CXXFLAGS += -DWITH_FITS_SAVING -I/usr/local/include
CXXFLAGS += -DWITH_FITS_SAVING -I../../third-party/cfitsio \
-I../../third-party
#LIBS += -L../../third-party/CCfits/.libs \
-L../../third-party/cfitsio/libs \
-lcfitsio \
-lCCfits
endif
ifndef COMPILE_SPS_IMAGE
......
......@@ -50,6 +50,15 @@ ifneq ($(COMPILE_CBF_SAVING),0)
LDLIBS += -L../../third-party/CBFLib/lib -lcbf
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CXXFLAGS += -DWITH_FITS_SAVING -I../../third-party/cfitsio \
-I../../third-party
LDLIBS += -L../../third-party/CCfits/.libs \
-L../../third-party/cfitsio/lib \
-lcfitsio \
-lCCfits
endif
ifndef COMPILE_SIMULATOR
COMPILE_SIMULATOR = 0
endif
......
......@@ -46,6 +46,7 @@ INSTALL_INCLUDE_DIR = $(INSTALL_PLAT_DIR)/include
INSTALL_PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
INSTALL_CONFIG_DEFINES =
INSTALL_LIBADD =
INSTALL_DEPS = install.mkdir
ifneq ($(COMPILE_CORE), 0)
INSTALL_CORE_DIR = $(INSTALL_PLAT_DIR)/Core
......@@ -161,21 +162,35 @@ endif
ifneq ($(COMPILE_FITS_SAVING),0)
INSTALL_CONFIG_DEFINES += -DWITH_FITS_SAVING
#INSTALL_LIBADD += -lCCfits
INSTALL_DEPS = cfitsio.install CCfits.install
endif
##################
# INSTALL DEPS #
##################
.PHONY: install
PROCESSOR_TYPE := $(shell uname -i)
install:
install.mkdir:
mkdir -p $(INSTALL_LIMA_DIR)
cp python/__init__.py $(INSTALL_LIMA_DIR)
mkdir -p $(INSTALL_LIB_DIR)
mkdir -p $(INSTALL_INCLUDE_DIR)
mkdir -p $(INSTALL_PKG_CONFIG_DIR)
cfitsio.install:
cd third-party/cfitsio && ./configure --prefix=$(abspath $(INSTALL_DIR)) && $(MAKE) && $(MAKE) install
CCfits.install:
cd third-party/CCfits && ./configure --prefix=$(abspath $(INSTALL_DIR)) && $(MAKE) && $(MAKE) install
##################
# INSTALL TARGET #
##################
.PHONY: install
PROCESSOR_TYPE := $(shell uname -i)
install: $(INSTALL_DEPS)
sed -e "s,@prefix@,${INSTALL_DIR},g" \
-e "s,@libdir@,${INSTALL_LIB_DIR},g" \
-e "s,@libadd@,${INSTALL_LIBADD},g" \
......
......@@ -49,6 +49,28 @@ PROJECTS += sps.src
PROJECTS_CLEAN += sps.clean
endif
ifneq ($(COMPILE_FITS_SAVING),0)
ifeq ($(wildcard cfitsio/zutil.o),)
PROJECTS += cfitsio.confsrc
endif
PROJECTS += cfitsio.src
ifeq ($(wildcard CCfits/.libs/libCCfits.lai),)
PROJECTS += CCfits.confsrc
endif
PROJECTS += CCfits.src
ifneq ($(wildcard cfitsio/Makefile),)
PROJECTS_CLEAN += cfitsio.clean
endif
ifneq ($(wildcard CCfits/Makefile),)
PROJECTS_CLEAN += CCfits.clean
endif
endif # COMPILE_FITS_SAVING
all: src test
src: $(PROJECTS)
......@@ -86,6 +108,30 @@ cbflib.src:
cbflib.clean:
$(MAKE) -C CBFLib/ -f $(CBFMAKEFILE) clean
cfitsio.confsrc:
cd cfitsio && ./configure
cfitsio.src:
cd cfitsio && $(MAKE) && $(MAKE) install
cfitsio.install:
cd cfitsio && ./configure --prefix=$(INSTALL_DIR) && $(MAKE) && $(MAKE) install
cfitsio.clean:
cd cfitsio && $(MAKE) clean
CCfits.confsrc:
cd CCfits && ./configure --with-cfitsio=`pwd`/../cfitsio
CCfits.src:
cd CCfits && $(MAKE)
cfitsio.install:
cd CCfits && ./configure --prefix=$(INSTALL_DIR) && $(MAKE) && $(MAKE) install
CCfits.clean:
cd CCfits && $(MAKE) clean
test:
@echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment