Nmakefile: Use the manifest file.

Use the :: feature because there is a race condition if ``link`` and
``mt`` are used in a single rule (on my machine).

This unfortunately causes ``mt`` to run if ``nmake`` is invoked twice in
a row, but I don't see a way around it right now.
windows-high-dpi
Doug Coleman 2018-03-13 21:48:53 -05:00
parent 0f796b922b
commit 32795ecf03
1 changed files with 10 additions and 2 deletions

View File

@ -132,11 +132,19 @@ libfactor-ffi-test.dll: vm/ffi_test.obj
factor.dll.lib: $(DLL_OBJS)
link $(LINK_FLAGS) /implib:factor.dll.lib /out:factor.dll /dll $(DLL_OBJS)
factor.com: $(EXE_OBJS) $(DLL_OBJS)
# If we ``link`` factor.com and then ``mt`` it in the same rule (for retina support)
# then factor.com is still open and ``mt`` fails
# sleep hack fixes it...
factor.com :: $(EXE_OBJS) $(DLL_OBJS)
link $(LINK_FLAGS) /out:factor.com /SUBSYSTEM:$(SUBSYSTEM_COM_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
factor.com ::
mt -manifest factor.exe.manifest -outputresource:factor.com;#1
factor.exe: $(EXE_OBJS) $(DLL_OBJS)
factor.exe :: $(EXE_OBJS) $(DLL_OBJS)
link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:$(SUBSYSTEM_EXE_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
factor.exe ::
mt -manifest factor.exe.manifest -outputresource:factor.exe;#1
all: factor.com factor.exe factor.dll.lib libfactor-ffi-test.dll