summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2021-11-12 10:42:01 +0100
committerMartin Burnicki <martin.burnicki@meinberg.de>2022-07-08 17:21:00 +0200
commit445092c73e93e1eb5155ccd61520f1daaf984a3a (patch)
treec225708fd0fee6635a0ea34797deba9595c4eaae
parentce063c559227f3a61c615b37d5716d8faca1ddc6 (diff)
downloadmbgtools-win-445092c73e93e1eb5155ccd61520f1daaf984a3a.tar.gz
mbgtools-win-445092c73e93e1eb5155ccd61520f1daaf984a3a.zip
Update mingw makefiles
Removed list of object files from individual makefiles. A static library is now built in libmbg and used instead.
-rw-r--r--mingw/libmbg/makefile38
-rw-r--r--mingw/makefile318
-rw-r--r--mingw/mbgcmptime/makefile29
-rw-r--r--mingw/mbgctrl/makefile26
-rw-r--r--mingw/mbgfasttstamp/makefile26
-rw-r--r--mingw/mbggpscap/makefile26
-rw-r--r--mingw/mbghrtime/makefile26
-rw-r--r--mingw/mbgirigcfg/makefile27
-rw-r--r--mingw/mbgsetsystime/makefile28
-rw-r--r--mingw/mbgshowsignal/makefile26
-rw-r--r--mingw/mbgstatus/makefile26
-rw-r--r--mingw/mbgsvcd/makefile28
-rw-r--r--mingw/mbgtcrcal/makefile27
-rw-r--r--mingw/mbgxhrtime/makefile28
14 files changed, 343 insertions, 336 deletions
diff --git a/mingw/libmbg/makefile b/mingw/libmbg/makefile
new file mode 100644
index 0000000..0a89058
--- /dev/null
+++ b/mingw/libmbg/makefile
@@ -0,0 +1,38 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2021/11/11 16:03:28Z martin REL_M $
+#
+# Description:
+# Makefile for libmbg.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2021/11/11 16:03:28Z martin
+# Initial revision
+#
+#########################################################################
+
+MBGTOOLS_LIB_TARGET=$(MBGTOOLS_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 += 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_util.o
+OBJS += timeutil.o
+OBJS += toolutil.o
+
+BASEDIR := ..
+include $(BASEDIR)/Makefile
+
diff --git a/mingw/makefile b/mingw/makefile
index 5c49aea..a9f4ec7 100644
--- a/mingw/makefile
+++ b/mingw/makefile
@@ -1,13 +1,16 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:24:39Z martin REL_M $
+# $Id: makefile 1.2 2021/11/12 08:37:31Z martin REL_M $
#
# Description:
# Common makefile for mbgtools-win.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.2 2021/11/12 08:37:31Z martin
+# Use a local static library to speed up the build process.
+# Changes adapted from the top level makefile of the mbgtools-lx project.
# Revision 1.1 2019/02/11 16:24:39Z martin
# Initial revision.
#
@@ -19,9 +22,9 @@ $(info make[$(MAKELEVEL)] $(1))
endef
endif
-# If the output of some commands was piped through a pager with certain options,
-# e.g. "PAGER=less LESS=-ie", then the command might hang, so we make sure
-# the default PAGER setting is discarded.
+# If the output of some commands was piped through a pager with certain
+# options, e.g. "PAGER=less LESS=-ie", the command might hang, so we
+# make sure the default PAGER setting is discarded.
PAGER =
export PAGER
@@ -31,11 +34,12 @@ SEPARATOR_2 := "================================================================
INFO = top common:
-V ?= 0 # set to 1 to build verbosely
+# Set V to 1 to build verbosely.
+V ?= 0
# The lines below make the build output non-verbose by default.
# Call make with parameter "V=1" to get verbose output.
-ifeq ("$(V)","1")
+ifneq ("$(V)","0")
Q :=
QM :=
vecho = @true
@@ -45,10 +49,35 @@ else
vecho = @echo
endif
+# Unless a BASEDIR has been specified, we assume
+# mbglib is located below the current dir.
+ifneq ($(BASEDIR),)
+ MBGLIB_BASEDIR = $(BASEDIR)
+else
+ MBGLIB_BASEDIR = .
+endif
+
+ifndef MBGLIB
+ MBGLIB := $(MBGLIB_BASEDIR)/../mbglib
+ $(call debug_msg,$(INFO) MBGLIB: $(MBGLIB))
+endif
+
+
+# Definitions for the static library used when building.
+MBGTOOLS_LIB_BASENAME = mbg
+MBGTOOLS_LIB_DIR = libmbg
+MBGTOOLS_LIB_FILE = lib$(MBGTOOLS_LIB_BASENAME).a
+
+
ifndef BASEDIR # ======================================================
-# This section is evaluated only if this makefile is read by the top-level make
+# This section is evaluated if BASEDIR is not yet defined,
+# i.e. if this makefile is first read by the top-level make.
+# It specifies some common targets and some subdirs inside
+# which a recursive make will be executed, which may include
+# this make file again and evaluate the second part for the
+# case where BASEDIR is defined.
INFO = top 1st:
$(call debug_msg,$(INFO) reading top level part)
@@ -57,49 +86,126 @@ $(call debug_msg,$(INFO) reading top level part)
.DEFAULT_GOAL := all
MAKECMDGOALS ?= $(.DEFAULT_GOAL)
-# This section is used only if this makefile is called by the top-level
-# make. It specifies some common targets and some subdirs in which a
-# recursive make will be executed, which may include this make file again
-# and evaluate the second part.
-SUBDIRS += "mbgstatus"
-SUBDIRS += "mbgsetsystime"
-SUBDIRS += "mbgctrl"
-SUBDIRS += "mbgirigcfg"
-SUBDIRS += "mbgshowsignal"
-SUBDIRS += "mbggpscap"
-SUBDIRS += "mbghrtime"
-SUBDIRS += "mbgfasttstamp"
-# SUBDIRS += "mbgsvcd" # not yet supported, nor required
-SUBDIRS += "mbgxhrtime"
-SUBDIRS += "mbgcmptime"
-SUBDIRS += "mbgtcrcal"
-$(call debug_msg,$(INFO) SUBDIRS = $(SUBDIRS))
-$(call debug_msg,$(INFO) MAKECMDGOALS = $(MAKECMDGOALS))
+# A routine that can be called to check if a Makefile exists
+# in a specific subdirectory. It returns the subdirectory name
+# if it does, or an empty string if it does not.
+## chk_subdir = $(shell test -f $(strip $(1))/Makefile && echo "$(1)" )
+
+
+# List of subdirectories that are only built/cleaned,
+# but not installed/uninstalled.
+SUBDIRS_BUILD_ONLY ?= $(MBGTOOLS_LIB_DIR)
+
+
+# List of subdirectories that don't need to be built/cleaned,
+# but installed/uninstalled.
+## SUBDIRS_INST_ONLY ?= $(call chk_subdir, "libmbg_so/devel" )
+
+
+# List of subdirectories that are built/cleaned
+# as well as installed/uninstalled.
+ifndef SUBDIRS_COMMON
+
+ ifndef DONT_BUILD_LIBS
+ ## SUBDIRS_COMMON += $(SO_SUBDIRS)
+ endif
+
+ ifndef DONT_BUILD_TOOLS
+
+ SUBDIRS_COMMON += "mbgstatus"
+ SUBDIRS_COMMON += "mbgsetsystime"
+ SUBDIRS_COMMON += "mbgctrl"
+ SUBDIRS_COMMON += "mbgirigcfg"
+ SUBDIRS_COMMON += "mbgshowsignal"
+ SUBDIRS_COMMON += "mbggpscap"
+ SUBDIRS_COMMON += "mbghrtime"
+ SUBDIRS_COMMON += "mbgfasttstamp"
+ # SUBDIRS_COMMON += "mbgsvcd" # not yet supported, nor required
+ SUBDIRS_COMMON += "mbgxhrtime"
+ SUBDIRS_COMMON += "mbgcmptime"
+ SUBDIRS_COMMON += "mbgtcrcal"
+ endif
+
+
+ ifndef DONT_BUILD_GUI
+ ifdef BUILD_MBGMON
+ ## SUBDIRS_COMMON += $(call chk_subdir, "wxwidgets/mbgmon")
+ endif
+ ifndef BUILD_MBGSTATSVIEWER
+ ## SUBDIRS_COMMON += $(call chk_subdir, "wxwidgets/mbgstatsviewer")
+ endif
+ endif # DONT_BUILD_GUI
+
+
+ ifndef DONT_BUILD_DRIVER
+ ## SUBDIRS_COMMON += $(call chk_subdir, "mbgclock")
+ ## SUBDIRS_COMMON += $(call chk_subdir, "test/mbgclock-test" )
+ endif # DONT_BUILD_DRIVER
+
+endif # SUBDIRS_COMMON
+
+
+# Targets for which we recurse into specific subdirs
+TARGETS_BUILD := all clean distclean
+TARGETS_INST := install uninstall
+
+
+# Determine the subdirectories to be recursed into
+# depending on the current goal.
+ifneq ($(filter $(MAKECMDGOALS),$(TARGETS_BUILD)),)
+ SUBDIR_TARGETS += $(SUBDIRS_BUILD_ONLY) $(SUBDIRS_COMMON)
+endif
+
+ifneq ($(filter $(MAKECMDGOALS),$(TARGETS_INST)),)
+ SUBDIR_TARGETS += $(SUBDIRS_INST_ONLY) $(SUBDIRS_COMMON)
+endif
+
+
+# For some targets we may also want to execute some additional
+# commands after the main targets have been made.
+ifeq ($(MAKECMDGOALS),all)
+ ## PRE_TARGETS = pre_build_info
+ ## POST_TARGETS = post_build_info
+endif
+
+ifeq ($(MAKECMDGOALS),install)
+ ## POST_TARGETS = post_install_info
+endif
+
+
+# If the current target is uninstall, we may also want to run
+# some commands before uninstallation.
+ifeq ($(MAKECMDGOALS),uninstall)
+ ## PRE_TARGETS = pre_uninstall
+ ## PRE_UNINSTALL_TARGETS = mbgsvcd_uninstall
+endif
+
+
+$(call debug_msg,$(INFO) MAKECMDGOALS: $(MAKECMDGOALS))
+$(call debug_msg,$(INFO) SUBDIRS_BUILD_ONLY: $(SUBDIRS_BUILD_ONLY))
+$(call debug_msg,$(INFO) SUBDIRS_INST_ONLY: $(SUBDIRS_INST_ONLY))
+$(call debug_msg,$(INFO) SUBDIRS_COMMON: $(SUBDIRS_COMMON))
-# Targets for which we recurse into all subdirs
-TARGETS := all clean distclean install uninstall
+.PHONY: $(TARGETS_BUILD) $(TARGETS_INST)
+$(TARGETS_BUILD) $(TARGETS_INST): $(PRE_TARGETS) $(SUBDIR_TARGETS) $(POST_TARGETS)
-.PHONY: $(TARGETS) $(SUBDIRS)
-$(TARGETS): $(PRE_TARGETS) $(SUBDIRS) $(POST_TARGETS)
-$(SUBDIRS):
+.PHONY: $(SUBDIR_TARGETS)
+$(SUBDIR_TARGETS):
ifdef SEPARATOR_1
- @echo $(SEPARATOR_1)
+ @echo "$(SEPARATOR_1)"
endif
- ifdef DEBUG_MAKE
- @echo Targets: $(TARGETS)
- @echo Subdirs: $(SUBDIRS)
- endif
- @echo Making $(MAKECMDGOALS) in $@
+ @echo "Making $(MAKECMDGOALS) in $@"
$(Q)$(MAKE) $(QM) -C $@ $(INSTALL_PATHS) $(MAKECMDGOALS)
+
else # ================================================================
-# This section is evaluated only if this makefile is included from
-# a subproject's makefile.
+# This section is evaluated if BASEDIR is already defined,
+# i.e. if this makefile is included from a sub-level make.
INFO = top 2nd:
$(call debug_msg,$(INFO) reading second level definitions)
@@ -108,25 +214,30 @@ $(call debug_msg,$(INFO) MBGTOOLS_TARGET: $(MBGTOOLS_TARGET))
$(call debug_msg,$(INFO) BASEDIR: $(BASEDIR))
$(call debug_msg,$(INFO) MAKECMDGOALS: $(MAKECMDGOALS))
-ifndef MBGLIB
- MBGLIB := $(BASEDIR)/../mbglib
- $(call debug_msg,$(INFO) MBGLIB: $(MBGLIB))
-endif
+MBGLIB_DIRS += common
+MBGLIB_DIRS += win32
-MBGLIB_DIRS += common win32
%.o: %.c
$(vecho) " $(CC) $@"
- $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+ $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+%.o: %.cpp
+ $(vecho) " $(CC) $@"
+ $(Q)$(CC) $(CPPFLAGS) $(CXXLAGS) -c -o $@ $<
+
CPPFLAGS += -Wall
+## CPPFLAGS += -Wextra
+## CPPFLAGS += -Winline
OPT_FLAGS = -O2
+
ifdef DEBUG
CPPFLAGS += -DDEBUG=$(DEBUG)
CPPFLAGS += -g2
- # CPPFLAGS += $(OPT_FLAGS)
+ ## CPPFLAGS += $(OPT_FLAGS)
else
CPPFLAGS += $(OPT_FLAGS)
endif
@@ -137,17 +248,50 @@ CPPFLAGS += -D_USE_CHK_TSTR=1
CPPFLAGS += -I.
CPPFLAGS += -I$(BASEDIR)/..
-CPPFLAGS += $(foreach dir,$(MBGLIB_DIRS),-I$(MBGLIB)/$(dir))
+CPPFLAGS += $(patsubst %,-I%,$(addprefix $(MBGLIB)/,$(MBGLIB_DIRS)))
+
+
+# Additional C++-only compiler flags.
+## CXXFLAGS += -Wno-deprecated
+
LDFLAGS += $(foreach dir,$(SO_SUBDIRS),-L$(BASEDIR)/$(dir) )
+# The path to the static library we use to
+# simplify the build procedure.
+MBGTOOLS_LIB_PATH = $(BASEDIR)/$(MBGTOOLS_LIB_DIR)
+MBGTOOLS_LIB_FILE_PATH = $(MBGTOOLS_LIB_PATH)/$(MBGTOOLS_LIB_FILE)
+
+ifdef MBGTOOLS_LIB_TARGET
+ CURR_TARGET = $(MBGTOOLS_LIB_TARGET)
+ USE_STATIC_LIB = 0
+endif
+
+ifdef MBGTOOLS_TARGET
+ CURR_TARGET = $(MBGTOOLS_TARGET)
+ USE_STATIC_LIB = 1
+
+ OBJS = $(CURR_TARGET).o
+endif # MBGTOOLS_TARGET
+
+
+ifneq ($(USE_STATIC_LIB),0)
+ LDFLAGS += -L$(MBGTOOLS_LIB_PATH)
+ LDLIBS += -l$(MBGTOOLS_LIB_BASENAME)
+
+ $(CURR_TARGET): $(MBGTOOLS_LIB_FILE_PATH)
+endif
+
+
.PHONY: all
-all: $(MBGTOOLS_TARGET)
+all: $(CURR_TARGET)
VPATH += $(BASEDIR)/../$(MBGTOOLS_TARGET)
VPATH += $(foreach dir,$(MBGLIB_DIRS),$(MBGLIB)/$(dir))
+## USE_THREAD_API = 1
+
ifdef USE_THREAD_API
# Check whether thread affinity is supported by the installed pthread library.
@@ -166,21 +310,21 @@ ifdef USE_THREAD_API
# endif
# ifndef USE_THREAD_AFFINITY
-# ##++++ If not found either, don't support thread affinity
+# # If not found either, don't support thread affinity
# USE_THREAD_AFFINITY=0
# else
-# #if supported via nptl add the associated search paths
-# CPPFLAGS += -I /usr/include/nptl -L /usr/lib/nptl
+# # If supported via nptl add the associated search paths
+# CPPFLAGS += -I/usr/include/nptl -L/usr/lib/nptl
# endif
# endif
- # May want to use the result for our program
+ # May want to use the result for our program.
## CPPFLAGS += -DUSE_THREAD_AFFINITY=$(USE_THREAD_AFFINITY)
CPPFLAGS += -DMBGDEVIO_USE_THREAD_API=1
- #LDFLAGS += -lpthread
- ##LDFLAGS += -pthread
+ # LDLIBS += -lpthread
+ ## LDFLAGS += -pthread
endif
# CPPFLAGS += -DMBG_LIB_EXPORT=1 # required for MinGW
@@ -191,8 +335,13 @@ else
LDFLAGS += -L$(MBGLIB)/lib/msc/
endif
+LDLIBS += -lmbgdevio
+LDLIBS += -lmbgutil
+LDLIBS += -lmbgsvctl
+
+
# Common Windows networking stuff
-LDFLAGS += -lws2_32
+LDLIBS += -lws2_32
ifdef INST_TO_BIN
INST_DIR = $(DESTDIR)$(bindir)
@@ -203,40 +352,58 @@ else
ifdef INST_TO_LIB
INST_DIR = $(DESTDIR)$(libdir)
else
- ifdef INST_TO_INCLUDE
- INST_DIR = $(DESTDIR)$(includedir)/mbglib
- endif
+ ifdef INST_TO_INCLUDE
+ INST_DIR = $(DESTDIR)$(includedir)/mbglib
+ endif
endif
endif
endif
-$(call debug_msg,$(INFO) CPPFLAGS=$(CPPFLAGS))
-$(call debug_msg,$(INFO) EXTRA_CFLAGS=$(EXTRA_CFLAGS))
-$(call debug_msg,$(INFO) MAKECMDGOALS = $(MAKECMDGOALS))
+$(MBGTOOLS_LIB_FILE_PATH):
+ $(MAKE) -C $(MBGTOOLS_LIB_PATH) $(MBGTOOLS_LIB_FILE)
-$(MBGTOOLS_TARGET): $(OBJS)
- $(vecho) " Linking $@"
- $(Q)$(CC) -o $@ $^ $(LDFLAGS)
-ifdef SO_TARGET_LIBNAME
- ln -sf $(MBGTOOLS_TARGET) $(SO_TARGET_LIBNAME)
+# Options for the archiver to build a static library.
+ARFLAGS := rcs
+ifneq ("$(V)","0")
+ # In verbose mode we also make the archiver verbose.
+ ARFLAGS := $(ARFLAGS)v
endif
+
+$(call debug_msg,$(INFO) CPPFLAGS: $(CPPFLAGS))
+$(call debug_msg,$(INFO) EXTRA_CFLAGS: $(EXTRA_CFLAGS))
+$(call debug_msg,$(INFO) MAKECMDGOALS: $(MAKECMDGOALS))
+
+
+$(CURR_TARGET): $(OBJS)
+ifdef MBGTOOLS_LIB_TARGET
+ $(vecho) " $(AR) $@"
+ $(Q)$(AR) $(ARFLAGS) $@ $(OBJS)
+else
+ $(vecho) " Linking $@"
+ $(Q)$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
+ ifdef SO_TARGET_LIBNAME
+ ln -sf $(CURR_TARGET) $(SO_TARGET_LIBNAME)
+ endif
+endif # MBGTOOLS_LIB_TARGET
+
+
.PHONY: install
install:
+ifneq ($(INST_DIR),)
ifneq ($(UID),0)
$(call make_as_root, $@)
else
- ifdef INCLUDE_FILES # include files
+ ifdef INCLUDE_FILES # Install header files.
for incfile in $(INCLUDE_FILES); do \
install -m 644 -D $(BASEDIR)/mbglib/common/$$incfile $(INST_DIR)/$$incfile; \
done;
for basename in $(SO_BASENAMES); do \
ln -sf $(DESTDIR)$(libdir)/libmbg$$basename.so.$(SO_MAJOR_VERSION) $(DESTDIR)$(libdir)/libmbg$$basename.so; \
done;
- else # usual installation
- install -s -D $(MBGTOOLS_TARGET) $(INST_DIR)/$(MBGTOOLS_TARGET)
-## install -s -m 755 -D $(MBGTOOLS_TARGET) $(INST_DIR)/$(MBGTOOLS_TARGET)
+ else # Usual installation.
+ install -s -m 755 -D $(CURR_TARGET) $(INST_DIR)/$(CURR_TARGET)
ifndef CALLED_FROM_SPEC
ifdef INST_TO_LIB
@@ -245,22 +412,24 @@ install:
endif
endif
endif
+endif
.PHONY: uninstall
uninstall:
+ifneq ($(INST_DIR),)
ifneq ($(UID),0)
$(call make_as_root, $@)
else
- ifdef INCLUDE_FILES #remove include files and
+ ifdef INCLUDE_FILES # Remove header files.
rm -rf $(INST_DIR)
- ifndef CALLED_FROM_SPEC #remove symbolic links
+ ifndef CALLED_FROM_SPEC # Remove symbolic links.
for basename in $(SO_BASENAMES); do \
rm -f $(libdir)/libmbg$$basename.so; \
done;
endif
else
- rm -f $(INST_DIR)/$(MBGTOOLS_TARGET)
+ rm -f $(INST_DIR)/$(CURR_TARGET)
ifndef CALLED_FROM_SPEC
ifdef INST_TO_LIB
$(LDCONFIG) $(INST_DIR)
@@ -268,13 +437,14 @@ uninstall:
endif
endif
endif
+endif
CLEAN_FILES += *.o
CLEAN_FILES += *~
CLEAN_FILES += $(foreach dir,$(MBGLIB_DIRS),$(MBGLIB)/$(dir)/*~)
CLEAN_FILES += core
-CLEAN_FILES += $(MBGTOOLS_TARGET)
+CLEAN_FILES += $(CURR_TARGET)
.PHONY: clean
clean:
@@ -287,7 +457,7 @@ endif
INFO = bottom 2nd:
-# common targets:
+# Common targets:
.PHONY: distclean
distclean: clean
diff --git a/mingw/mbgcmptime/makefile b/mingw/mbgcmptime/makefile
index cbaca15..67576f6 100644
--- a/mingw/mbgcmptime/makefile
+++ b/mingw/mbgcmptime/makefile
@@ -1,42 +1,23 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:25:23Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:07:29Z martin REL_M $
#
# Description:
# Makefile for mbgcmptime on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:07:29Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:42:29Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:25:23Z martin
# Initial revision.
#
#########################################################################
MBGTOOLS_TARGET = mbgcmptime
-INST_TO_BIN = 1
-
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-OBJS += deviohlp.o
-#OBJS += gpsutils.o
-OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-OBJS += cmp_time_util.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgctrl/makefile b/mingw/mbgctrl/makefile
index 33b2be1..f91531c 100644
--- a/mingw/mbgctrl/makefile
+++ b/mingw/mbgctrl/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:25:42Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:06:39Z martin REL_M $
#
# Description:
# Makefile for mbgctrl on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:06:39Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:42:26Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:25:42Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbgctrl
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-OBJS += deviohlp.o
-#OBJS += gpsutils.o
-OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgfasttstamp/makefile b/mingw/mbgfasttstamp/makefile
index 85d0b8d..847a277 100644
--- a/mingw/mbgfasttstamp/makefile
+++ b/mingw/mbgfasttstamp/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:26:14Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:06:24Z martin REL_M $
#
# Description:
# Makefile for mbgfasttstamp on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:06:24Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:45:20Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:26:14Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbgfasttstamp
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbggpscap/makefile b/mingw/mbggpscap/makefile
index a7229b8..126120d 100644
--- a/mingw/mbggpscap/makefile
+++ b/mingw/mbggpscap/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:26:37Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:06:13Z martin REL_M $
#
# Description:
# Makefile for mbggpscap on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:06:13Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:42:21Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:26:37Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbggpscap
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-OBJS += deviohlp.o
-#OBJS += gpsutils.o
-OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbghrtime/makefile b/mingw/mbghrtime/makefile
index 37b81b1..c679623 100644
--- a/mingw/mbghrtime/makefile
+++ b/mingw/mbghrtime/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:27:06Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:07:00Z martin REL_M $
#
# Description:
# Makefile for mbghrtime on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:07:00Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:44:44Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:27:06Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbghrtime
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-#LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgirigcfg/makefile b/mingw/mbgirigcfg/makefile
index af71d8c..6987516 100644
--- a/mingw/mbgirigcfg/makefile
+++ b/mingw/mbgirigcfg/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:27:38Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:05:48Z martin REL_M $
#
# Description:
# Makefile for mbgirigcfg on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:05:48Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:43:11Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:27:38Z martin
# Initial revision.
#
@@ -15,26 +19,5 @@
MBGTOOLS_TARGET = mbgirigcfg
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
-
diff --git a/mingw/mbgsetsystime/makefile b/mingw/mbgsetsystime/makefile
index 503854e..d4f82fb 100644
--- a/mingw/mbgsetsystime/makefile
+++ b/mingw/mbgsetsystime/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:28:08Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:04:58Z martin REL_M $
#
# Description:
# Makefile for mbgsetsystime on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:04:58Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:41:59Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:28:08Z martin
# Initial revision.
#
@@ -15,27 +19,5 @@
MBGTOOLS_TARGET = mbgsetsystime
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-OBJS += pcpsmktm.o
-
-LDFLAGS += -lmbgdevio
-#LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgshowsignal/makefile b/mingw/mbgshowsignal/makefile
index d4b968d..04ae02c 100644
--- a/mingw/mbgshowsignal/makefile
+++ b/mingw/mbgshowsignal/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:28:36Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:04:39Z martin REL_M $
#
# Description:
# Makefile for mbgshowsignal on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:04:39Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:43:52Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:28:36Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbgshowsignal
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-#LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgstatus/makefile b/mingw/mbgstatus/makefile
index f2687da..34d0a48 100644
--- a/mingw/mbgstatus/makefile
+++ b/mingw/mbgstatus/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:29:01Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:05:18Z martin REL_M $
#
# Description:
# Makefile for mbgstatus on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:05:18Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:36:13Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:29:01Z martin
# Initial revision.
#
@@ -15,25 +19,5 @@
MBGTOOLS_TARGET = mbgstatus
-OBJS := $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-OBJS += ctry.o
-OBJS += ctrydttm.o
-OBJS += deviohlp.o
-#OBJS += gpsutils.o
-OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-OBJS += mbgmktm.o
-OBJS += nanotime.o
-OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgsvcd/makefile b/mingw/mbgsvcd/makefile
index 7f18ec0..7f646e8 100644
--- a/mingw/mbgsvcd/makefile
+++ b/mingw/mbgsvcd/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:29:41Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:04:15Z martin REL_M $
#
# Description:
# Makefile for mbgsvcd on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:04:15Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:41:51Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:29:41Z martin
# Initial revision.
#
@@ -15,27 +19,5 @@
MBGTOOLS_TARGET = mbgsvcd
-OBJS = $(MBGTOOLS_TARGET).o
-
-#OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-#OBJS += ntp_shm.o
-
-LDFLAGS += -lmbgdevio
-#LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
diff --git a/mingw/mbgtcrcal/makefile b/mingw/mbgtcrcal/makefile
index 522d0e7..ca7e156 100644
--- a/mingw/mbgtcrcal/makefile
+++ b/mingw/mbgtcrcal/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:30:01Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:03:26Z martin REL_M $
#
# Description:
# Makefile for mbgtcrcal on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:03:26Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:47:05Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:30:01Z martin
# Initial revision.
#
@@ -15,26 +19,5 @@
MBGTOOLS_TARGET = mbgtcrcal
-OBJS := $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-#LDFLAGS += -lmbgutil
-
BASEDIR := ..
include $(BASEDIR)/Makefile
-
diff --git a/mingw/mbgxhrtime/makefile b/mingw/mbgxhrtime/makefile
index 04f47ec..5b25a1f 100644
--- a/mingw/mbgxhrtime/makefile
+++ b/mingw/mbgxhrtime/makefile
@@ -1,13 +1,17 @@
#########################################################################
#
-# $Id: makefile 1.1 2019/02/11 16:30:31Z martin REL_M $
+# $Id: makefile 1.3 2021/11/12 09:03:00Z martin REL_M $
#
# Description:
# Makefile for mbgxhrtime on Windows / MinGW.
#
# -----------------------------------------------------------------------
# $Log: makefile $
+# Revision 1.3 2021/11/12 09:03:00Z martin
+# Removed list of object files. A static library is now used instead.
+# Revision 1.2 2020/08/10 15:46:11Z martin
+# Updated source module list.
# Revision 1.1 2019/02/11 16:30:31Z martin
# Initial revision.
#
@@ -15,27 +19,7 @@
MBGTOOLS_TARGET = mbgxhrtime
-USE_THREAD_API = 1
-
-OBJS = $(MBGTOOLS_TARGET).o
-
-OBJS += cfg_hlp.o
-#OBJS += ctry.o
-#OBJS += ctrydttm.o
-#OBJS += deviohlp.o
-#OBJS += gpsutils.o
-#OBJS += lan_util.o
-OBJS += mbgerror.o
-#OBJS += mbgioctl.o
-#OBJS += mbgmktm.o
-#OBJS += nanotime.o
-#OBJS += pcpslstr.o
-OBJS += str_util.o
-OBJS += timeutil.o
-OBJS += toolutil.o
-
-LDFLAGS += -lmbgdevio
-LDFLAGS += -lmbgutil
+# USE_THREAD_API = 1
BASEDIR := ..
include $(BASEDIR)/Makefile