diff --git a/Makefile.vc b/Makefile.vc index b8d5316..597c5f3 100644 --- a/Makefile.vc +++ b/Makefile.vc @@ -2,13 +2,23 @@ # Visual Studio builds of GLib does not need an existing pkg-config # installation, so build GLib first before using this. -# Change these if necessary. If building from GLib's included +# Set these if necessary. If building from GLib's included # Visual Studio projects, this should be able to locate the GLib build # out-of-the-box if they were not moved. GLib's headers will be found -# in $(GLIB_PREFIX)\include\glib-2.0 and $(GLIB_PREFIX)\lib\glib-2.0\include -# and its import library will be found in $(GLIB_PREFIX)\lib. +# in $(INCLUDEDIR)\glib-2.0 and $(LIBDIR)\glib-2.0\include +# and its import library will be found in $(LIBDIR). +!ifndef GLIB_PREFIX GLIB_PREFIX = ..\vs$(VSVER)\$(PLAT) +!endif + +!ifndef INCLUDEDIR +INCLUDEDIR = $(GLIB_PREFIX)\include +!endif + +!ifndef LIBDIR +LIBDIR = $(GLIB_PREFIX)\lib +!endif # The items below this line should not be changed, unless one is maintaining # the NMake Makefiles. @@ -17,8 +27,8 @@ GLIB_PREFIX = ..\vs$(VSVER)\$(PLAT) !if "$(VALID_CFGSET)" == "TRUE" CFLAGS = $(CFLAGS_ADD) /W3 /Zi /FImsvc_recommended_pragmas.h /I. \ - /I$(GLIB_PREFIX)\include\glib-2.0 \ - /I$(GLIB_PREFIX)\lib\glib-2.0\include + /I$(INCLUDEDIR)\glib-2.0 \ + /I$(LIBDIR)\glib-2.0\include # PKG_CONFIG_SYSTEM_INCLUDE_PATH and PKG_CONFIG_SYSTEM_LIBRARY_PATH only # work for GCC builds for now, so just set this to nothing for now @@ -29,7 +39,7 @@ pkg_config_CFLAGS = \ /DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"\"" \ /DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"\"" -LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(GLIB_PREFIX)\lib /DEBUG +LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(LIBDIR) /DEBUG NULL= !if "$(CFG)" == "debug"