summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2019-02-11 12:10:00 +0100
committerMartin Burnicki <martin.burnicki@meinberg.de>2019-02-11 12:10:00 +0100
commit9e5ae74979605aee0d48ba0951ecc37d10b2a175 (patch)
treef659cdcb412d6d0ad29a20aac1cb51cc75dd0147
parenta7b8404dbfa620de4b5aca578746ee33eed3f447 (diff)
downloadmbgtools-win-9e5ae74979605aee0d48ba0951ecc37d10b2a175.tar.gz
mbgtools-win-9e5ae74979605aee0d48ba0951ecc37d10b2a175.zip
Add support for the mingw build environment4.2.2
Requires dkwin-3.08 or newer.
-rw-r--r--mingw/makefile295
-rw-r--r--mingw/mbgcmptime/makefile42
-rw-r--r--mingw/mbgctrl/makefile39
-rw-r--r--mingw/mbgfasttstamp/makefile39
-rw-r--r--mingw/mbggpscap/makefile39
-rw-r--r--mingw/mbghrtime/makefile39
-rw-r--r--mingw/mbgirigcfg/makefile40
-rw-r--r--mingw/mbgsetsystime/makefile41
-rw-r--r--mingw/mbgshowsignal/makefile39
-rw-r--r--mingw/mbgstatus/makefile39
-rw-r--r--mingw/mbgsvcd/makefile41
-rw-r--r--mingw/mbgtcrcal/makefile40
-rw-r--r--mingw/mbgxhrtime/makefile41
13 files changed, 774 insertions, 0 deletions
diff --git a/mingw/makefile b/mingw/makefile
new file mode 100644
index 0000000..5c49aea
--- /dev/null
+++ b/mingw/makefile
@@ -0,0 +1,295 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:24:39Z martin REL_M $
+#
+# Description:
+# Common makefile for mbgtools-win.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:24:39Z martin
+# Initial revision.
+#
+#########################################################################
+
+ifdef DEBUG_MAKE
+define debug_msg
+$(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.
+PAGER =
+export PAGER
+
+
+## SEPARATOR_1 := "++"
+SEPARATOR_2 := "========================================================================"
+
+INFO = top common:
+
+V ?= 0 # set to 1 to build verbosely
+
+# The lines below make the build output non-verbose by default.
+# Call make with parameter "V=1" to get verbose output.
+ifeq ("$(V)","1")
+ Q :=
+ QM :=
+ vecho = @true
+else
+ Q := @
+ QM := -s
+ vecho = @echo
+endif
+
+
+ifndef BASEDIR # ======================================================
+
+# This section is evaluated only if this makefile is read by the top-level make
+
+INFO = top 1st:
+$(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))
+
+
+# Targets for which we recurse into all subdirs
+TARGETS := all clean distclean install uninstall
+
+.PHONY: $(TARGETS) $(SUBDIRS)
+$(TARGETS): $(PRE_TARGETS) $(SUBDIRS) $(POST_TARGETS)
+
+$(SUBDIRS):
+ ifdef SEPARATOR_1
+ @echo $(SEPARATOR_1)
+ endif
+ ifdef DEBUG_MAKE
+ @echo Targets: $(TARGETS)
+ @echo Subdirs: $(SUBDIRS)
+ endif
+ @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.
+
+INFO = top 2nd:
+$(call debug_msg,$(INFO) reading second level definitions)
+
+$(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 win32
+
+%.o: %.c
+ $(vecho) " $(CC) $@"
+ $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+
+CPPFLAGS += -Wall
+
+OPT_FLAGS = -O2
+
+ifdef DEBUG
+ CPPFLAGS += -DDEBUG=$(DEBUG)
+ CPPFLAGS += -g2
+ # CPPFLAGS += $(OPT_FLAGS)
+else
+ CPPFLAGS += $(OPT_FLAGS)
+endif
+
+CPPFLAGS += -D_USE_SOCKET_IO=1
+
+CPPFLAGS += -D_USE_CHK_TSTR=1
+
+CPPFLAGS += -I.
+CPPFLAGS += -I$(BASEDIR)/..
+CPPFLAGS += $(foreach dir,$(MBGLIB_DIRS),-I$(MBGLIB)/$(dir))
+
+LDFLAGS += $(foreach dir,$(SO_SUBDIRS),-L$(BASEDIR)/$(dir) )
+
+
+.PHONY: all
+all: $(MBGTOOLS_TARGET)
+
+VPATH += $(BASEDIR)/../$(MBGTOOLS_TARGET)
+VPATH += $(foreach dir,$(MBGLIB_DIRS),$(MBGLIB)/$(dir))
+
+ifdef USE_THREAD_API
+
+ # Check whether thread affinity is supported by the installed pthread library.
+ # Newer versions of glibc/pthread (at least glibc 2.5) supports this natively.
+ # Older versions of glibc/pthread (e.g. glibc 2.3) may not support this natively
+ # but may provide a NPTL (New Posix Thread Library) library located under separate
+ # include and lib paths.
+
+ # Check whether pthread_getaffinity is supported by the standard pthread.h
+ USE_THREAD_AFFINITY ?= 0
+
+# # If it is not, check nptl/pthread.h
+# ifndef USE_THREAD_AFFINITY
+# ifdef USE_NPTL
+# USE_THREAD_AFFINITY := $(shell grep -q pthread_getaffinity /usr/include/nptl/pthread.h && echo 1)
+# endif
+
+# ifndef USE_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
+# endif
+# endif
+
+ # 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
+endif
+
+# CPPFLAGS += -DMBG_LIB_EXPORT=1 # required for MinGW
+
+ifeq ("$(MSYSTEM_CARCH)","x86_64")
+ LDFLAGS += -L$(MBGLIB)/lib64/msc/
+else
+ LDFLAGS += -L$(MBGLIB)/lib/msc/
+endif
+
+# Common Windows networking stuff
+LDFLAGS += -lws2_32
+
+ifdef INST_TO_BIN
+ INST_DIR = $(DESTDIR)$(bindir)
+else
+ ifdef INST_TO_SBIN
+ INST_DIR = $(DESTDIR)$(sbindir)
+ else
+ ifdef INST_TO_LIB
+ INST_DIR = $(DESTDIR)$(libdir)
+ else
+ 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_TARGET): $(OBJS)
+ $(vecho) " Linking $@"
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS)
+ifdef SO_TARGET_LIBNAME
+ ln -sf $(MBGTOOLS_TARGET) $(SO_TARGET_LIBNAME)
+endif
+
+.PHONY: install
+install:
+ ifneq ($(UID),0)
+ $(call make_as_root, $@)
+ else
+ ifdef INCLUDE_FILES # include 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)
+
+ ifndef CALLED_FROM_SPEC
+ ifdef INST_TO_LIB
+ $(LDCONFIG) $(INST_DIR)
+ endif
+ endif
+ endif
+ endif
+
+
+.PHONY: uninstall
+uninstall:
+ ifneq ($(UID),0)
+ $(call make_as_root, $@)
+ else
+ ifdef INCLUDE_FILES #remove include files and
+ rm -rf $(INST_DIR)
+ 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)
+ ifndef CALLED_FROM_SPEC
+ ifdef INST_TO_LIB
+ $(LDCONFIG) $(INST_DIR)
+ endif
+ endif
+ endif
+ endif
+
+
+CLEAN_FILES += *.o
+CLEAN_FILES += *~
+CLEAN_FILES += $(foreach dir,$(MBGLIB_DIRS),$(MBGLIB)/$(dir)/*~)
+CLEAN_FILES += core
+CLEAN_FILES += $(MBGTOOLS_TARGET)
+
+.PHONY: clean
+clean:
+ifneq ($(CLEAN_FILES),)
+ rm -f $(CLEAN_FILES)
+endif
+ifneq ($(CLEAN_DIRS),)
+ rm -rf $(CLEAN_DIRS)
+endif
+
+INFO = bottom 2nd:
+
+# common targets:
+
+.PHONY: distclean
+distclean: clean
+
+endif
diff --git a/mingw/mbgcmptime/makefile b/mingw/mbgcmptime/makefile
new file mode 100644
index 0000000..cbaca15
--- /dev/null
+++ b/mingw/mbgcmptime/makefile
@@ -0,0 +1,42 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:25:23Z martin REL_M $
+#
+# Description:
+# Makefile for mbgcmptime on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# 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
new file mode 100644
index 0000000..33b2be1
--- /dev/null
+++ b/mingw/mbgctrl/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:25:42Z martin REL_M $
+#
+# Description:
+# Makefile for mbgctrl on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:25:42Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..85d0b8d
--- /dev/null
+++ b/mingw/mbgfasttstamp/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:26:14Z martin REL_M $
+#
+# Description:
+# Makefile for mbgfasttstamp on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:26:14Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..a7229b8
--- /dev/null
+++ b/mingw/mbggpscap/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:26:37Z martin REL_M $
+#
+# Description:
+# Makefile for mbggpscap on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:26:37Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..37b81b1
--- /dev/null
+++ b/mingw/mbghrtime/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:27:06Z martin REL_M $
+#
+# Description:
+# Makefile for mbghrtime on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:27:06Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..af71d8c
--- /dev/null
+++ b/mingw/mbgirigcfg/makefile
@@ -0,0 +1,40 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:27:38Z martin REL_M $
+#
+# Description:
+# Makefile for mbgirigcfg on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:27:38Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..503854e
--- /dev/null
+++ b/mingw/mbgsetsystime/makefile
@@ -0,0 +1,41 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:28:08Z martin REL_M $
+#
+# Description:
+# Makefile for mbgsetsystime on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:28:08Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..d4b968d
--- /dev/null
+++ b/mingw/mbgshowsignal/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:28:36Z martin REL_M $
+#
+# Description:
+# Makefile for mbgshowsignal on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:28:36Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..f2687da
--- /dev/null
+++ b/mingw/mbgstatus/makefile
@@ -0,0 +1,39 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:29:01Z martin REL_M $
+#
+# Description:
+# Makefile for mbgstatus on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:29:01Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..7f18ec0
--- /dev/null
+++ b/mingw/mbgsvcd/makefile
@@ -0,0 +1,41 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:29:41Z martin REL_M $
+#
+# Description:
+# Makefile for mbgsvcd on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:29:41Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..522d0e7
--- /dev/null
+++ b/mingw/mbgtcrcal/makefile
@@ -0,0 +1,40 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:30:01Z martin REL_M $
+#
+# Description:
+# Makefile for mbgtcrcal on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:30:01Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
new file mode 100644
index 0000000..04f47ec
--- /dev/null
+++ b/mingw/mbgxhrtime/makefile
@@ -0,0 +1,41 @@
+
+#########################################################################
+#
+# $Id: makefile 1.1 2019/02/11 16:30:31Z martin REL_M $
+#
+# Description:
+# Makefile for mbgxhrtime on Windows / MinGW.
+#
+# -----------------------------------------------------------------------
+# $Log: makefile $
+# Revision 1.1 2019/02/11 16:30:31Z martin
+# Initial revision.
+#
+#########################################################################
+
+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
+
+BASEDIR := ..
+include $(BASEDIR)/Makefile