Add Makefiles for dilithium-iii

This commit is contained in:
Douglas Stebila 2019-02-06 21:02:34 -05:00
parent b6a40cebe7
commit 7ea8e508a3
3 changed files with 39 additions and 8 deletions

View File

@ -0,0 +1,15 @@
LIB=libdilithium-iii_clean.a
SOURCES=$(wildcard *.c)
OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99 -I../../../common $(EXTRAFLAGS)
all: $(LIB)
$(LIB): $(OBJECTS)
$(AR) -r $@ $(OBJECTS)
clean:
$(RM) $(OBJECTS)
$(RM) $(LIB)

View File

@ -0,0 +1,14 @@
LIB=libdilithium-iii_clean.lib
OBJECTS=ntt.c packing.c poly.c polyvec.c reduce.c rounding.c sign.c
CFLAGS=/I ..\..\..\common /W1 /WX
all: $(LIB)
$(LIB): $(OBJECTS)
LIB.EXE /OUT:$@ $**
clean:
DEL $(OBJECTS)
DEL $(LIB)

View File

@ -5,14 +5,16 @@ SET EL=0
REM CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" REM CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
REM IF ERRORLEVEL 1 SET EL=1 REM IF ERRORLEVEL 1 SET EL=1
FOR /D %%K IN (crypto_kem\*) DO ( FOR /D %%J IN (crypto_kem, crypto_sig) DO (
FOR /D %%L IN (%%K\*) DO ( FOR /D %%K IN (%%J\*) DO (
cd %%L FOR /D %%L IN (%%K\*) DO (
nmake /f Makefile.Microsoft_nmake clean cd %%L
IF ERRORLEVEL 1 SET EL=2 nmake /f Makefile.Microsoft_nmake clean
nmake /f Makefile.Microsoft_nmake IF ERRORLEVEL 1 SET EL=2
IF ERRORLEVEL 1 SET EL=3 nmake /f Makefile.Microsoft_nmake
cd ..\..\.. IF ERRORLEVEL 1 SET EL=3
cd ..\..\..
)
) )
) )