
#########################################################################
#
#  $Id: Makefile 1.15 2025/11/19 11:19:31Z martin.burnicki REL_M $
#
#  Description:
#    Makefile for libmbg.
#
# -----------------------------------------------------------------------
#  $Log: Makefile $
#  Revision 1.15  2025/11/19 11:19:31Z  martin.burnicki
#  Improved usability of this file on non-Linux systems.
#  Revision 1.14  2025/08/13 10:13:25Z  martin.burnicki
#  Added new mbglib module mbg_prog_info.
#  Revision 1.13  2025/07/25 13:16:18Z  martin.burnicki
#  Added new mbglib module mbgcfg_util.
#  Revision 1.12  2025/05/16 10:15:52Z  martin.burnicki
#  Added new mbglib module str_ext_sys_info.c.
#  Revision 1.11  2023/12/04 14:49:51Z  martin.burnicki
#  Better support for staged builds, and cleanup.
#  Revision 1.10  2022/08/02 09:12:36  martin.burnicki
#  Re-ordered list of object files.
#  Revision 1.9  2022/06/30 08:42:32  martin.burnicki
#  Updated mbglib module list.
#  Revision 1.8  2022/05/30 13:01:42  martin.burnicki
#  Added module mbg_syn1588_util.
#  Revision 1.7  2021/12/01 10:14:54  martin.burnicki
#  Conditionally add new module mbg_pps.
#  Revision 1.6  2021/09/06 16:07:56  martin
#  Moved maintenance of the SYN1588 object file list
#  to the top level Makefile.
#  Revision 1.5  2021/05/04 19:28:43  martin
#  Prepared basic support for serial devices.
#  Revision 1.4  2021/03/26 09:35:10  martin
#  Added modules mbg_daemonize and mbg_pidfile.
#  Revision 1.3  2020/10/20 10:35:51  martin
#  Preliminary support for SYN1588, by default disabled in the Makefile
#  because it's still inclomplete.
#  Revision 1.2  2020/02/27 16:08:56  martin
#  Added modules mbgtime and mbgtimex.
#  Revision 1.1  2020/02/27 12:10:30  martin
#  Initial revision.
#
#########################################################################

MBGTOOLS_STATIC_LIB_TARGET=$(MBGTOOLS_STATIC_LIB_FILE)

OBJS += cfg_hlp.o
OBJS += cmp_time_util.o
OBJS += ctry.o
OBJS += ctrydttm.o
OBJS += deviohlp.o
OBJS += lan_util.o
OBJS += mbg_prog_info.o
OBJS += mbg_xmr_util.o
OBJS += mbg_xmr_util_devio.o
OBJS += mbgcfg_util.o
OBJS += mbgerror.o
OBJS += mbgioctl.o
OBJS += mbgmktm.o
OBJS += mbgtime.o
OBJS += mbgtimex.o
OBJS += nanotime.o
OBJS += pcpslstr.o
OBJS += pcpsmktm.o
OBJS += str_ext_sys_info.o
OBJS += str_util.o
OBJS += timeutil.o
OBJS += toolutil.o

OBJS += mbgdevio.o
OBJS += mbgutil.o
OBJS += gpsutils.o
OBJS += evalutil.o

OBJS += chk_time_info.o
OBJS += ntp_shm.o

OBJS += mbg_daemonize.o
OBJS += mbg_pidfile.o

# Object files always required on systems that basically
# support the OREGANO SYN1588 NICs, e.g. Linux.
OBJS_SYN1588 += mbg_syn1588_util.o

# Object files required if SYN1588 support is actually
# compiled in. Includes mbglib files as well as SYN1588
# API files.
OBJS_SYN1588_USR_SPC += mbg_syn1588_io.o
OBJS_SYN1588_USR_SPC += $(SYN1588_OBJS)

# Object files required on systems that support reading
# serial strings, if that feature is actually enabled.
OBJS_SUPP_SERIAL += pcpststr.o
OBJS_SUPP_SERIAL += mbg_tstr.o
OBJS_SUPP_SERIAL += mbgserio.o

# Object files required on systems that support hardware
# PPS signals, if that feature is actually enabled.
OBJS_SUPP_PPS += mbg_pps.o

BASEDIR := ..
include $(BASEDIR)/Makefile

