all: ../libMx/mx_private_version.h xdr.obj xdr_hyper.obj getopt.obj \ strcasestr.obj strlcpy.obj strlcat.obj strptime.obj \ cJSON.obj \ mx_config.exe mxgnuplt.exe include ../libMx/Makefile.version include ../libMx/Makehead.win32 # Get the Subversion revision number of MX (if available) include Include.subversion # Verify that Visual C++ is in the path check_for_vc := $(shell cl 2>&1 | grep Microsoft) ###$(info $$check_for_vc is [${check_for_vc}]) ifeq ($(check_for_vc),) $(info The Visual C++ command line compiler 'cl' was not found in the PATH variable.) $(info The MX 'win32' build target uses the command line compiler directly, so we) $(info cannot build MX until this is fixed. If you look in the MX source code) $(info directory mx/scripts/windows/visual_studio, you will find some example scripts) $(info for several Visual C++ versions that can be sourced in your $$HOME/.bashrc) $(info startup script. If you do that, then all of the necessary command line) $(info utilities will be put in your PATH and all of the other necessary Visual C++) $(info environment variables will be created.) $(error Aborting 'make' due to missing 'cl') endif # Now build the object files. mx_private_version.exe: ../libMx/Makefile.version \ version/src/mx_private_version.c cl -nologo -c $(CFLAGS_MX_VERS) version/src/mx_private_version.c link /nologo /debugtype:cv /out:mx_private_version.exe \ mx_private_version.obj ../libMx/mx_private_version.h: mx_private_version.exe ./mx_private_version > ../libMx/mx_private_version.h xdr.obj: xdr/src/xdr.c xdr/src/xdr.h cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -Ixdr/src -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ xdr/src/xdr.c -Foxdr.obj xdr_hyper.obj: xdr/src/xdr_hyper.c xdr/src/xdr.h xdr/src/xdr_hyper.h cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -Ixdr/src -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ xdr/src/xdr_hyper.c -Foxdr_hyper.obj getopt.obj: generic/src/getopt.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ generic/src/getopt.c -Fogetopt.obj strcasestr.obj: generic/src/strcasestr.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ generic/src/strcasestr.c -Fostrcasestr.obj strlcpy.obj: generic/src/strlcpy.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ generic/src/strlcpy.c -Fostrlcpy.obj strlcat.obj: generic/src/strlcat.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ generic/src/strlcat.c -Fostrlcat.obj strptime.obj: generic/src/strptime.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ generic/src/strptime.c -Fostrptime.obj cJSON.obj: cJSON/cJSON.c cJSON/cJSON.h cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 -I../libMx -DOS_WIN32 -D__MX_LIBRARY__ \ -D__WINDOWS__ -DCJSON_EXPORT_SYMBOLS \ cJSON/cJSON.c -FocJSON.obj mx_config.exe: version/src/mx_config.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -DOS_WIN32 -DMX_ARCH="\"$(MX_ARCH)\"" \ -DMX_INSTALL_DIR="\"$(MX_INSTALL_DIR)\"" \ -I../libMx -WX -Z7 version/src/mx_config.c link /nologo /debugtype:cv /out:mx_config.exe \ mx_config.obj $(WIN32_LIBS) ./mx_config_win32_python mxgnuplt.obj: win32/src/mxgnuplt.c cl -nologo -c $(RUN_TIME_LIBRARY_FLAGS) \ -WX -Z7 win32/src/mxgnuplt.c -Fmxgnuplt.obj mxgnuplt.exe: mxgnuplt.obj link /nologo /debugtype:cv /out:mxgnuplt.exe mxgnuplt.obj $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the DLL. if test -f mxgnuplt.exe.manifest; then \ $(MSMANIFEST_TOOL) -nologo -outputresource:mxgnuplt.exe\;1 \ -manifest mxgnuplt.exe.manifest $(EXTRA_MANIFESTS) ; \ rm -f mxgnuplt.exe.manifest; \ fi mx_clean: -rm *.obj *.exe *.manifest mx_revision.txt mx_config_py.bat