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

include $(gagadmdir)/Makefile.def

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

TOOL_OBJECTS = clone.o entryloop.o get.o ioloop.o opened.o setup.o	\
taskloop.o timing.o tool-copy.o

TOOL_EXPORTS = cubeadm_clone.mod cubeadm_copy_tool.mod		\
cubeadm_create.mod cubeadm_entryloop.mod cubeadm_get.mod	\
cubeadm_ioloop.mod cubeadm_opened.mod cubeadm_setup.mod		\
cubeadm_taskloop.mod cubeadm_taskloop_iteration.mod		\
cubeadm_timing.mod cubeadm_transpose.mod

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

TYPE_OBJECTS = type-ancillary-cube.o type-consistency.o type-cubeid.o	\
type-cubeprod.o type-directory.o type-fullcube.o type-identifier.o	\
type-image.o type-index.o type-spectral-range-obsolescent.o		\
type-spectrum.o type-subcube.o type-subcube-cplx.o			\
type-taskloop-iteration.o type-visi.o

TYPE_EXPORTS = cubeadm_ancillary_cube_types.mod cubeadm_consistency.mod		\
cubeadm_cubeid_types.mod cubeadm_cubeprod_types.mod				\
cubeadm_fullcube_types.mod cubeadm_identifier.mod cubeadm_image_types.mod	\
cubeadm_index.mod cubeadm_spectrum_types.mod cubeadm_subcube_types.mod		\
cubeadm_visi_types.mod cubeadm_windowing_types.mod

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

COMMAND_OBJECTS = command-checksum.o command-directory.o command-export.o	\
command-find.o command-flag.o command-free.o command-history.o			\
command-import.o command-list.o command-memory.o command-remove.o		\
command-snapshot.o command-touch.o command-transpose.o command-undo.o		\
command-update.o command-verify.o

#***JP: Bizarre. These should not be exported. It probably means that the
#***JP: related subroutines should be elsewhere.
COMMAND_EXPORTS = cubeadm_history.mod cubeadm_import.mod

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

LIB_IDENTITY = cubeadm

LIB_F_OBJECTS = $(TOOL_OBJECTS) $(TYPE_OBJECTS) $(COMMAND_OBJECTS)	\
language.o library.o message.o

LIB_EXPORTS = $(TOOL_EXPORTS) $(TYPE_EXPORTS) $(COMMAND_EXPORTS)	\
cubeadm_language.mod cubeadm_library.mod cubeadm_messaging.mod

INTERFACES_DISABLE = yes

LIB_DEPENDS = -lcubeformats -lcubetopology $(CUBE_CORE_LIBS)	\
$(GREG_LIBS)

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

include $(gagadmdir)/Makefile.lib

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

include $(builddir)/Makefile.deps

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