###########################################################################
#
# Makefile system for GILDAS softwares (2003-2018).
#
# Please be careful: element order often matters in makefiles.
#
###########################################################################

include $(gagadmdir)/Makefile.def

###########################################################################

LIB_IDENTITY = astro

# Creates pyastro.so (implicit compilation of astro-pyimport.c)
IMPORT_FROM_PYTHON = yes

LIB_EXPORTS = astro_interfaces_private.mod			\
astro_interfaces_public.mod astro_interfaces.mod ast_params.mod	\
astro_types.mod astro_pfx_types.mod

LIB_C_OBJECTS = astro-sicimport.o

LIB_F_OBJECTS = alma_baseband.o alma_line.o alma_spectral.o		\
alma_sub_plot.o astro_atm.o astro_catalog.o astro_constell.o		\
astro_draw.o astro_frame.o astro_header.o astro_horizon.o		\
astro_init.o astro-interfaces.o astro-interfaces-private.o		\
astro-interfaces-public.o astro_j2000.o astro_line.o astro-message.o	\
astro-package.o astro_planet.o astro_set.o astro_source.o		\
astro_time.o astro_uv.o backends_noema.o backends_pico.o buffers.o	\
date.o ephini.o format.o great_circle.o iangin.o jules.o lever.o	\
line_auto.o load_astro.o noema_multi_frequencies.o			\
noema_plot_public.o noema_plot_utils.o noema-tsys.o			\
noema_tuning_tools.o noema_utils.o object.o observatory.o pdbi_line.o	\
pdbi_narrow.o pdbi_plot.o pdbi_print.o pdbi_spectral.o			\
pdbi_sub_plot.o receiver.o receiver_pico.o receiver_noema.o		\
receiver_zoom.o show.o small_circle.o string-parser.o types.o		\
types-noema.o types-pfx.o types-register.o types-specsweep.o		\
use_astro.o uv_doppler.o

LIB_DEPENDS = -latm $(GREG_LIBS)

ifeq ($(GAG_COMPILER_FKIND),gfortran)
  ifeq ($(GAG_COMPILER_FVERSION_GE_10),yes)
    LOCAL_FFLAGS = -fallow-argument-mismatch
  endif
endif

ifeq ($(GAG_OMS),yes)
    LOCAL_CPPFLAGS = -DGAG_OMS
endif

###########################################################################

include $(gagadmdir)/Makefile.lib

###########################################################################

include $(builddir)/Makefile.deps

###########################################################################
