commit fbe01d03cfdb21b125de724ce1acda069507e05c
parent a416ce077c2995122f6e92e9844ab06dfcb1b5d4
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 31 Oct 2023 09:02:09 +0100
Merge branch 'release_0.3'
Diffstat:
19 files changed, 393 insertions(+), 204 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,11 +1,10 @@
.gitignore
-CMakeCache.txt
-CMakeFiles
-Makefile
-tmp
[Bb]uild*
*.sw[po]
-*.[ao]
-*.orig
+*.[aod]
+*.so
*~
+.config
+.test
tags
+*.pc
diff --git a/Makefile b/Makefile
@@ -0,0 +1,131 @@
+# Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+# Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+# Copyright (C) 2018, 2019 Université Paul Sabatier
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+.POSIX:
+.SUFFIXES: # Clean up default inference rules
+
+include config.mk
+
+LIBNAME_STATIC = libhtsky.a
+LIBNAME_SHARED = libhtsky.so
+LIBNAME = $(LIBNAME_$(LIB_TYPE))
+
+################################################################################
+# Library building
+################################################################################
+SRC =\
+ src/htsky_atmosphere.c\
+ src/htsky.c\
+ src/htsky_cloud.c\
+ src/htsky_dump_cloud_vtk.c\
+ src/htsky_log.c\
+ src/htsky_svx.c
+OBJ = $(SRC:.c=.o)
+DEP = $(SRC:.c=.d)
+
+build_library: .config $(DEP)
+ @$(MAKE) -fMakefile $$(for i in $(DEP); do echo -f $${i}; done) \
+ $$(if [ -n "$(LIBNAME)" ]; then \
+ echo "$(LIBNAME)"; \
+ else \
+ echo "$(LIBNAME_SHARED)"; \
+ fi)
+
+$(DEP) $(OBJ): config.mk
+
+$(LIBNAME_SHARED): $(OBJ)
+ $(CC) $(CFLAGS) $(DPDC_CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(DPDC_LIBS)
+
+$(LIBNAME_STATIC): libhtsky.o
+ $(AR) -rc $@ $?
+ $(RANLIB) $@
+
+libhtsky.o: $(OBJ)
+ $(LD) -r $(OBJ) -o $@
+ $(OBJCOPY) $(OCPFLAGS) $@
+
+.config: config.mk
+ @if ! $(PKG_CONFIG) --atleast-version $(HTCP_VERSION) htcp; then \
+ echo "htcp $(HTCP_VERSION) not found" >&2; exit 1; fi
+ @if ! $(PKG_CONFIG) --atleast-version $(HTGOP_VERSION) htgop; then \
+ echo "htgop $(HTGOP_VERSION) not found" >&2; exit 1; fi
+ @if ! $(PKG_CONFIG) --atleast-version $(HTMIE_VERSION) htmie; then \
+ echo "htmie $(HTMIE_VERSION) not found" >&2; exit 1; fi
+ @if ! $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys; then \
+ echo "rsys $(RSYS_VERSION) not found" >&2; exit 1; fi
+ @if ! $(PKG_CONFIG) --atleast-version $(SVX_VERSION) svx; then \
+ echo "svx $(SVX_VERSION) not found" >&2; exit 1; fi
+ @echo "config done" > $@
+
+.SUFFIXES: .c .d .o
+.c.d:
+ @$(CC) $(CFLAGS) $(DPDC_CFLAGS) -MM -MT "$(@:.d=.o) $@" $< -MF $@
+
+.c.o:
+ $(CC) $(CFLAGS) $(DPDC_CFLAGS) -DHTSKY_SHARED_BUILD -c $< -o $@
+
+################################################################################
+# Installation
+################################################################################
+pkg:
+ sed -e 's#@PREFIX@#$(PREFIX)#g'\
+ -e 's#@VERSION@#$(VERSION)#g'\
+ -e 's#@HTCP_VERSION@#$(HTCP_VERSION)#g'\
+ -e 's#@HTGOP_VERSION@#$(HTGOP_VERSION)#g'\
+ -e 's#@HTMIE_VERSION@#$(HTMIE_VERSION)#g'\
+ -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
+ -e 's#@SVX_VERSION@#$(SVX_VERSION)#g'\
+ htsky.pc.in > htsky.pc
+
+htmie-local.pc: htmie.pc.in
+ sed -e '1d'\
+ -e 's#^includedir=.*#includedir=./src/#'\
+ -e 's#^libdir=.*#libdir=./#'\
+ -e 's#@VERSION@#$(VERSION)#g'\
+ -e 's#@HTCP_VERSION@#$(HTCP_VERSION)#g'\
+ -e 's#@HTGOP_VERSION@#$(HTGOP_VERSION)#g'\
+ -e 's#@HTMIE_VERSION@#$(HTMIE_VERSION)#g'\
+ -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
+ -e 's#@SVX_VERSION@#$(SVX_VERSION)#g'\
+ htsky.pc.in > $@
+
+install: build_library pkg
+ @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib" $(LIBNAME)
+ @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib/pkgconfig" htsky.pc
+ @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/include/high_tune" src/htsky.h
+ @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/htsky" COPYING README.md
+
+uninstall:
+ rm -f "$(DESTDIR)$(PREFIX)/lib/$(LIBNAME)"
+ rm -f "$(DESTDIR)$(PREFIX)/lib/pkgconfig/htsky.pc"
+ rm -f "$(DESTDIR)$(PREFIX)/share/doc/htsky/COPYING"
+ rm -f "$(DESTDIR)$(PREFIX)/share/doc/htsky/README.md"
+ rm -f "$(DESTDIR)$(PREFIX)/include/high_tune/htsky.h"
+
+################################################################################
+# Miscellaneous targets
+################################################################################
+all: build_library
+
+clean:
+ rm -f $(OBJ) $(LIBNAME) .config libhtsky.o htsky.pc
+
+distclean: clean
+ rm -f $(DEP)
+
+lint:
+ shellcheck -o all make.sh
diff --git a/README.md b/README.md
@@ -1,99 +1,84 @@
# High-Tune: Sky
-This library loads and manages data representing a clear/cloudy sky. The
-atmospheric gas mixture is loaded from a
-[HTGOP](https://gitlab.com/meso-star/htgop) file while cloud properties are
-loaded from data stored with respect to the
-[HTCP](https://gitlab.com/meso-star/htcp/) fileformat. The optical properties
-of the clouds are finally retrieved from a
-[HTMie](https://gitlab.com/meso-star/htmie/) file. Once provided, the clouds
-can be repeated infinitely into the X and Y dimension.
-
-HTSky relies onto the [Star-VX](https://gitlab.com/meso-star/star-vx) library
-to build space partitioning data structures upon raw sky data. These structures
-can then be used in conjunction of null-collision algorithms to accelerate the
-tracking of a ray into this inhomogeneous medium, as described in [Villefranque
-et al.
-(2019)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018MS001602).
-These accelerating structures are built with respect to an optical thickness
-criterion whose threshold is user defined. One can also fix the maximum
-resolution of the structures in order to constraint their memory consumption.
-Even though the building itself of the structures is quite efficient, computing
-their underlying data from the input files can be time consuming. So, once
-built, these structures can be stored into a file to drastically speed up the
-subsequent initialisation steps of the same sky. We point out that this file is
-valid as long as the provided HTGOP, HTCP and HTMie files are the ones used to
-build the cached structures. If not, an error is returned on sky creation.
-
-## How to build
-
-This library is compatible GNU/Linux 64-bits. It relies on the
-[CMake](http://www.cmake.org) and the
-[RCMake](https://gitlab.com/vaplv/rcmake/) packages to build.
-It also depends on the
-[HTCP](https://gitlab.com/meso-star/htcp/),
-[HTGOP](https://gitlab.com/meso-star/htgop/),
-[HTMie](https://gitlab.com/meso-star/htmie/),
-[RSys](https://gitlab.com/vaplv/rsys/) and
-[Star-VX](https://gitlab.com/meso-star/star-vx/) libraries, and on
-[OpenMP](http://www.openmp.org) 1.2 to parallelize its computations.
-
-First ensure that CMake is installed on your system. Then install the RCMake
-package as well as the aforementioned prerequisites. Finally generate the
-project from the `cmake/CMakeLists.txt` file by appending to the
-`CMAKE_PREFIX_PATH` variable the install directories of its dependencies. The
-resulting project can be edited, built, tested and installed as any CMake
-project. Refer to the [CMake documentation](https://cmake.org/documentation)
-for further informations on CMake.
+This C library loads and manages the data describing a vertically
+stratified atmosphere, neglecting Earth's sphericity. The physical
+properties of 3D clouds are also supported.
+
+## Requirements
+
+- C compiler with OpenMP support
+- POSIX make
+- pkg-config
+- [High-Tune: Cloud Properties](https://gitlab.com/meso-star/htcp)
+- [High-Tune: Gas Optical Properties](https://gitlab.com/meso-star/htgop)
+- [High-Tune: Mie](https://gitlab.com/meso-star/htmie)
+- [RSys](https://gitlab.com/vaplv/rsys)
+- [Star VoXel](https://gitlab.com/meso-star/star-vx)
+
+## Installation
+
+Edit config.mk as needed, then run:
+
+ make clean install
## Release notes
+### Version 0.3
+
+- Replace CMake by Makefile as build system.
+- Update compiler and linker flags to increase the security and
+ robustness of generated binaries.
+- Provide a pkg-config file to link the library as an external
+ dependency.
+
### Version 0.2.2
- Correction of compilation errors due to API breaks in Star-VoXel 0.2.
-- Correction invalid memory writes.
+- Correction of invalid memory writes.
### Version 0.2.1
- Fix the acceleration data structures: the Kmin and Kmax stored in the
- hierarchical trees could be wrong for cloud fields with data irregularly
- structured along the Z axis.
+ hierarchical trees could be wrong for cloud fields with data
+ irregularly structured along the Z axis.
### Version 0.2
-- Make uniform the sky setup in shortwave and in longwave. On sky creation, the
- caller now defines the type of the spectral data to handle (i.e. shortwave
- or longwave) and their wavelength range. The `double wlen_lw_range[2]` member
- variable of the `struct htsky_args` data structure is thus renamed in `double
- wlen_range[2]` and is used in both cases. Finally the new member variable
- `enum htsky_spectral_type spectral_type` defines the type of this spectral
+- Make uniform the sky setup in shortwave and in longwave. On sky
+ creation, the caller now defines the type of the spectral data to
+ handle (i.e. shortwave or longwave) and their wavelength range. The
+ `double wlen_lw_range[2]` member variable of the `struct htsky_args`
+ data structure is thus renamed in `double wlen_range[2]` and is used
+ in both cases. Finally the new member variable `enum
+ htsky_spectral_type spectral_type` defines the type of this spectral
range.
-- Add the `htsky_get_raw_spectral_bounds` function that returns the spectral
- range of the loaded sky data overlapped by the user define wavelength range.
+- Add the `htsky_get_raw_spectral_bounds` function that returns the
+ spectral range of the loaded sky data overlapped by the user define
+ wavelength range.
### Version 0.1
- Add longwave support. Add the `double wlen_lw_range[2]` member
- variable to the `struct htsky_args` data structure that, once correctly
- defined, is used to setup the sky data for the provided long wave range. By
- default this range is degenerated meaning that the sky is setup for the short
- wave range [380, 780] nm.
-- Add the `htsky_find_spectral_band` function: it returns the spectral band
- that includes the submitted wavelength.
-- Remove the `htsky_sample_sw_spectral_data_CIE_1931_<X|Y|Z>` functions that
- explicitly rely on the CIE XYZ color space.
+ variable to the `struct htsky_args` data structure that, once
+ correctly defined, is used to setup the sky data for the provided long
+ wave range. By default this range is degenerated meaning that the sky
+ is setup for the short wave range [380, 780] nm.
+- Add the `htsky_find_spectral_band` function: it returns the spectral
+ band that includes the submitted wavelength.
+- Remove the `htsky_sample_sw_spectral_data_CIE_1931_<X|Y|Z>` functions
+ that explicitly rely on the CIE XYZ color space.
- Add the
- `htsky_fetch_per_wavelength_particle_phase_function_asymmetry_parameter` that
- returns the Henyey-Greenstein phase function parameter for a given
- wavelength.
+ `htsky_fetch_per_wavelength_particle_phase_function_asymmetry_parameter`
+ that returns the Henyey-Greenstein phase function parameter for a
+ given wavelength.
## License
-Copyright (C) 2018, 2019, 2020, 2021 [|Meso|Star](http://www.meso-star.com)
-(<contact@meso-star.com>). Copyright (C) 2018, 2019 Centre National de la
-Recherche Scientifique (CNRS), Université Paul Sabatier
-(<contact-edstar@laplace.univ-tlse.fr>). HTSky is free software released
-under the GPL v3+ license: GNU GPL version 3 or later. You are welcome to
-redistribute it under certain conditions; refer to the COPYING file for
-details.
+Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique (CNRS)
+Copyright (C) 2018, 2019 Université Paul Sabatier
+
+HTSky is free software released under the GPL v3+ license: GNU GPL
+version 3 or later. You are welcome to redistribute it under certain
+conditions; refer to the COPYING file for details.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -1,100 +0,0 @@
-# Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
-# Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-cmake_minimum_required(VERSION 3.1)
-project(htsky C)
-
-set(HTSKY_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src)
-
-################################################################################
-# Check dependencies
-################################################################################
-find_package(HTCP 0.0.2 REQUIRED)
-find_package(HTGOP 0.1 REQUIRED)
-find_package(HTMIE 0.0.2 REQUIRED)
-find_package(OpenMP 1.2 REQUIRED)
-find_package(RCMake 0.3 REQUIRED)
-find_package(RSys 0.7 REQUIRED)
-find_package(StarVX 0.2 REQUIRED)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR})
-include(rcmake)
-include(rcmake_runtime)
-
-include_directories(
- ${HTCP_INCLUDE_DIR}
- ${HTGOP_INCLUDE_DIR}
- ${HTMIE_INCLUDE_DIR}
- ${RSys_INCLUDE_DIR}
- ${StarVX_INCLUDE_DIR})
-
-################################################################################
-# Configure and define targets
-################################################################################
-set(VERSION_MAJOR 0)
-set(VERSION_MINOR 2)
-set(VERSION_PATCH 2)
-set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
-
-set(HTSKY_FILES_SRC
- htsky.c
- htsky_atmosphere.c
- htsky_cloud.c
- htsky_dump_cloud_vtk.c
- htsky_log.c
- htsky_svx.c)
-set(HTSKY_FILES_INC
- htsky_c.h
- htsky_atmosphere.h
- htsky_cloud.h
- htsky_log.h
- htsky_svx.h)
-set(HTSKY_FILES_INC_API htsky.h)
-
-set(HTSKY_FILES_DOC COPYING README.md)
-
-# Prepend each file in the `HTSKY_FILES_<SRC|INC>' list by `HTSKY_SOURCE_DIR'
-rcmake_prepend_path(HTSKY_FILES_SRC ${HTSKY_SOURCE_DIR})
-rcmake_prepend_path(HTSKY_FILES_INC ${HTSKY_SOURCE_DIR})
-rcmake_prepend_path(HTSKY_FILES_INC_API ${HTSKY_SOURCE_DIR})
-rcmake_prepend_path(HTSKY_FILES_DOC ${PROJECT_SOURCE_DIR}/../)
-
-add_library(htsky SHARED ${HTSKY_FILES_SRC} ${HTSKY_FILES_INC} ${HTSKY_FILES_INC_API})
-target_link_libraries(htsky HTCP HTGOP HTMIE RSys StarVX)
-
-if(CMAKE_COMPILER_IS_GNUCC)
- target_link_libraries(htsky m)
- set_target_properties(htsky PROPERTIES LINK_FLAGS "${OpenMP_C_FLAGS}")
-endif()
-
-set_target_properties(htsky PROPERTIES
- COMPILE_FLAGS "${OpenMP_C_FLAGS}"
- DEFINE_SYMBOL HTSKY_SHARED_BUILD
- VERSION ${VERSION}
- SOVERSION ${VERSION_MAJOR})
-
-rcmake_setup_devel(htsky HTSky ${VERSION} high_tune/htsky_version.h)
-
-################################################################################
-# Define output & install directories
-################################################################################
-install(TARGETS htsky
- ARCHIVE DESTINATION bin
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION bin)
-install(FILES ${HTSKY_FILES_INC_API} DESTINATION include/high_tune)
-install(FILES ${HTSKY_FILES_DOC} DESTINATION share/doc/htsky)
-
diff --git a/config.mk b/config.mk
@@ -0,0 +1,106 @@
+VERSION = 0.3.0
+PREFIX = /usr/local
+
+LIB_TYPE = SHARED
+#LIB_TYPE = STATIC
+
+BUILD_TYPE = RELEASE
+#BUILD_TYPE = DEBUG
+
+################################################################################
+# Tools
+################################################################################
+AR = ar
+CC = cc
+LD = ld
+OBJCOPY = objcopy
+PKG_CONFIG = pkg-config
+RANLIB = ranlib
+
+################################################################################
+# Dependencies
+################################################################################
+PCFLAGS_SHARED =
+PCFLAGS_STATIC = --static
+PCFLAGS = $(PCFLAGS_$(LIB_TYPE))
+
+HTCP_VERSION = 0.1
+HTCP_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags htcp)
+HTCP_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs htcp)
+
+HTGOP_VERSION = 0.2
+HTGOP_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags htgop)
+HTGOP_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs htgop)
+
+HTMIE_VERSION = 0.1
+HTMIE_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags htmie)
+HTMIE_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs htmie)
+
+RSYS_VERSION = 0.14
+RSYS_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags rsys)
+RSYS_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs rsys)
+
+SVX_VERSION = 0.3
+SVX_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags svx)
+SVX_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs svx)
+
+DPDC_CFLAGS =\
+ $(HTCP_CFLAGS)\
+ $(HTGOP_CFLAGS)\
+ $(HTMIE_CFLAGS)\
+ $(RSYS_CFLAGS)\
+ $(SVX_CFLAGS)\
+ -fopenmp
+
+DPDC_LIBS =\
+ $(HTCP_LIBS)\
+ $(HTGOP_LIBS)\
+ $(HTMIE_LIBS)\
+ $(RSYS_LIBS)\
+ $(SVX_LIBS)\
+ -fopenmp\
+ -lm
+
+################################################################################
+# Compilation options
+################################################################################
+WFLAGS =\
+ -Wall\
+ -Wcast-align\
+ -Wconversion\
+ -Wextra\
+ -Wmissing-declarations\
+ -Wmissing-prototypes\
+ -Wshadow
+
+CFLAGS_HARDENED =\
+ -D_FORTIFY_SOURCES=2\
+ -fcf-protection=full\
+ -fstack-clash-protection\
+ -fstack-protector-strong
+
+CFLAGS_COMMON =\
+ -std=c89\
+ -pedantic\
+ -fPIC\
+ -fvisibility=hidden\
+ -fstrict-aliasing\
+ $(CFLAGS_HARDENED)\
+ $(WFLAGS)
+
+CFLAGS_DEBUG = -g $(CFLAGS_COMMON)
+CFLAGS_RELEASE = -O2 -DNDEBUG $(CFLAGS_COMMON)
+CFLAGS = $(CFLAGS_$(BUILD_TYPE))
+
+################################################################################
+# Linker options
+################################################################################
+LDFLAGS_HARDENED = -Wl,-z,relro,-z,now
+LDFLAGS_COMMON = -shared -Wl,--no-undefined $(LDFLAGS_HARDENED)
+LDFLAGS_DEBUG = $(LDFLAGS_COMMON)
+LDFLAGS_RELEASE = -s $(LDFLAGS_COMMON)
+LDFLAGS = $(LDFLAGS_$(BUILD_TYPE))
+
+OCPFLAGS_DEBUG = --localize-hidden
+OCPFLAGS_RELEASE = --localize-hidden --strip-unneeded
+OCPFLAGS = $(OCPFLAGS_$(BUILD_TYPE))
diff --git a/htsky.pc.in b/htsky.pc.in
@@ -0,0 +1,15 @@
+prefix=@PREFIX@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Requires: rsys >= @RSYS_VERSION@, svx >= @SVX_VERSION@
+Requires.private:\
+ htcp >= @HTCP_VERSION@,\
+ htgop >= @HTGOP_VERSION@,\
+ htmie >= @HTMIE_VERSION@
+Name: htsky
+Description: High-Tune Sky
+Version: @VERSION@
+Libs: -L${libdir} -lhtsky
+Libs.private: -fopenmp -lm
+CFlags: -I${includedir}
diff --git a/make.sh b/make.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+# Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+# Copyright (C) 2018, 2019 Université Paul Sabatier
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+install()
+{
+ prefix=$1
+ shift 1
+
+ mkdir -p "${prefix}"
+
+ for i in "$@"; do
+ dst="${prefix}/${i##*/}"
+
+ if cmp -s "${i}" "${dst}"; then
+ printf "Up to date %s\n" "${dst}"
+ else
+ printf "Installing %s\n" "${dst}"
+ cp "${i}" "${prefix}"
+ fi
+ done
+}
+
+"$@"
diff --git a/src/htsky.c b/src/htsky.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky.h b/src/htsky.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_atmosphere.c b/src/htsky_atmosphere.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_atmosphere.h b/src/htsky_atmosphere.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_c.h b/src/htsky_c.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_cloud.c b/src/htsky_cloud.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_cloud.h b/src/htsky_cloud.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_dump_cloud_vtk.c b/src/htsky_dump_cloud_vtk.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_log.c b/src/htsky_log.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_log.h b/src/htsky_log.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_svx.c b/src/htsky_svx.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/htsky_svx.h b/src/htsky_svx.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2018, 2019 CNRS, Université Paul Sabatier
+/* Copyright (C) 2018, 2019, 2020, 2021 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2018, 2019 Centre National de la Recherche Scientifique
+ * Copyright (C) 2018, 2019 Université Paul Sabatier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by