NMake Makefiles: Split out object listing portion

We want to eventually support building pkg-config using the built-in copy of
GLib with the NMake Makefiles, and we want to keep Makefile.vc as clean as
possible.
This commit is contained in:
Chun-wei Fan 2023-09-18 12:01:35 +08:00
parent 5eb56ec08a
commit e7a1953999
3 changed files with 18 additions and 17 deletions

View file

@ -1,4 +1,5 @@
EXTRA_DIST = \
create-lists-msvc.mak \
detectenv-msvc.mak \
Makefile.vc \
config.h.win32

View file

@ -50,23 +50,7 @@ LDFLAGS = $(LDFLAGS_BASE) /opt:ref /LTCG
!endif
!include ..\Makefile.sources
# Convert the source (*.c) listing to object (.obj) listing in
# another NMake Makefile module, include it, and clean it up.
!if [echo pkg_config_OBJS = \> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!if [for %c in ($(pkg_config_SOURCES)) do @if "%~xc" == ".c" echo. vs^$(VSVER)\^$(CFG)\^$(PLAT)\pkg-config\%~nc.obj \>> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!if [echo. ^$(NULL)>> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!include objs_vs$(VSVER)_$(PLAT)_$(CFG).mak
!if [del /f /q objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!include create-lists-msvc.mak
pkg_config_LIBS = glib-2.0.lib

View file

@ -0,0 +1,16 @@
# Convert the source (*.c) listing to object (.obj) listing in
# another NMake Makefile module, include it, and clean it up.
!if [echo pkg_config_OBJS = \> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!if [for %c in ($(pkg_config_SOURCES)) do @if "%~xc" == ".c" echo. vs^$(VSVER)\^$(CFG)\^$(PLAT)\pkg-config\%~nc.obj \>> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!if [echo. ^$(NULL)>> objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif
!include objs_vs$(VSVER)_$(PLAT)_$(CFG).mak
!if [del /f /q objs_vs$(VSVER)_$(PLAT)_$(CFG).mak]
!endif