Skip to content

Commit

Permalink
Make: Minor clarification of build rules for libmlkem.a
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Dec 13, 2024
1 parent 4c2bcb0 commit f73cb30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mk/schemes.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ $(BUILD_DIR)/lib$(1).a: CFLAGS += -static
$(BUILD_DIR)/lib$(1).a: $(call MAKE_OBJS,$(BUILD_DIR)/$(1),$(SOURCES))

# NOTE:
# - The order matters, or else the `MLKEM_K` preprocessor won't be properly set
# - Merging multiple .a files with ar is more complex than building a single library directly from all the object files (.o). Hence, all .o files are added as dependencies here.
# libmlkem.a does not link against libmlkem{512,768,1024}.a, but the underlying object files.
# Still, we currently need a dependency on libmlkem{512,768,1024}.a here as otherwise there is
# a hiccup with the setting of MLKEM_K (TODO: look at this more closely)
$(BUILD_DIR)/libmlkem.a: $(BUILD_DIR)/lib$(1).a $(call MAKE_OBJS,$(BUILD_DIR)/$(1),$(SOURCES))
endef

Expand Down

0 comments on commit f73cb30

Please sign in to comment.