@@ -106,13 +106,15 @@ else ifeq (x64,$(TARGET_CPU))
106106 CFLAGS = $(COPTION ) $(CINCLUDE ) /D_JDLL /DC_NA=0 /WX /W3 /O2 /GS- /Zc:strictStrings /D_USING_V110_SDK71_ /D_CRT_SECURE_NO_WARNINGS /MT $(CF1 )
107107 FLAGS = $(LDEBUG ) /DLL /MACHINE:X64 /SUBSYSTEM:WINDOWS,10.0
108108 ASMFLAGS = /Cx
109+ NASM_FLAGS = -fwin64
109110else
110111 CF1 = -m32 -maes -msse2 -fno-strict-aliasing -Wno-unknown-warning-option -Wsign-compare -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-parentheses -Wno-unused-variable -Wno-pointer-sign -Wno-missing-braces -Wno-missing-field-initializers -Wno-null-pointer-arithmetic -Wno-char-subscripts -Wno-pointer-to-int-cast -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-function -Wno-empty-body -Wno-sometimes-uninitialized -Wno-string-plus-int -Wno-unknown-pragmas -Wno-delete-non-abstract-non-virtual-dtor -Wno-deprecated-non-prototype -Wno-unused-variable
111112# /Og fail g310r
112113# /Oy crash ]^:_"1[0
113114CFLAGS = $(COPTION ) $(CINCLUDE ) /D_JDLL /WX /W3 /O2 /GS- /Zc:strictStrings /D_USING_V110_SDK71_ /D_CRT_SECURE_NO_WARNINGS /MT $(CF1 )
114115FLAGS = $(LDEBUG ) psapi.lib /DLL /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01
115116 ASMFLAGS = /Cx /coff
117+ NASM_FLAGS = -fwin32
116118endif
117119
118120.SUFFIXES : .o .S
@@ -308,13 +310,27 @@ else ifeq (arm64,$(TARGET_CPU))
308310 ../openssl-asm/sha256-armv8-nasm.o \
309311 ../openssl-asm/sha512-armv8-nasm.o
310312else ifeq (x64,$(TARGET_CPU))
313+ SRC_ASM = \
314+ openssl/sha/asm/md5-x86_64-nasm.o \
315+ openssl/sha/asm/keccak1600-x86_64-nasm.o \
316+ openssl/sha/asm/sha1-x86_64-nasm.o \
317+ openssl/sha/asm/sha256-x86_64-nasm.o \
318+ openssl/sha/asm/sha512-x86_64-nasm.o
319+
311320 OBJS_ASM = \
312321 ../openssl-asm/md5-x86_64-nasm.o \
313322 ../openssl-asm/keccak1600-x86_64-nasm.o \
314323 ../openssl-asm/sha1-x86_64-nasm.o \
315324 ../openssl-asm/sha256-x86_64-nasm.o \
316325 ../openssl-asm/sha512-x86_64-nasm.o
317326else
327+ SRC_ASM = \
328+ openssl/sha/asm/md5-586-nasm.o \
329+ openssl/sha/asm/keccak1600-mmx-nasm.o \
330+ openssl/sha/asm/sha1-586-nasm.o \
331+ openssl/sha/asm/sha256-586-nasm.o \
332+ openssl/sha/asm/sha512-586-nasm.o
333+
318334 OBJS_ASM = \
319335 ../openssl-asm/md5-586-nasm.o \
320336 ../openssl-asm/keccak1600-mmx-nasm.o \
@@ -336,6 +352,10 @@ ifndef LD
336352 LD = lld-link
337353endif
338354
355+ ifndef NASM
356+ NASM = nasm
357+ endif
358+
339359% .o : % .c
340360 $(CC ) $(CFLAGS ) $(CFLAGS1 ) /Fo$@ /c $<
341361
@@ -346,7 +366,7 @@ endif
346366 $(CC ) $(CFLAGS ) /Fo$@ /c $<
347367
348368% .o : % .asm
349- $(ML ) $(ASMFLAGS ) /Fo $@ /c $<
369+ $(NASM ) $(NASM_FLAGS ) -o $@ $<
350370
351371% .res : % .rc
352372 $(RC ) /L 0x409 /D_USING_V110_SDK71_ -R -FO$@ $<
0 commit comments