diff --git a/Makefile.am b/Makefile.am index 2417400..b40587e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ endif # Normally we'd want glib to be part of DIST_SUBDIRS unconditionally, # but distclean gets broken unless we always run glib's configure -SUBDIRS = $(GLIB_SUBDIR) . check +SUBDIRS = $(GLIB_SUBDIR) . check nmake DIST_SUBDIRS = $(SUBDIRS) # Escape paths properly on windows @@ -45,11 +45,7 @@ m4dir = $(datadir)/aclocal m4_DATA = pkg.m4 dist_doc_DATA = pkg-config-guide.html dist_man_MANS = pkg-config.1 -EXTRA_DIST = \ - README.win32 \ - detectenv-msvc.mak \ - Makefile.vc \ - config.h.win32 +EXTRA_DIST = README.win32 # gcov test coverage gcov: diff --git a/README.win32 b/README.win32 index c5b7ba2..df48c6c 100644 --- a/README.win32 +++ b/README.win32 @@ -33,14 +33,18 @@ unlike the normal autotools builds. The headers and libs either need to be found in your default %INCLUDE% and %LIB% respectively, or they need to be found in $(GLIB_PREFIX)\include and $(GLIB_PREFIX)\lib respectively; please see Makefile.vc for adjusting $(GLIB_PREFIX) to suit your needs. -To build pkg-config with MSVC, run in a Visual Studio command prompt: +To build pkg-config with MSVC, run in a Visual Studio command prompt from +the "nmake" subdirectory: "nmake /f Makefile.vc CFG=release" (release builds) -or- "nmake /f Makefile.vc CFG=debug" (debug builds) -The resulting pkg-config.exe will be found in [release|debug]\[win32|x64]; -a 'clean' target is supported to clean up the build. MSVC 2008 -through 2015 is supported; older versions may work as well but is not -tested. Note that building with the glib bundled with this source +The resulting pkg-config.exe will be found in +nmake\vsXX\[release|debug]\[win32|x64|arm64], where vsXX stands for the +short Visual Studio version, which is 9 for 2008, 10 for 2010, 14 for 2015 +and so on; a 'clean' target is supported to clean up the build. MSVC 2008 +through 2022 is supported, for the x86, x86_64 (x64) and aarch64 (ARM64) +architectures; older versions may work as well but is not tested. Note +that building with the glib bundled with this source distribution is not currently supported-the glib DLL and all of its dependent DLLs are required at runtime. diff --git a/configure.ac b/configure.ac index bd28d24..2c8a757 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,7 @@ Makefile pkg.m4 check/Makefile check/config.sh -config.h.win32 +nmake/Makefile +nmake/config.h.win32 ]) AC_OUTPUT diff --git a/nmake/.gitignore b/nmake/.gitignore new file mode 100644 index 0000000..1b378a7 --- /dev/null +++ b/nmake/.gitignore @@ -0,0 +1,2 @@ +config.h.win32 +vs*/ diff --git a/nmake/Makefile.am b/nmake/Makefile.am new file mode 100644 index 0000000..bdcd4dd --- /dev/null +++ b/nmake/Makefile.am @@ -0,0 +1,4 @@ +EXTRA_DIST = \ + detectenv-msvc.mak \ + Makefile.vc \ + config.h.win32 diff --git a/Makefile.vc b/nmake/Makefile.vc similarity index 97% rename from Makefile.vc rename to nmake/Makefile.vc index cbe4668..e62d3ae 100644 --- a/Makefile.vc +++ b/nmake/Makefile.vc @@ -49,7 +49,7 @@ LDFLAGS = $(LDFLAGS_BASE) LDFLAGS = $(LDFLAGS_BASE) /opt:ref /LTCG !endif -!include Makefile.sources +!include ..\Makefile.sources # Convert the source (*.c) listing to object (.obj) listing in # another NMake Makefile module, include it, and clean it up. @@ -70,7 +70,7 @@ LDFLAGS = $(LDFLAGS_BASE) /opt:ref /LTCG pkg_config_LIBS = glib-2.0.lib -{}.c{vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\}.obj:: +{..\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\}.obj:: @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\ md vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\config.h copy config.h.win32 vs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\config.h $(CC) $(pkg_config_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\pkg-config\ /c @<< diff --git a/config.h.win32.in b/nmake/config.h.win32.in similarity index 100% rename from config.h.win32.in rename to nmake/config.h.win32.in diff --git a/detectenv-msvc.mak b/nmake/detectenv-msvc.mak similarity index 100% rename from detectenv-msvc.mak rename to nmake/detectenv-msvc.mak