mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 15:39:07 +00:00
parent
8e4747a75d
commit
94224fb02c
@ -18,15 +18,15 @@ CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99 -I$(COMMON_DIR) $(EXTRAFLAGS)
|
||||
|
||||
all: $(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION) $(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION)
|
||||
|
||||
.PHONY: rebuild-scheme
|
||||
rebuild-scheme:
|
||||
cd $(SCHEME_DIR) && $(MAKE) clean && $(MAKE)
|
||||
.PHONY: build-scheme
|
||||
build-scheme:
|
||||
cd $(SCHEME_DIR) && $(MAKE)
|
||||
|
||||
$(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION): rebuild-scheme crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/randombytes.c $(COMMON_HEADERS)
|
||||
$(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/randombytes.c $(COMMON_HEADERS)
|
||||
mkdir -p $(DEST_DIR)
|
||||
$(CC) $(CFLAGS) -DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE) -I$(SCHEME_DIR) crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c -o $@ -L$(SCHEME_DIR) -l$(SCHEME)_$(IMPLEMENTATION)
|
||||
|
||||
$(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION): rebuild-scheme crypto_$(TYPE)/testvectors.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c $(COMMON_HEADERS)
|
||||
$(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/testvectors.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c $(COMMON_HEADERS)
|
||||
mkdir -p $(DEST_DIR)
|
||||
$(CC) $(CFLAGS) -DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE) -I$(SCHEME_DIR) crypto_$(TYPE)/testvectors.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c -o $@ -L$(SCHEME_DIR) -l$(SCHEME)_$(IMPLEMENTATION)
|
||||
|
||||
|
@ -20,18 +20,17 @@ CFLAGS=/I $(COMMON_DIR) /W1 /WX # FIXME: Should be /W4 but many compiler warning
|
||||
|
||||
all: $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE
|
||||
|
||||
rebuild-scheme:
|
||||
build-scheme:
|
||||
cd $(SCHEME_DIR)
|
||||
nmake /f Makefile.Microsoft_nmake clean
|
||||
nmake /f Makefile.Microsoft_nmake
|
||||
cd ..\..\..\test
|
||||
|
||||
$(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE: rebuild-scheme $(COMMON_OBJECTS) $(COMMON_DIR)\randombytes.obj
|
||||
$(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE: build-scheme $(COMMON_OBJECTS) $(COMMON_DIR)\randombytes.obj
|
||||
-MKDIR $(DEST_DIR)
|
||||
$(CC) /c crypto_$(TYPE)\functest.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
|
||||
LINK.EXE /OUT:$@ functest.obj $(COMMON_OBJECTS_NOPATH) randombytes.obj $(SCHEME_DIR)\lib$(SCHEME)_$(IMPLEMENTATION).lib Advapi32.lib
|
||||
|
||||
$(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE: rebuild-scheme $(COMMON_OBJECTS) $(COMMON_DIR)\notrandombytes.obj
|
||||
$(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE: build-scheme $(COMMON_OBJECTS) $(COMMON_DIR)\notrandombytes.obj
|
||||
-MKDIR $(DEST_DIR)
|
||||
$(CC) /c crypto_$(TYPE)\testvectors.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
|
||||
LINK.EXE /OUT:$@ testvectors.obj $(COMMON_OBJECTS_NOPATH) notrandombytes.obj $(SCHEME_DIR)\lib$(SCHEME)_$(IMPLEMENTATION).lib
|
||||
|
Loading…
Reference in New Issue
Block a user