1# Convert the source listing to object (.obj) listing in 2# another NMake Makefile module, include it, and clean it up. 3# This is a "fact-of-life" regarding NMake Makefiles... 4# This file does not need to be changed unless one is maintaining the NMake Makefiles 5 6# For those wanting to add things here: 7# To add a list, do the following: 8# # $(description_of_list) 9# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)] 10# endif 11# 12# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)] 13# endif 14# 15# if [call create-lists.bat footer $(makefile_snippet_file)] 16# endif 17# ... (repeat the if [call ...] lines in the above order if needed) 18# !include $(makefile_snippet_file) 19# 20# (add the following after checking the entries in $(makefile_snippet_file) is correct) 21# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the following line is added) 22#!if [del /f /q $(makefile_snippet_file)] 23#!endif 24 25# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs, do the following 26# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]' 27# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers): 28# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file $(makefile_snippet_file) $(intdir)\%~nc.obj] 29# 30# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak 31# %~xc gives the file extension of a given file, %c in this case, so if %c is a.cc, %~xc means .cc 32# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a 33 34NULL= 35 36# Include libpsl source files 37!include ..\src\libpsl-srcs.mk 38 39# Create the list of .obj files 40!if [call create-lists.bat header libpsl-msvc.mak libpsl_OBJS] 41!endif 42 43!if [for %c in ($(LIBPSL_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file libpsl-msvc.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libpsl\%~nc.obj] 44!endif 45 46!if [call create-lists.bat footer libpsl-msvc.mak] 47!endif 48 49!if [call create-lists.bat header libpsl-msvc.mak psl_OBJS] 50!endif 51 52!if [for %c in (..\tools\*.c) do @call create-lists.bat file libpsl-msvc.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\psl\%~nc.obj] 53!endif 54 55!if [call create-lists.bat footer libpsl-msvc.mak] 56!endif 57 58!include libpsl-msvc.mak 59 60!if [del /f /q libpsl-msvc.mak] 61!endif 62