Skip to content

Commit

Permalink
move {poly,misc}.{c,h} back to common
Browse files Browse the repository at this point in the history
  • Loading branch information
mkannwischer committed Jul 18, 2024
1 parent 7d4ee10 commit fc76c5c
Show file tree
Hide file tree
Showing 105 changed files with 10 additions and 121 deletions.
6 changes: 5 additions & 1 deletion envs/m55-an547/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BUILD_DIR=./build

COMMON_INC=../common/inc/
ENV_INC=./inc/
TEST_COMMON=../../tests/common/

SYSROOT := $(shell $(CC) --print-sysroot)
CFLAGS += \
Expand All @@ -22,6 +23,7 @@ CFLAGS += \
-I$(ENV_INC) \
-I$(SRC_DIR) \
-I$(TESTDIR) \
-I$(TEST_COMMON) \
-I$(SRC_DIR)/platform

ARCH_FLAGS += \
Expand Down Expand Up @@ -52,8 +54,10 @@ all: $(TARGET)

HAL_SOURCES = $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/*/*.c) $(wildcard ../common/src/*.c)
OBJECTS_HAL = $(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(HAL_SOURCES)))
TEST_COMMON_SOURCES = $(wildcard $(TEST_COMMON)/*.c)
OBJECTS_TEST_COMMON = $(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(TEST_COMMON_SOURCES)))
OBJECTS_SOURCES=$(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(SOURCES)))
OBJECTS_C = $(OBJECTS_SOURCES) $(OBJECTS_HAL)
OBJECTS_C = $(OBJECTS_SOURCES) $(OBJECTS_HAL) $(OBJECTS_TEST_COMMON)
OBJECTS_ASM = $(patsubst %.s, $(BUILD_DIR)/%.s.o, $(abspath $(ASMS)))

OBJECTS = $(OBJECTS_C) $(OBJECTS_ASM)
Expand Down
6 changes: 5 additions & 1 deletion envs/m85-an555/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BUILD_DIR=./build

COMMON_INC=../common/inc/
ENV_INC=./inc/
TEST_COMMON=../../tests/common/

SYSROOT := $(shell $(CC) --print-sysroot)
CFLAGS += \
Expand All @@ -22,6 +23,7 @@ CFLAGS += \
-I$(ENV_INC) \
-I$(SRC_DIR) \
-I$(TESTDIR) \
-I$(TEST_COMMON) \
-I$(SRC_DIR)/platform

ARCH_FLAGS += \
Expand Down Expand Up @@ -52,8 +54,10 @@ all: $(TARGET)

HAL_SOURCES = $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/*/*.c) $(wildcard ../common/src/*.c)
OBJECTS_HAL = $(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(HAL_SOURCES)))
TEST_COMMON_SOURCES = $(wildcard $(TEST_COMMON)/*.c)
OBJECTS_TEST_COMMON = $(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(TEST_COMMON_SOURCES)))
OBJECTS_SOURCES=$(patsubst %.c, $(BUILD_DIR)/%.c.o, $(abspath $(SOURCES)))
OBJECTS_C = $(OBJECTS_SOURCES) $(OBJECTS_HAL)
OBJECTS_C = $(OBJECTS_SOURCES) $(OBJECTS_HAL) $(OBJECTS_TEST_COMMON)
OBJECTS_ASM = $(patsubst %.s, $(BUILD_DIR)/%.s.o, $(abspath $(ASMS)))

OBJECTS = $(OBJECTS_C) $(OBJECTS_ASM)
Expand Down
1 change: 0 additions & 1 deletion tests/chunk/chunk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CHUNK_PLATFORMS += m85-an555

# C sources required for this test
CHUNK_SOURCES += main.c
CHUNK_SOURCES += misc.c

# Assembly sources required for this test
CHUNK_ASMS += chunk.s
Expand Down
1 change: 0 additions & 1 deletion tests/chunk/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/chunk/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/crt/crt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CRT_PLATFORMS += m85-an555

# C sources required for this test
CRT_SOURCES += main.c
CRT_SOURCES += misc.c

# Assembly sources required for this test
CRT_ASMS += crt.s
Expand Down
1 change: 0 additions & 1 deletion tests/crt/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/crt/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/flt-fft/flt-fft.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FLT_FFT_PLATFORMS += m85-an555

# C sources required for this test
FLT_FFT_SOURCES += main.c
FLT_FFT_SOURCES += misc.c

# Assembly sources required for this test
FLT_FFT_ASMS += base_ref.s
Expand Down
1 change: 0 additions & 1 deletion tests/flt-fft/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/flt-fft/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/fx-fft/fx-fft.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ FX_FFT_PLATFORMS += m85-an555

# C sources required for this test
FX_FFT_SOURCES += main.c
FX_FFT_SOURCES += misc.c


# Assembly sources required for this test
FX_FFT_ASMS += base_concrete.s
Expand Down
1 change: 0 additions & 1 deletion tests/fx-fft/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/fx-fft/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/helloworld/helloworld.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ HELLOWORLD_PLATFORMS += m85-an555

# C sources required for this test
HELLOWORLD_SOURCES += main.c
HELLOWORLD_SOURCES += misc.c

# Assembly sources required for this test
HELLOWORLD_ASMS += mve_test.s
Expand Down
1 change: 0 additions & 1 deletion tests/helloworld/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/helloworld/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/intmulntt/intmulntt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ INTMULNTT_PLATFORMS += m85-an555

# C sources required for this test
INTMULNTT_SOURCES += main.c
INTMULNTT_SOURCES += misc.c
INTMULNTT_SOURCES += poly.c

# Assembly sources required for this test
INTMULNTT_ASMS += crt.s
Expand Down
1 change: 0 additions & 1 deletion tests/intmulntt/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/intmulntt/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/intmulntt/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/intmulntt/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/karatsuba/karatsuba.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ KARATSUBA_PLATFORMS += m85-an555

# C sources required for this test
KARATSUBA_SOURCES += main.c
KARATSUBA_SOURCES += misc.c

# Assembly sources required for this test
KARATSUBA_ASMS += karatsuba.s
Expand Down
1 change: 0 additions & 1 deletion tests/karatsuba/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/karatsuba/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/karatsuba/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/montgomery/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/montgomery/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/montgomery/montgomery.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ MONTGOMERY_PLATFORMS += m85-an555

# C sources required for this test
MONTGOMERY_SOURCES += main.c
MONTGOMERY_SOURCES += misc.c
MONTGOMERY_SOURCES += poly.c

# Assembly sources required for this test
MONTGOMERY_ASMS += montgomery.s
Expand Down
1 change: 0 additions & 1 deletion tests/montgomery/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/montgomery/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-1024/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-1024/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-1024/ntt-1024.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_1024_PLATFORMS += m85-an555

# C sources required for this test
NTT_1024_SOURCES += main.c
NTT_1024_SOURCES += misc.c
NTT_1024_SOURCES += poly.c

# Assembly sources required for this test
NTT_1024_ASM_DIR = ../../asm/auto/ntt_1024
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-1024/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-1024/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-192/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-192/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-192/ntt-192.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_192_PLATFORMS += m85-an555

# C sources required for this test
NTT_192_SOURCES += main.c
NTT_192_SOURCES += misc.c
NTT_192_SOURCES += poly.c

# Assembly sources required for this test
NTT_192_ASM_DIR = ../../asm/auto/ntt_192
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-192/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-192/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-256/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-256/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-256/ntt-256.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_256_PLATFORMS += m85-an555

# C sources required for this test
NTT_256_SOURCES += main.c
NTT_256_SOURCES += misc.c
NTT_256_SOURCES += poly.c

# Assembly sources required for this test
NTT_256_ASM_DIR = ../../asm/auto/ntt_256
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-256/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-256/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-384/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-384/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-384/ntt-384.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_384_PLATFORMS += m85-an555

# C sources required for this test
NTT_384_SOURCES += main.c
NTT_384_SOURCES += misc.c
NTT_384_SOURCES += poly.c

# Assembly sources required for this test
NTT_384_ASM_DIR = ../../asm/auto/ntt_384
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-384/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-384/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-512/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-512/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-512/ntt-512.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_512_PLATFORMS += m85-an555

# C sources required for this test
NTT_512_SOURCES += main.c
NTT_512_SOURCES += misc.c
NTT_512_SOURCES += poly.c

# Assembly sources required for this test
NTT_512_ASM_DIR = ../../asm/auto/ntt_512
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-512/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-512/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-768/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-768/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-768/ntt-768.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ NTT_768_PLATFORMS += m55-an547

# C sources required for this test
NTT_768_SOURCES += main.c
NTT_768_SOURCES += misc.c
NTT_768_SOURCES += poly.c

# Assembly sources required for this test
NTT_768_ASM_DIR = ../../asm/auto/ntt_768
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-768/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-768/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-dilithium/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-dilithium/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-dilithium/ntt-dilithium.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_DILITHIUM_PLATFORMS += m85-an555

# C sources required for this test
NTT_DILITHIUM_SOURCES += main.c
NTT_DILITHIUM_SOURCES += poly.c
NTT_DILITHIUM_SOURCES += misc.c

# Assembly sources required for this test
NTT_DILITHIUM_ASM_DIR = ../../asm/manual/ntt_dilithium
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-dilithium/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-dilithium/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-kyber/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-kyber/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-kyber/ntt-kyber.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_KYBER_PLATFORMS += m85-an555

# C sources required for this test
NTT_KYBER_SOURCES += main.c
NTT_KYBER_SOURCES += poly.c
NTT_KYBER_SOURCES += misc.c

# Assembly sources required for this test
NTT_KYBER_ASM_DIR=../../asm/manual/ntt_kyber
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-kyber/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-kyber/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-n256/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-n256/misc.h

This file was deleted.

2 changes: 0 additions & 2 deletions tests/ntt-n256/ntt-n256.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ NTT_N256_PLATFORMS += m85-an555

# C sources required for this test
NTT_N256_SOURCES += main.c
NTT_N256_SOURCES += misc.c
NTT_N256_SOURCES += poly.c

# Assembly sources required for this test
NTT_N256_ASM_DIR = ../../asm/auto/ntt_n256
Expand Down
1 change: 0 additions & 1 deletion tests/ntt-n256/poly.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/ntt-n256/poly.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/permute/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/permute/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/permute/permute.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PERMUTE_PLATFORMS += m85-an555

# C sources required for this test
PERMUTE_SOURCES += main.c
PERMUTE_SOURCES += misc.c

# Assembly sources required for this test
PERMUTE_ASM_DIR = ../../asm/auto/permute
Expand Down
1 change: 0 additions & 1 deletion tests/poly/misc.c

This file was deleted.

1 change: 0 additions & 1 deletion tests/poly/misc.h

This file was deleted.

1 change: 0 additions & 1 deletion tests/poly/poly.c

This file was deleted.

Loading

0 comments on commit fc76c5c

Please sign in to comment.