# # Name: Makehead.win32 # # Purpose: This file is used to customize operating system and installation # dependent features of the MX makefiles. This version is customized # for Microsoft Win32 (Windows 95/98/Me/NT/2000/XP/7/8/8.1/10). # # Notes: # This makefile assumes that you are using Gnu Make as well as a /bin/sh # compatible shell such as Gnu Bash. You will also need some Unix shell # utilities such as awk, cp, cut, echo, head, rm, test, touch, and tr. # This is most easily done with Cygwin, but other packages like Unxutils, # Msys, or GnuWin32 may work. Bear in mind that GnuWin32 does _not_ come # with a /bin/sh compatible shell, so you must get that from somewhere # else if you use GnuWin32. The build system for Strawberry Perl might # work, but I have not tried that. # # Microsoft's Nmake will _not_ work, so do not waste your time trying to # make it work. # # You must also arrange to get the Microsoft Visual C++ build system # environment variables into your environment. This can be done by # invoking one of the batch files that come with Visual C++ like # vcvars32.bat, vcvarsx86_amd64.bat, and so forth. For my own work, # I typically translate the Windows batch files into Cygwin Bash script # fragments to be loaded by the Cygwin .bashrc. You can find examples of # scripts that I use in the directory mx/scripts/windows/visual_studio. # # If you are using Cygwin, the Visual C++ directories _MUST_ appear in # the PATH before any of the Cygwin directories. If the Cygwin # directories appear first, then the 'link' commands below will find # the Cygwin /usr/bin/link program instead of the Visual C++ link # program and things will break. # # Things you may need to change: # # 1. If you will be compiling MX modules that link to third-party DLLs # like for NI DAQmx, XIA Handel, EPICS, etc. then you must make sure # to compile and link MX to the same versions of the run time libraries, # e.g. MSVCRT versus LIBCMT, as the third party library is using. # # If you do not and there is a mismatch, then at best linking your # binaries will fail and alert you to the problem. However, it is also # possible that the executables will seem to build correctly, but then # occasionally fail in mysterious ways. Thus, it is very important to # get this right! # # Also, since MX uses threads in a number of places, -ML and -MLd are # not valid choices and must not be used. # # Fortunately, these days most libraries appear to be linked with -MD # so you can probably leave the default value of RUN_TIME_LIBRARY_FLAGS # alone. # RUN_TIME_LIBRARY_FLAGS = -MD # dynamically linked MSVCRT #RUN_TIME_LIBRARY_FLAGS = -MDd # dynamically linked MSVCRT (debugging version) #RUN_TIME_LIBRARY_FLAGS = -MT # statically linked LIBCMT #RUN_TIME_LIBRARY_FLAGS = -MTd # statically linked LIBCMT (debugging version) # # 2. Optionally turn on optimization. We normally optimize for speed. # #OPTIMIZE = -O2 #CFLAGS += $(OPTIMIZE) # # 3. Other possible flags, such as runtime checks for stack overflow. # #CFLAGS += -RTCs # # 4. FIXME: For Visual C++ 2015 and later maybe we can (?) use the # undocumented (?) argument '-d2UndefintOverflow-' to emulate the # GCC/Clang argument '-fwrapv' used for Linux, etc. This argument # forces signed integer overflow to wrap in the twos-complement # manner. Note that there is '-' character at the _end_ of the # argument as well as the beginning. # # See here for a description: # https://devblogs.microsoft.com/cppblog/new-code-optimizer/ # # Warning: Untested! (WML: 2019-12-03) # # This link suggests that the -d2UndefintOverflow- flag appears with # Visual C++ 2015 Update 3: # https://stackoverflow.com/questions/33480343/option-to-make-signed-integer-overflow-well-defined-in-visual-c # #CFLAGS += -d2UndefintOverflow- # #======================================================================== # # Generally, you should not have to modify anything after this point. # # # For now the initial definitions of INCLUDES and LIBRARIES should be near # the top. Please do not change the following two lines. # INCLUDES = $(MX_INCLUDES) LIBRARIES = $(WIN32_LIBS) MX_DRIVER_SRCS += d_win32_system_clock.c i_win32_com.c # # 3. Specify the architecture of the computer you are compiling on. This is # used mostly to find the directories where platform-specific .LIB files # are located. Visual Studio 2012 and after organize the x86 vs x64 # directory layout differently that Visual Studio 2010 and before, so we # must be able to distinguish between the two. # # Note: If you have defined the environment MX_ARCH in your Cygwin, Msys, # etc. environment and set it to 'win32', then there should be no need # to set the MSDEV_ARCH variables below. Instead, the makefile itself # will figure out the value that MSDEV_ARCH should be set to. # # The following definitions are from Visual C++ 4.0 to Visual Studio 2010. # #MSDEV_ARCH = x86 #MSDEV_ARCH = x64 # The directory layout for Visual Studio 2012 and after is different from # earlier versions. # #MSDEV_ARCH = x86_vs2012 #MSDEV_ARCH = x64_vs2012 #---- oldarchitecture := $(shell cl 2>&1 | head -1 | awk '{print $$10}') ifeq ($(oldarchitecture),80x86) architecture := x86 rtmversion := $(shell cl 2>&1 | head -1 | awk '{print $$8}' | cut -f1 -d'.') else architecture := $(shell cl 2>&1 | head -1 | awk '{print $$9}') rtmversion := $(shell cl 2>&1 | head -1 | awk '{print $$7}' | cut -f1 -d'.') endif newlayout := $(shell if [ $(rtmversion) -gt 16 ]; then echo true ; else echo false ; fi) #---- ifndef MSDEV_ARCH ifeq ($(architecture),x86) ifeq ($(newlayout),true) MSDEV_ARCH = x86_vs2012 else MSDEV_ARCH = x86 endif else ifeq ($(architecture),x64) ifeq ($(newlayout),true) MSDEV_ARCH = x64_vs2012 else MSDEV_ARCH = x64 endif else MSDEV_ARCH = error endif endif #---- ###$(info $$oldarchitecture is [${oldarchitecture}]) ###$(info $$architecture is [${architecture}]) ###$(info $$rtmversion is [${rtmversion}]) ###$(info $$newlayout is [${newlayout}]) ###$(info $$MSDEV_ARCH is [${MSDEV_ARCH}]) #---- # # 4. You must specify the directory that the libraries for Microsoft # Visual C++ were installed in. The name specified for Gnu Make # _MUST_ _NOT_ contain any spaces in it, since Gnu Make does not # handle such directory names well. That is why the examples below # use short directory names like progra~1\micros~1 instead of things # like "Program Files" or "Microsoft Visual Studio 10.0". # # If you are running a recent version of Visual Studio, there may be # an environment variable called "WindowsSdkDir" defined. If so, and # if you have Cygwin installed, then you can find the correct setting # for MSDEV_DIR with a Cygwin command like this: # # cygpath -d "$WindowsSdkDir" # # However, you will need to replace the single backslash '\' characters # in the output of cygpath with pairs of backslash characters '\\'. # # In most cases, whatever directory you select for MXDEV_DIR should # contain a Lib subdirectory which in turn should contain all of the # .lib files for the Windows DLLs that you plan to use. This should # be true for both Express and Pro versions of Visual Studio. The only # exception to this rule is if you are using a separately downloaded # copy of the Win32 Platform SDK. Look further down in this makefile # for more information about that. # # I have included below a variety of examples for how to set up the # MSDEV_DIR variable for different Visual C++ versions. # # # If MX_MSDEV_DIR has been defined in the environment, then we set the value # of MSDEV_DIR from that. Typically, MX_MSDEV_DIR will be set by a Cygwin # bash script that sets up the environment variables to run the compiler for # Microsoft Visual C++. Example scripts for this can be found in the MX # source code tree in the directory mx/scripts/windows/visual_studio. # # If MX_MSDEV_DIR is _not_ defined in the environment, then you must set the # value of MSDEV_DIR below manually. # ifdef MX_MSDEV_DIR MSDEV_DIR=$(MX_MSDEV_DIR) endif ###$(info $$MSDEV_DIR is [${MSDEV_DIR}]) # # Visual C++ 2012 Pro (beta) (_MSC_VER == 1700) # # Full name: 'c:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um' # #MSDEV_DIR = c:\\progra~2\\wi3cf2~1\\8.0\\Lib\\win8\\um # # Visual C++ 2010 Pro or Express (_MSC_VER == 1600) # #MSDEV_DIR = c:\\progra~1\\micros~1\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~1\\micros~2\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~1\\micros~3\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~1\\micros~4\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~1\\mi2578~1\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~2\\micros~1\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~2\\micros~3\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~2\\micros~4\\Windows\\v7.0A #MSDEV_DIR = c:\\progra~2\\mia713~1\\Windows\\v7.0A #MSDEV_DIR = d:\\progra~1\\micros~3\\Windows\\v7.0A # # Visual C++ 2008 Express (_MSC_VER == 1500) # (32-bit mode only) # #MSDEV_DIR = c:\\progra~1\\micros~2\\Windows\\v6.0A # # Visual C++ 2005 Express (_MSC_VER == 1400) # (See below at the definition of PLATFORM_SDK) # # Visual Studio.NET 2003 (_MSC_VER == 1310) # #MSDEV_DIR = c:\\progra~1\\micros~1.net\\vc7\\PlatformSDK # # Visual C++ 6.0 (_MSC_VER == 1200) # #MSDEV_DIR = c:\\progra~1\\micros~1\\vc98 #MSDEV_DIR = c:\\progra~1\\micros~2\\vc98 #MSDEV_DIR = c:\\progra~1\\micros~3\\vc98 #MSDEV_DIR = d:\\progra~1\\micros~2\\vc98 # # Visual C++ 5.0 (_MSC_VER == 1100) # #MSDEV_DIR = c:\\progra~1\\devstudio\\vc # # Visual C++ 4.0 (_MSC_VER == 1000) # #MSDEV_DIR = c:\\msdevstd # # Visual Studio.NET 2002 (_MSC_VER == 1300) (Not tested) #--------------------------------------------------------------------------- # # If you are using a separately downloaded copy of the Win32 Platform SDK, # the following is an example of how to have your compiler use that rather # than the version bundled with the compiler. # Visual C++ 2008 Express (64-bit mode) # # WARNING: You must use a customized version of WIN32_LIBS for 64-bit mode # which can be found below the normal definition of WIN32_LIBS. #PLATFORM_SDK = c:\\progra~1\\micros~2\\windows\\v7.0 #PLATFORM_SDK = c:\\progra~1\\micros~4\\windows\\v7.0 #PLATFORM_SDK = c:\\progra~1\\mia713~1\\windows\\v7.1 # Visual C++ 2005 Express # #PLATFORM_SDK = c:\\progra~1\\mifd68~1 #PLATFORM_SDK = c:\\progra~1\\micros~3 #PLATFORM_SDK = c:\\progra~1\\micros~4 #--------------------------------------------------------------------------- #RUN_TIME_LIBRARY_FLAGS += $(LIBMX_INCLUDES) #INCLUDES = -I$(PLATFORM_SDK)\\include $(MX_INCLUDES) #LIBMX_INCLUDES = -I$(PLATFORM_SDK)\\include $(MX_INCLUDES) #MSDEV_DIR = $(PLATFORM_SDK) #--------------------------------------------------------------------------- # # The following definition of WIN32_LIBS can probably be left alone if you # are creative enough in how you define MSDEV_DIR. # ifeq ($(MSDEV_ARCH),x86) MSDEV_LIB_DIR = $(MSDEV_DIR)\\lib endif ifeq ($(MSDEV_ARCH),x64) MSDEV_LIB_DIR = $(MSDEV_DIR)\\lib\\x64 endif #-- ifeq ($(MSDEV_ARCH),x86_vs2012) MSDEV_LIB_DIR = $(MSDEV_DIR)\\x86 endif ifeq ($(MSDEV_ARCH),x64_vs2012) MSDEV_LIB_DIR = $(MSDEV_DIR)\\x64 endif ###$(info $$MSDEV_LIB_DIR is [${MSDEV_LIB_DIR}]) #-- WIN32_LIBS = $(MSDEV_LIB_DIR)\\wsock32.lib \ $(MSDEV_LIB_DIR)\\winmm.lib \ $(MSDEV_LIB_DIR)\\advapi32.lib \ $(MSDEV_LIB_DIR)\\user32.lib \ $(MSDEV_LIB_DIR)\\gdi32.lib \ $(MSDEV_LIB_DIR)\\uuid.lib ###$(info $$WIN32_LIBS is [${WIN32_LIBS}]) #--------------------------------------------------------------------------- # # Visual C++ 2005 and above use "manifest" files to find C runtime library DLLs. # It is possible to use a "manifest tool" program to embed the contents of # the manifest file back into the binary file. # # Since Cygwin comes with a completely unrelated program that is _also_ called # 'mt', we must specify the full pathname of the manifest tool to ensure that # we find the correct one. # # The following forest of backticks, backslashes, and double quotes should be # sufficient to ensure that the final pathname for 'mt' uses forward slashes # when handed to 'bash' by the Cygwin make program. # MSMANIFEST_TOOL = `echo "$(MSDEV_DIR)\\bin\\mt" | tr \\\\ / ` #--------------------------------------------------------------------------- # # If you want to use the Mpatrol debugging package from # http://mpatrol.sourceforge.net, uncomment the following # statements. # #MPATROL_DIR = c:\\docume~1\\lavender\\mpatrol # #CFLAGS += -DDEBUG_MPATROL -I$(MPATROL_DIR)\\include #MPATROL_LIB = $(MPATROL_DIR)\\lib\\mpatrolmt.lib \ # $(MPATROL_DIR)\\lib\\heapdiff.obj #DEBUG_OPTS = /force:multiple $(MPATROL_LIB) $(MSDEV_DIR)\\lib\\imagehlp.lib #--------------------------------------------------------------------------- # # If you are using the Win32 version of DUMA (duma.sourceforge.net) # uncomment the following lines. DUMA is a fork of Electric Fence # which has been ported to Win32. # # WARNING: Make sure that DUMA has been compiled with the same flags # (-MD, -MDd, -MT, or -MTd) as is being used to compile MX. The default # configuration as delivered of DUMA uses -MLd. -MLd is not supported # by MX, since the use of the -MLd flag breaks MX's support for threads. # #DUMA_DIR = c:\\docume~1\\lavender\\archives\\duma\\duma_2_5_15 # #CFLAGS += -DDEBUG_DUMA #DUMA_LIB = $(DUMA_DIR)\\win32-msvc.net\\dumalib\\Release\\dumalib.lib #DEBUG_OPTS = /force $(DUMA_LIB) # #======================================================================== # # Intel x86 with Microsoft Visual C++ under Win32. # .SUFFIXES: .SUFFIXES: .c .obj .c.obj: $(CC) -c $(CFLAGS) $< CC = cl CFLAGS += -nologo $(INCLUDES) $(RUN_TIME_LIBRARY_FLAGS) \ -Zi -WX -DOS_WIN32 $(EXTRA_FLAGS) -DDEBUG # # Options specific to specific versions of Visual C++ # use_w14995 := $(shell if [ $(rtmversion) -gt 12 ]; then echo true ; else echo false ; fi) ifeq ($(use_w14995),true) CFLAGS += -w14995 endif # Special cases for individual files. CFLAGS_MX_VERS = -DOS_WIN32 -DMX_MAJOR_VERSION=$(MX_MAJOR_VERSION) \ -DMX_MINOR_VERSION=$(MX_MINOR_VERSION) \ -DMX_UPDATE_VERSION=$(MX_UPDATE_VERSION) \ -DMX_BRANCH_LABEL="\"$(MX_BRANCH_LABEL)\"" COMPILE = $(CC) -c DEFINE = -D # # For makedepend, you can use either the Cygwin 'makedepend' command # or you can use the 'makedepend' from UnxUtils. UnxUtils can be found # at http://sourceforge.net/projects/unxutils. # MAKEDEPEND = \ ( rm Makefile.depend ; \ makedepend -o.obj -Y -I../libMx -f- [a-l]*.c 2> /dev/null > Makefile.depend ; \ makedepend -o.obj -Y -I../libMx -f- [m-z]*.c 2> /dev/null >> Makefile.depend ) MAKEDEPEND_CLEAN = rm Makefile.depend # #--------------------------------------------------- # # Declare bundled programs to be MX "applications". # One of the consequences of this is that mx_poison.h # is applied to them. # APP_FLAGS=$(DEFINE)__MX_APP__ # #--------------------------------------------------- # MX_LIB_SRCS = mx_driver.c $(MX_CORE_SRCS) $(MX_DRIVER_SRCS) # # See libMx/Makehead.irix for why this is here. # MX_LIB_OBJS = $(MX_LIB_SRCS:.c=.$(OBJ)) MOTOR_OBJS = $(MOTOR_SRCS:.c=.$(OBJ)) SERVER_OBJS = $(SERVER_SRCS:.c=.$(OBJ)) AUTOSAVE_OBJS = $(AUTOSAVE_SRCS:.c=.$(OBJ)) MXDRIVERINFO_OBJS = $(MXDRIVERINFO_SRCS:.c=.$(OBJ)) MXMONITOR_OBJS = $(MXMONITOR_SRCS:.c=.$(OBJ)) MXGET_OBJS = $(MXGET_SRCS:.c=.$(OBJ)) MXPUT_OBJS = $(MXPUT_SRCS:.c=.$(OBJ)) #---- MX_LIB_OBJS += $(MX_LIB_CPP_OBJS) MX_LIB_OBJS += ..\\tools\\strcasestr.obj MX_LIB_OBJS += ..\\tools\\strlcpy.obj ..\\tools\\strlcat.obj MX_LIB_OBJS += ..\\tools\\strptime.obj MX_LIB_OBJS += ..\\tools\\xdr.obj ..\\tools\\xdr_hyper.obj MX_LIB_OBJS += ..\\tools\\getopt.obj MX_LIB_OBJS += ..\\tools\\cJSON.obj # #--------------------------------------------------- # RM = rm MAKE = make TOUCH = touch -a OBJ = obj EXEOUT = -Fe DOTEXE = .exe # MX_LIB_DIR = ..\\libMx MX_INC_DIR = ../libMx MX_INCLUDES = -I$(MX_INC_DIR) MX_LIBRARY_PATH = $(MX_LIB_DIR)\\$(MX_LIBRARY_NAME) MX_LIBRARY_NAME = libMx.lib MX_LIBRARY_STATIC_NAME = $(MX_LIBRARY_NAME) MX_LIBRARY_DELETE = $(RM) libMx.* $(MX_LIBRARY_NAME): $(shell echo $(MX_LIB_OBJS) | tr \\\\ / ) -$(MX_LIBRARY_DELETE) link /dll /debug /nologo /out:libMx.dll /nodefaultlib:libc \ $(DEBUG_OPTS) $(MX_LIB_OBJS) $(LIBRARIES) # For VC2005 or later, embed the manifest in the DLL. if test -f libMx.dll.manifest; then \ $(MSMANIFEST_TOOL) -nologo -outputresource:libMx.dll\;2 \ -manifest libMx.dll.manifest $(EXTRA_MANIFESTS) ; \ rm -f libMx.dll.manifest; \ fi library_install: -mkdir $(MX_INSTALL_DIR)/bin -mkdir $(MX_INSTALL_DIR)/etc -mkdir $(MX_INSTALL_DIR)/etc/startup -mkdir $(MX_INSTALL_DIR)/include -mkdir $(MX_INSTALL_DIR)/lib -mkdir $(MX_INSTALL_DIR)/log -mkdir $(MX_INSTALL_DIR)/run -mkdir $(MX_INSTALL_DIR)/sbin -mkdir $(MX_INSTALL_DIR)/state cp mx*.h $(MX_INSTALL_DIR)/include cp $(MX_LIBRARY_NAME) $(MX_INSTALL_DIR)/lib cp libMx.dll $(MX_INSTALL_DIR)/bin -cp libMx.pdb $(MX_INSTALL_DIR)/bin touch $(MX_INSTALL_DIR)/etc/mxmotor.dat touch $(MX_INSTALL_DIR)/etc/mxscan.dat cp ../plotgnu/plotgnu.pl $(MX_INSTALL_DIR)/bin cp ../plotgnu/showdata $(MX_INSTALL_DIR)/bin/showdata.pl cp ../plotgnu/showplot $(MX_INSTALL_DIR)/bin/showplot.pl cp ../plotgnu/plot2ps $(MX_INSTALL_DIR)/bin/plot2ps.pl cp ../plotgnu/*.bat $(MX_INSTALL_DIR)/bin cp ../tools/mxgnuplt.exe $(MX_INSTALL_DIR)/bin cp ../tools/mx_config.exe $(MX_INSTALL_DIR)/bin -cp ../tools/mx_config_py.bat $(MX_INSTALL_DIR)/bin mx_list_head.$(OBJ): Makefile.version mx_list_head.c mx_version.h $(COMPILE) $(CFLAGS) -DMX_CFLAGS="${CFLAGS}" mx_list_head.c # #--------------------------------------------------- # MOTOR_NAME = mxmotor.exe $(MOTOR_NAME): $(MOTOR_OBJS) mxmotor.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:$(MOTOR_NAME) $(MOTOR_OBJS) mxmotor.res \ /nodefaultlib:libc $(DEBUG_OPTS) $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(MOTOR_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo -outputresource:$(MOTOR_NAME)\;1 \ -manifest $(MOTOR_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MOTOR_NAME).manifest; \ fi mxmotor.res: mxmotor.rc rc -i$(MSDEV_DIR)/include mxmotor.rc motor_install: cp $(MOTOR_NAME) $(MX_INSTALL_DIR)/bin -cp mxmotor.pdb $(MX_INSTALL_DIR)/bin # #--------------------------------------------------- # SERVER_NAME = mxserver.exe $(SERVER_NAME): $(SERVER_OBJS) mxserver.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxserver.exe *.obj mxserver.res \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(SERVER_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo -outputresource:$(SERVER_NAME)\;1 \ -manifest $(SERVER_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(SERVER_NAME).manifest; \ fi mxserver.res: mxserver.rc rc -i$(MSDEV_DIR)/include mxserver.rc server_install: cp $(SERVER_NAME) $(MX_INSTALL_DIR)/sbin -cp mxserver.pdb $(MX_INSTALL_DIR)/sbin cp ../scripts/startmxserver.bat $(MX_INSTALL_DIR)/sbin cp ../scripts/mx.bat $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxserver.dat touch $(MX_INSTALL_DIR)/etc/mxserver.acl # #--------------------------------------------------- # AUTOSAVE_NAME = mxautosave.exe $(AUTOSAVE_NAME): $(AUTOSAVE_OBJS) mxautosave.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxautosave.exe *.obj mxautosave.res \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(AUTOSAVE_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo -outputresource:$(AUTOSAVE_NAME)\;1 \ -manifest $(AUTOSAVE_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(AUTOSAVE_NAME).manifest; \ fi mxautosave.res: mxautosave.rc rc -i$(MSDEV_DIR)/include mxautosave.rc autosave_install: cp $(AUTOSAVE_NAME) $(MX_INSTALL_DIR)/sbin -cp mxautosave.pdb $(MX_INSTALL_DIR)/sbin cp ../scripts/startmxautosave.bat $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxautosave.dat # #--------------------------------------------------- # MXDRIVERINFO_NAME = mxdriverinfo.exe $(MXDRIVERINFO_NAME): $(MXDRIVERINFO_OBJS) mxdriverinfo.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxdriverinfo.exe mxdriverinfo.obj \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(MXDRIVERINFO_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(MXDRIVERINFO_NAME)\;1 \ -manifest $(MXDRIVERINFO_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MXDRIVERINFO_NAME).manifest; \ fi mxdriverinfo.res: mxdriverinfo.rc rc -i$(MSDEV_DIR)/include mxdriverinfo.rc #---- MXMONITOR_NAME = mxmonitor.exe $(MXMONITOR_NAME): $(MXMONITOR_OBJS) mxmonitor.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxmonitor.exe mxmonitor.obj \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(MXMONITOR_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(MXMONITOR_NAME)\;1 \ -manifest $(MXMONITOR_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MXMONITOR_NAME).manifest; \ fi mxmonitor.res: mxmonitor.rc rc -i$(MSDEV_DIR)/include mxmonitor.rc #---- MXGET_NAME = mxget.exe $(MXGET_NAME): $(MXGET_OBJS) mxget.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxget.exe mxget.obj \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(MXGET_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(MXGET_NAME)\;1 \ -manifest $(MXGET_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MXGET_NAME).manifest; \ fi mxget.res: mxget.rc rc -i$(MSDEV_DIR)/include mxget.rc #---- MXPUT_NAME = mxput.exe $(MXPUT_NAME): $(MXPUT_OBJS) mxput.res \ $(shell echo $(MX_LIBRARY_PATH) | tr \\\\ / ) link /debug /nologo /out:mxput.exe mxput.obj \ /nodefaultlib:libc $(DEBUG_OPTS) \ $(MX_LIBRARY_PATH) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(MXPUT_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(MXPUT_NAME)\;1 \ -manifest $(MXPUT_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MXPUT_NAME).manifest; \ fi mxput.res: mxput.rc rc -i$(MSDEV_DIR)/include mxput.rc #---- util_install: cp $(MXDRIVERINFO_NAME) $(MX_INSTALL_DIR)/bin cp $(MXMONITOR_NAME) $(MX_INSTALL_DIR)/bin cp $(MXGET_NAME) $(MX_INSTALL_DIR)/bin cp $(MXPUT_NAME) $(MX_INSTALL_DIR)/bin -cp mxdriverinfo.pdb $(MX_INSTALL_DIR)/bin -cp mxmonitor.pdb $(MX_INSTALL_DIR)/bin -cp mxget.pdb $(MX_INSTALL_DIR)/bin -cp mxput.pdb $(MX_INSTALL_DIR)/bin