1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

Fix Makefile.Microsoft_nmake header dependencies

This commit is contained in:
Thom Wiggers 2019-03-05 11:45:00 +01:00
parent 89e7383ecc
commit 45e645c3a7
No known key found for this signature in database
GPG Key ID: 001BB0A7CE26E363
5 changed files with 15 additions and 8 deletions

View File

@ -4,12 +4,15 @@
LIBRARY=libkyber768_clean.lib LIBRARY=libkyber768_clean.lib
OBJECTS=cbd.obj indcpa.obj kem.obj ntt.obj poly.obj polyvec.obj precomp.obj reduce.obj verify.obj OBJECTS=cbd.obj indcpa.obj kem.obj ntt.obj poly.obj polyvec.obj precomp.obj reduce.obj verify.obj
CFLAGS=/I ..\..\..\common /W4 /WX CFLAGS=/nologo /I ..\..\..\common /W4 /WX
all: $(LIBRARY) all: $(LIBRARY)
# Make sure objects are recompiled if headers change.
$(OBJECTS): *.h
$(LIBRARY): $(OBJECTS) $(LIBRARY): $(OBJECTS)
LIB.EXE /OUT:$@ $** LIB.EXE /NOLOGO /WX /OUT:$@ $**
clean: clean:
-DEL $(OBJECTS) -DEL $(OBJECTS)

View File

@ -4,12 +4,15 @@
LIBRARY=libdilithium-iii_clean.lib LIBRARY=libdilithium-iii_clean.lib
OBJECTS=ntt.obj packing.obj poly.obj polyvec.obj reduce.obj rounding.obj sign.obj OBJECTS=ntt.obj packing.obj poly.obj polyvec.obj reduce.obj rounding.obj sign.obj
CFLAGS=/I ..\..\..\common /W1 /WX # FIXME: ideally would use /W4 instead of /W1, but too many failures in Dilithium right now CFLAGS=/nologo /I ..\..\..\common /W1 /WX # FIXME: ideally would use /W4 instead of /W1, but too many failures in Dilithium right now
all: $(LIBRARY) all: $(LIBRARY)
# Make sure objects are recompiled if headers change.
$(OBJECTS): *.h
$(LIBRARY): $(OBJECTS) $(LIBRARY): $(OBJECTS)
LIB.EXE /OUT:$@ $** LIB.EXE /NOLOGO /WX /OUT:$@ $**
clean: clean:
-DEL $(OBJECTS) -DEL $(OBJECTS)

View File

@ -27,9 +27,9 @@ FOR %%T IN (kem sign) DO (
CD %%K CD %%K
FOR /D %%L IN (*) DO ( FOR /D %%L IN (*) DO (
CD ..\..\test CD ..\..\test
nmake /f Makefile.Microsoft_nmake /E TYPE=%%T SCHEME=%%K SCHEME_UPPERCASE=!schemeuppercase! IMPLEMENTATION=%%L clean nmake /NOLOGO /f Makefile.Microsoft_nmake /E TYPE=%%T SCHEME=%%K SCHEME_UPPERCASE=!schemeuppercase! IMPLEMENTATION=%%L clean
IF ERRORLEVEL 1 SET EL=4 IF ERRORLEVEL 1 SET EL=4
nmake /f Makefile.Microsoft_nmake /E TYPE=%%T SCHEME=%%K SCHEME_UPPERCASE=!schemeuppercase! IMPLEMENTATION=%%L nmake /NOLOGO /f Makefile.Microsoft_nmake /E TYPE=%%T SCHEME=%%K SCHEME_UPPERCASE=!schemeuppercase! IMPLEMENTATION=%%L
IF ERRORLEVEL 1 SET EL=5 IF ERRORLEVEL 1 SET EL=5
CD .. CD ..
bin\functest_%%K_%%L bin\functest_%%K_%%L

View File

@ -17,7 +17,7 @@ COMMON_OBJECTS_NOPATH=fips202.obj sha2.obj
DEST_DIR=..\bin DEST_DIR=..\bin
CFLAGS=/I $(COMMON_DIR) /W4 /WX CFLAGS=/nologo /I $(COMMON_DIR) /W4 /WX
all: $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE all: $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE

View File

@ -39,7 +39,8 @@ def make(*args, working_dir='.', env=None, expected_returncode=0, **kwargs):
make('clean', 'targetb', SCHEME='bla') make('clean', 'targetb', SCHEME='bla')
""" """
if os.name == 'nt': if os.name == 'nt':
make_command = ['nmake', '/f', 'Makefile.Microsoft_nmake', '/E'] make_command = ['nmake', '/f', 'Makefile.Microsoft_nmake',
'/NOLOGO', '/E']
# we need SCHEME_UPPERCASE and IMPLEMENTATION_UPPERCASE with nmake # we need SCHEME_UPPERCASE and IMPLEMENTATION_UPPERCASE with nmake
for envvar in ['IMPLEMENTATION', 'SCHEME']: for envvar in ['IMPLEMENTATION', 'SCHEME']:
if envvar in kwargs: if envvar in kwargs: