Skip to content

Commit

Permalink
rename libjade asm files from *.s to *.S
Browse files Browse the repository at this point in the history
Signed-off-by: Pravek Sharma <[email protected]>
  • Loading branch information
praveksharma committed Apr 22, 2024
1 parent 93877fb commit 47556b3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion scripts/copy_from_upstream/copy_from_upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,16 @@ def handle_implementation(impl, family, scheme, dst_basedir):
# Flatten directory structure while copying relevant files from libjade repo
for root, _, files in os.walk(origfolder):
for file in files:
if os.path.splitext(file)[1].lower() in ['.c', '.h', '.s']:
if os.path.splitext(file)[1] in ['.c', '.h']:
source_path = os.path.join(root, file)
dest_path = os.path.join(srcfolder, file)
subprocess.run(['cp', source_path, dest_path])
if os.path.splitext(file)[1] in ['.s']:
file_name, file_ext = os.path.splitext(file)
new_file = ''.join([file_name, file_ext.upper()])
source_path = os.path.join(root, file)
dest_path = os.path.join(srcfolder, new_file)
subprocess.run(['cp', source_path, dest_path])
else:
# determine list of files to copy:
if 'sources' in i:
Expand Down
8 changes: 4 additions & 4 deletions src/kem/kyber/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,29 @@ endif()
##### OQS_COPY_FROM_LIBJADE_FRAGMENT_CMAKELISTS_START

if(OQS_ENABLE_LIBJADE_KEM_kyber_512)
add_library(jasmin_kyber_512_ref OBJECT kem_kyber_512.c libjade_kyber512_ref/api.c libjade_kyber512_ref/kem.s)
add_library(jasmin_kyber_512_ref OBJECT kem_kyber_512.c libjade_kyber512_ref/api.c libjade_kyber512_ref/kem.S)
target_include_directories(jasmin_kyber_512_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libjade_kyber512_ref)
target_include_directories(jasmin_kyber_512_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:jasmin_kyber_512_ref>)
endif()

if(OQS_ENABLE_LIBJADE_KEM_kyber_512_avx2)
add_library(jasmin_kyber_512_avx2 OBJECT libjade_kyber512_avx2/api.c libjade_kyber512_avx2/kem.s)
add_library(jasmin_kyber_512_avx2 OBJECT libjade_kyber512_avx2/api.c libjade_kyber512_avx2/kem.S)
target_include_directories(jasmin_kyber_512_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libjade_kyber512_avx2)
target_include_directories(jasmin_kyber_512_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
target_compile_options(jasmin_kyber_512_avx2 PRIVATE -mavx2 -mbmi2 -mpopcnt )
set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:jasmin_kyber_512_avx2>)
endif()

if(OQS_ENABLE_LIBJADE_KEM_kyber_768)
add_library(jasmin_kyber_768_ref OBJECT kem_kyber_768.c libjade_kyber768_ref/api.c libjade_kyber768_ref/kem.s)
add_library(jasmin_kyber_768_ref OBJECT kem_kyber_768.c libjade_kyber768_ref/api.c libjade_kyber768_ref/kem.S)
target_include_directories(jasmin_kyber_768_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libjade_kyber768_ref)
target_include_directories(jasmin_kyber_768_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:jasmin_kyber_768_ref>)
endif()

if(OQS_ENABLE_LIBJADE_KEM_kyber_768_avx2)
add_library(jasmin_kyber_768_avx2 OBJECT libjade_kyber768_avx2/api.c libjade_kyber768_avx2/kem.s)
add_library(jasmin_kyber_768_avx2 OBJECT libjade_kyber768_avx2/api.c libjade_kyber768_avx2/kem.S)
target_include_directories(jasmin_kyber_768_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libjade_kyber768_avx2)
target_include_directories(jasmin_kyber_768_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
target_compile_options(jasmin_kyber_768_avx2 PRIVATE -mavx2 -mbmi2 -mpopcnt )
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 47556b3

Please sign in to comment.